Cybersecurity Fundamentals series — Part 5. This post continues Part 1: A Complete Beginner’s Guide, Part 2: Security Controls, Part 3: The CIA Triad, and Part 4: Non-Repudiation. Each post in the series takes one topic and covers it in depth. This one covers how systems verify, limit, and record access: authentication, authorization, and accounting (AAA).
AAA stands for authentication (proving who you are), authorization (deciding what you are allowed to do), and accounting (recording what you did). Together they answer three questions about every access: who is it, what may they do, and what did they do?
Every time you sign in to something, a short sequence of events happens. You say who you are. The system checks. It decides what you can reach. And it writes down what you do. These steps feel like one action, but security professionals separate them, because each one can fail in a different way, and each one is protected by different controls.
In Part 4, you saw how digital signatures prove who sent something. This post looks at the everyday version of the same problem: controlling who gets into systems and what they can do once inside. It also builds on the confidentiality goal from Part 3, since access control is how confidentiality is enforced.
The Three Parts of AAA
| Part | The question | An example |
|---|---|---|
| Authentication | Who are you, and can you prove it? | Typing a password and approving a prompt on your phone |
| Authorization | What are you allowed to do? | Shipping staff can open the shipping system but not the finance reports |
| Accounting | What did you do? | A log entry: “maria logged in at 9:02 and exported a report at 9:15” |
Some sources add a fourth step, identification, which comes first.
Identification vs. Authentication
These two words are often mixed up:
- Identification is claiming an identity, such as typing a username or an email address. Anyone can claim anything.
- Authentication is proving the claim, usually with a password and other factors.
Think of walking up to a building and saying “I’m Maria” (identification), then showing your badge and photo ID (authentication).
Authentication: Proving Who You Are
Authentication checks the claim against something only the real person should have. These are called factors:
| Factor | What it is | Examples |
|---|---|---|
| Something you know | A secret in your memory | Password, PIN |
| Something you have | An object you hold | Phone app, security key, smart card |
| Something you are | A physical trait | Fingerprint, face |
Using more than one factor is called multi-factor authentication (MFA). A stolen password is not enough if the attacker also needs your phone. See two-factor authentication explained and what a passkey is.
A Central AAA Server
In many organizations, devices do not keep user passwords themselves. Instead, a central AAA server holds the user database. A device such as a VPN concentrator or a firewall asks the server whether the credentials are valid. This has real advantages: one place to add or remove users, one place to enforce MFA, and one place to keep logs.
Authorization: Deciding What You Can Do
Once the system knows who you are, it decides what you can reach. A user in shipping should be able to use the shipping system, but not the finance system.
If you assigned permissions to each person for each resource, you would soon lose track. With hundreds of users and thousands of resources, it does not scale. The answer is an authorization model, a layer between users and resources:
- Instead of giving every shipping employee access to every shipping resource, you create a group called “Shipping and Receiving” and give the group the permissions.
- When someone joins the team, you add them to the group. When they leave, you remove them. Their access changes immediately, in one step.
Common ways to build the model:
| Model | How access is decided | Example |
|---|---|---|
| Role-based (RBAC) | By the person’s job role | “Accountant” can read and write ledgers |
| Attribute-based (ABAC) | By attributes of the user, resource, and situation | Only managers, from the company network, during business hours |
| Discretionary (DAC) | The owner of a resource decides who gets access | You share a document with a colleague |
| Mandatory (MAC) | A central policy with labels, which users cannot change | Classified data with clearance levels |
Whichever model you use, follow the principle of least privilege: give people only the access they need to do their jobs, and no more.
Accounting: Keeping a Record
Accounting records what happens: logins and logouts, the time, the amounts of data sent and received, and which resources were accessed. It supports:
- Auditing and compliance
- Investigation after an incident (“who touched that file?”)
- Detecting unusual behavior, such as a login at 3 a.m. from another country
- Capacity planning and billing
Accounting records are only useful if they are complete, protected from tampering, and reviewed. Logs that attackers can edit prove nothing, which is the same integrity concern you saw in Part 3.
A Worked Example: Logging In Through a VPN
Imagine an employee connecting from home to a file server inside the office.
- The employee’s laptop connects to the VPN concentrator (or firewall) and is asked for credentials.
- The concentrator does not know the passwords. It forwards the request to the central AAA server.
- The AAA server checks its database (and any second factor) and answers approved. This is authentication.
- The server also returns what the user may reach, based on their group. This is authorization.
- The concentrator allows access to the file server, but only to the permitted resources.
- Throughout the session, the connection start, end, and traffic details are recorded. This is accounting.
Try It: AAA in a Few Lines of Python
This small program shows the three parts working together. It is for illustration only. Real systems never store plain-text passwords; they store salted hashes, and they use proven libraries for authentication.
# Identity store (illustration only: real systems store salted password hashes)
USERS = {"maria": "s3cret", "james": "hunter2"}
# Authorization: users belong to groups, and groups hold the permissions
GROUPS = {"maria": ["shipping"], "james": ["finance"]}
PERMISSIONS = {
"shipping": {("read", "shipping-system"), ("write", "shipping-system")},
"finance": {("read", "finance-reports")},
}
accounting_log = []
def log(user, action, resource, result):
accounting_log.append(f"{user} {action} {resource} -> {result}")
def authenticate(user, password):
return USERS.get(user) == password
def authorize(user, action, resource):
return any((action, resource) in PERMISSIONS[g] for g in GROUPS.get(user, []))
def request(user, password, action, resource):
if not authenticate(user, password):
log(user, action, resource, "DENIED (authentication failed)")
return False
if not authorize(user, action, resource):
log(user, action, resource, "DENIED (not authorized)")
return False
log(user, action, resource, "ALLOWED")
return True
request("maria", "s3cret", "write", "shipping-system")
request("maria", "s3cret", "read", "finance-reports")
request("james", "wrong", "read", "finance-reports")
request("james", "hunter2", "read", "finance-reports")
for line in accounting_log:
print(line)
maria write shipping-system -> ALLOWED
maria read finance-reports -> DENIED (not authorized)
james read finance-reports -> DENIED (authentication failed)
james read finance-reports -> ALLOWED
Read the log line by line. Maria passed authentication and was authorized for shipping, but she was denied the finance report because her group does not include that permission. James failed once with the wrong password, then succeeded. The accounting log recorded all four attempts, including the failed ones, which is exactly what a security team wants to see.
Authenticating Devices with Certificates
People can type passwords. Devices cannot, and storing a password on every laptop, phone, and sensor is risky. Instead, devices can prove who they are with a digital certificate.
- A certificate authority (CA) issues a device certificate and signs it. See Part 4 for how signatures work.
- The certificate is installed on the device, for example a company laptop.
- When the device connects, the network checks the certificate. If it was signed by a trusted CA, the device is accepted as company-owned.
- After the device is authenticated, the authorization model decides what it can reach.
Protocols You May Hear About
Many networks use standard protocols to deliver AAA between devices and servers. A few common ones:
| Protocol | Typical use |
|---|---|
| RADIUS | Network access: Wi-Fi, VPN, and wired network logins |
| TACACS+ | Administrator access to network devices such as routers and switches |
| Kerberos | Ticket-based sign-in for users and services in many corporate networks |
You do not need to know the details yet. It is enough to recognize the names and where they fit.
Common Mistakes
- Mixing up authentication and authorization. Knowing who someone is does not mean they should get everything.
- Giving too much access “just in case.” Excess permissions turn a stolen account into a disaster.
- Granting access person by person. It becomes unmanageable. Use groups and roles.
- Not turning on accounting. Without logs, you cannot investigate or prove anything.
- Never reviewing access. People change jobs and leave. Review who has access to what, regularly, and remove what is no longer needed.
- Shared accounts. If five people share one login, accounting cannot tell them apart.
Practice: Which Part of AAA?
- A user enters a password and approves a prompt on their phone.
- The system lets a sales user open the CRM but not the payroll system.
- A log records that an administrator changed a firewall rule at 14:07.
- A laptop proves it is company-owned using a certificate.
Answers
- Authentication.
- Authorization.
- Accounting.
- Authentication (of a device). The certificate proves identity, and authorization then decides what the device can access.
Quick Summary
- AAA covers three steps: authentication, authorization, and accounting.
- Identification is claiming an identity. Authentication is proving it, with one or more factors.
- Authorization decides what you may do. Groups and roles make it manageable at scale, and least privilege keeps it safe.
- Accounting records what happened, supporting audits and investigations.
- Devices can authenticate with certificates instead of passwords.
What’s Next in This Series
Next, the series looks at how organizations find out where their security stands compared with where it should be: gap analysis. To practice, pick one system you use at work and write down who authenticates to it, who is authorized to do what, and whether anything records the activity.
For another explanation, Professor Messer offers a free video lesson as part of his CompTIA Security+ SY0-701 course: Authentication, Authorization, and Accounting. For more on protecting data stores, see database security and privacy.
Conclusion
AAA is the pattern behind almost every sign-in. Authentication checks who you are, authorization limits what you can do, and accounting keeps the record. Each one needs its own protection: strong factors for authentication, groups and least privilege for authorization, and protected logs for accounting. When access goes wrong, it is usually because one of the three was missing, so when you review a system, ask about all three.
Next in the Cybersecurity Fundamentals series: Security Gap Analysis: How to Find and Close Security Gaps, how to find where your security falls short of where it should be.
Cybersecurity Fundamentals series: Part 1: A Complete Beginner’s Guide · Part 2: Security Controls · Part 3: The CIA Triad · Part 4: Non-Repudiation · Part 5: Authentication, Authorization, and Accounting · Part 6: Gap Analysis · Part 7: Zero Trust · Part 8: Physical Security · Part 9: Deception and Disruption
