Identity and access

9 free practice questions for the CompTIA® Security+® (SY0-801) exam, from the operations domain. Pick an answer, then open the explanation to check it.

Every question is original and written for Gapwise with AI. Two separate AI reviewers answered each one without seeing the answer key and checked it against the cited public sources. These are not real exam questions.

Question 1

Two universities run a joint research portal. Each university wants its staff to sign in to the portal with their existing home-university accounts. The portal team does not want to hold any passwords or password hashes. Which approach meets these goals?
  1. A. Create a portal account and password for each researcher
  2. B. Federate the portal with each university's identity provider (IdP)
  3. C. Copy both universities' password hashes into the portal's own database
  4. D. Give each university one shared portal account for its staff
Show the answer and explanation

Answer: B. Federate the portal with each university's identity provider (IdP)

Federation lets a relying party, here the portal, accept authentication performed by an identity provider it trusts. NIST SP 800-63C-4 notes that federation is generally preferred when the relying party and the user accounts aren't administered together, because the relying party doesn't need to issue its own authenticators. Each university's IdP sends assertions through a federation protocol such as Security Assertion Markup Language (SAML) or OpenID Connect. Local accounts, copied hashes, and shared accounts all put secrets in the portal.

Why each option is right or wrong

  • A. Incorrect. Local accounts put a new set of passwords in the portal and give researchers another credential to manage, the opposite of both goals.
  • B. Correct. Researchers authenticate at their home university, and the portal receives a signed assertion instead of a password. Each university keeps managing its own accounts.
  • C. Incorrect. Hashes are still password secrets, which the portal team wants to avoid holding. Copying them also creates sync problems whenever a password changes.
  • D. Incorrect. A shared account still needs a stored password, and the portal could no longer tell which researcher did what.

References

Question 2 Multiple answers

An auditor reviews account settings at a regional credit union. Which three settings follow good practice for their account types? (Select three.)
  1. A. One domain-wide admin account is shared by the whole IT team
  2. B. Break-glass credentials are tested on a schedule to confirm they work
  3. C. A service account holds only the permissions its application needs
  4. D. A service account's password is written in a script and never changes
  5. E. The break-glass account is used for routine weekend maintenance
  6. F. A vendor's support account is disabled except during approved visits
Show the answer and explanation

Answers: B. Break-glass credentials are tested on a schedule to confirm they work; C. A service account holds only the permissions its application needs; F. A vendor's support account is disabled except during approved visits

Each account type has its own failure mode. Break-glass credentials must work when everything else has failed, so they are stored separately, tested regularly, and kept out of everyday use. Service accounts should hold only the rights their application needs, with credentials kept out of scripts. Third-party accounts should be enabled only when the vendor actually needs them, and every admin action should trace to a named person.

Why each option is right or wrong

  • A. Incorrect. A shared admin account makes it impossible to tell which person made a change. Each administrator needs a named account.
  • B. Correct. Emergency credentials are used rarely, so they can silently stop working. Routine tests make sure they will work during the outage they exist for.
  • C. Correct. Least privilege limits what an attacker gains if the service account's password is stolen or cracked.
  • D. Incorrect. Anyone who can read the script gets the credential. Service credentials belong in a vault or a system-managed account.
  • E. Incorrect. Routine use turns an emergency account into an everyday admin account and buries real emergency use in normal activity.
  • F. Correct. Keeping third-party access off between visits removes standing access that an attacker, or the vendor, could misuse.

References

Question 3 Multiple answers

Technicians at a pharmaceutical plant must leave mobile phones in lockers before entering the production floor. A maintenance console on the floor needs a possession-based second factor for sign-in. Which two authenticators meet this requirement? (Select two.)
  1. A. An authenticator app on each technician's phone
  2. B. A key fob that displays a new code every 30 seconds
  3. C. One-time codes sent by text message to each technician
  4. D. A USB security key that answers a cryptographic challenge
  5. E. One-time codes emailed to each technician's work mailbox
Show the answer and explanation

Answers: B. A key fob that displays a new code every 30 seconds; D. A USB security key that answers a cryptographic challenge

Hard tokens are dedicated physical devices, so they work where phones are banned. A one-time password (OTP) key fob and a USB security key both prove possession without a phone. Authenticator apps and text messages depend on the phone that stays in the locker. Email codes prove only that someone can read a mailbox, which is why NIST SP 800-63B-4 doesn't allow email for out-of-band authentication.

Why each option is right or wrong

  • A. Incorrect. An authenticator app is a soft token that lives on the phone, and the phone stays in the locker.
  • B. Correct. A key fob is a hard token: a dedicated physical device that generates one-time passwords without any phone.
  • C. Incorrect. Text messages need the phone that is locked away.
  • D. Correct. A security key is a physical cryptographic authenticator. It plugs into the console and needs no phone.
  • E. Incorrect. Email doesn't prove possession of a specific device, since anyone with access to the mailbox gets the code. NIST SP 800-63B-4 rules out email for out-of-band authentication.

References

Question 4

A software company rolled out passkeys, and most staff now sign in without typing a password. Each account still offers a password plus a text-message code whenever a passkey sign-in fails. Attackers send staff links to a look-alike sign-in page and still take over several accounts. Which change BEST stops these takeovers?
  1. A. Raise the minimum length of the passwords used for the fallback
  2. B. Send the fallback codes from an authenticator app instead of by text message
  3. C. Turn off the password option on accounts that already have a passkey
  4. D. Require the user verification flag on every passkey sign-in
Show the answer and explanation

Answer: C. Turn off the password option on accounts that already have a passkey

A correctly verified passkey sign-in is bound to the real site's domain, so a phishing page can't use it. Instead, the attacker lets the passkey attempt fail and steers the user to the fallback, where the password and code are typed and relayed. Passwordless sign-in only protects accounts when weaker fallbacks are removed or limited to a deliberate recovery process. Switching to app-generated codes looks like an upgrade, but those codes are relayed just as easily.

Why each option is right or wrong

  • A. Incorrect. A longer password is still typed into the fake page and relayed to the real site along with the text-message code. Length slows guessing; it does nothing against a real-time relay.
  • B. Incorrect. Authenticator app codes are also typed by hand, so the look-alike page can relay them just as it relays text-message codes. NIST doesn't treat manually entered codes as phishing-resistant.
  • C. Correct. A passkey can't complete a sign-in for the look-alike domain, so the phishing page pushes users onto the weaker path. Removing that path, and keeping recovery as a separate, logged process, leaves the attacker nothing to relay.
  • D. Incorrect. User verification makes a passkey sign-in multifactor, but the attackers aren't using passkeys. They are abusing the password-and-code path, which this setting doesn't change.

References

Question 5

A regional hospital sets up each new nurse's account by copying the account of a nurse already on the same unit. An access review finds that new nurses keep inheriting extras the copied nurse picked up over the years, such as pharmacy inventory rights. Which approach BEST prevents this?
  1. A. Define a nurse role with the job's permissions and assign new nurses to it
  2. B. Let each unit manager grant record access directly to the nurses they supervise
  3. C. Label records by sensitivity and give each nurse a matching clearance level
  4. D. Limit each nurse's sign-ins to the hours of their scheduled shifts
Show the answer and explanation

Answer: A. Define a nurse role with the job's permissions and assign new nurses to it

In role-based access control (RBAC), permissions attach to roles that reflect job functions, and users receive them through role assignment. Copying a coworker's account copies whatever that person accumulated, which breaks least privilege. Assigning a defined role gives each new nurse exactly the job's permissions. RBAC also simplifies reviews, since auditors can check a role once instead of every account.

Why each option is right or wrong

  • A. Correct. Role-based control ties permissions to the job function, so every new nurse receives the same defined set and nothing a colleague accumulated.
  • B. Incorrect. That is owner-style, discretionary granting. Access would still vary by manager and could still pile up over time.
  • C. Incorrect. Mandatory labels and clearances control sensitivity levels, not job duties. A clearance can't express that nurses need charting but not pharmacy inventory.
  • D. Incorrect. A time-based restriction controls when access is used, not what is granted. The copied extra rights would remain.

References

Question 6 Multiple answers

A credit union is cataloging its access management policies. Which two are logical/technical policies rather than administrative/business policies? (Select two.)
  1. A. A handbook rule that managers must approve each new access request in writing
  2. B. A directory setting that locks an account after 10 failed sign-ins
  3. C. A conditional access rule that blocks sign-ins from unencrypted devices
  4. D. A quarterly procedure in which data owners review who can reach their data
  5. E. A signed acceptable use agreement required before any account is issued
Show the answer and explanation

Answers: B. A directory setting that locks an account after 10 failed sign-ins; C. A conditional access rule that blocks sign-ins from unencrypted devices

Logical or technical policies are enforced by hardware, software, or firmware, such as lockout thresholds and conditional access rules. Administrative or business policies are carried out by people: approvals, reviews, and signed agreements. The two work together, since a written rule often states a requirement that a technical setting then enforces. A quick sorting test: ask whether the system or a person applies it.

Why each option is right or wrong

  • A. Incorrect. People carry out this rule through a documented approval step. It is administrative, even though it governs system access.
  • B. Correct. The directory enforces this automatically in software on every sign-in attempt, which makes it a technical control.
  • C. Correct. The identity platform evaluates and enforces this condition itself on each sign-in, so it is technical.
  • D. Incorrect. An access review is a management process that people perform on a schedule, so it is administrative.
  • E. Incorrect. An agreement directs behavior and is enforced by people and consequences, not by the system.

References

Question 7

Attackers took usernames and passwords leaked from an unrelated online shop and tried them on a company's webmail portal. Several employee accounts opened on the first attempt because those employees had used the same password at the shop. Which measure BEST addresses the cause?
  1. A. Require every password to mix uppercase, lowercase, digits, and symbols
  2. B. Force all employees to change their passwords every 60 days
  3. C. Provide a password manager that generates each account's password
  4. D. Lock each account after five failed sign-in attempts
Show the answer and explanation

Answer: C. Provide a password manager that generates each account's password

This is credential stuffing: passwords leaked from one service are replayed against others, and they work wherever a person reused them. The fix for the cause is a unique password per account, which a password manager makes practical by generating and storing them. Complexity, expiration, and lockout rules don't break the link between sites. Multifactor authentication is a strong added layer, but it doesn't remove the reuse itself.

Why each option is right or wrong

  • A. Incorrect. Composition rules don't stop reuse; a complex password reused at the shop leaks just the same. NIST SP 800-63B-4 also prohibits such rules.
  • B. Incorrect. Scheduled changes leave a reused password valid until the next change, and people tend to make predictable tweaks. NIST says not to require periodic changes without evidence of compromise.
  • C. Correct. A manager makes it practical to keep a distinct, generated password everywhere, so a leak at one service doesn't open accounts elsewhere.
  • D. Incorrect. The leaked passwords worked on the first try, so no failures built up. Lockout slows guessing, not reuse of a correct password.

References

Question 8

A multifunction printer looks up employees' email addresses in the corporate directory over Lightweight Directory Access Protocol (LDAP) for scan-to-email. During a penetration test, a tester reads the LDAP bind credentials saved in the printer's web console. The bind account is a member of the domain-wide administrators group. The team is already changing the console's password. Which additional change BEST limits the damage if the bind credentials leak again?
  1. A. Use a dedicated bind account with only read access to the directory
  2. B. Move the connection from StartTLS on port 389 to LDAPS on port 636
  3. C. Change the bind account's password every 30 days on a fixed schedule
  4. D. Have the printer bind anonymously so that it stores no credentials
Show the answer and explanation

Answer: A. Use a dedicated bind account with only read access to the directory

A device or app that only searches the directory should bind with an account limited to the reads it needs. Using a member of a domain-wide administrators group turns any leak of the saved credentials into a full domain compromise. OWASP advises minimizing the privileges of the LDAP binding account and keeping directory data behind authenticated access. Encryption in transit and scheduled password changes don't shrink what a leaked credential can do.

Why each option is right or wrong

  • A. Correct. The printer only searches the directory, so its bind account needs nothing beyond read access. If those credentials leak, the attacker gets that narrow read access instead of control of the whole domain.
  • B. Incorrect. Wrong. Both options encrypt the LDAP session, so the move changes nothing here. The credentials were read from the printer's saved settings, not from the network, and they would still unlock a domain administrator account.
  • C. Incorrect. Wrong. A leaked password keeps working until the next change, and a domain administrator password is enough to take over the domain long before then. The account would also keep far more rights than the printer needs.
  • D. Incorrect. Wrong. Anonymous binds work only if the directory lets unauthenticated clients read user data, which exposes it to anyone on the network. The sound design keeps directory data behind authentication and gives the printer a least-privileged bind account.

References

Question 9

A network team keeps the passwords for its shared router and firewall administrator accounts in a team folder of the company's password manager. Every team member can view and copy the entries. An engineer resigns, and IT disables his directory account, which also ends his access to the password manager. What should the team do next?
  1. A. Change the passwords of the shared accounts stored in that folder
  2. B. Nothing more, since disabling his account already ended his vault access
  3. C. Have the remaining members change their own vault master passwords
  4. D. Check the folder's member list at the next quarterly access review
Show the answer and explanation

Answer: A. Change the passwords of the shared accounts stored in that folder

A password manager controls who can retrieve a secret, but it can't make someone forget a secret they have already seen. When a member leaves a group that shares account credentials, change those credentials. NIST SP 800-53 control AC-2 calls for a process to change shared or group account authenticators when individuals leave the group. Where devices allow it, individual admin accounts avoid the problem altogether.

Why each option is right or wrong

  • A. Correct. While he was on the team, he could see and copy every password in the folder. Those passwords keep opening the routers and firewalls until they are changed.
  • B. Incorrect. Wrong. Removing his vault access stops new lookups, but not passwords he already saw, copied, or remembered. The devices still accept those passwords.
  • C. Incorrect. Wrong. His departure doesn't expose anyone else's master password. The secrets at risk are the shared device passwords he could read.
  • D. Incorrect. Wrong. His membership has already ended, so a review would find nothing to remove. Waiting also leaves the passwords he knew valid for months.

References