This paper presents a fine-grained two-factor authentication (2FA) access control system tailored for web-based cloud computing services, enhancing security by requiring both a user secret key and a lightweight, tamper-resistant security device. The proposed system addresses weaknesses of traditional password-based systems, such as lack of privacy and vulnerability to malware, while enabling access control based on user attributes. A simulation demonstrates the effectiveness and practicality of this 2FA approach, which aims to ensure user privacy without compromising access in shared computing environments.