The authentication, authorization, and accounting (AAA) framework is used to manage and control access to resources and services. These are the three primary components of access management. They play a crucial role in defining and implementing access control models, such as mandatory access control, discretionary access control (DAC), and role-based access control (RBAC). MAC is where access rights and permissions are assigned based on the security classifications and labels associated with both users and resources. DAC is where access rights and permissions are at the discretion of the resource owner, allowing users to control access to their own resources. RBAC is where access rights and permissions are assigned based on roles within an organization or system rather than individual user identities.
Note
Identities, subjects, and directories are key terms used to further understand AAA. Identities are distinct representations of individuals, devices, or other system entities. Subjects are active entities, such as users, that request access to resources or services. A directory is a repository that stores and manages identity-related information, including user accounts, credentials, group memberships, and access permissions.
Verifying an entity’s identity when they want to access a system or resource, such as a user, is the process of authentication. An authenticated entity’s access to certain actions or resources within a system or network is determined through the process of authorization. Accounting entails monitoring and recording of actions and occurrences about resource utilization, access, and other security-related operations carried out by entities inside a system. The management of this process and its pieces is known as privilege management. All of this is included under the umbrella of IAM. IAM is a framework of policies and technologies used to manage and secure digital identities and control access to resources within an organization. It ensures that only authorized users can access specific systems, applications, and data, based on their roles and permissions. IAM is critical for protecting sensitive information, maintaining compliance with regulations, and preventing unauthorized access and security breaches. By effectively managing user identities and access rights, IAM helps organizations safeguard their IT environments and ensure operational efficiency.
In this section, you will learn about some IAM concepts, as specified by the CySA+ exam objectives, including MFA, single sign-on, passwordless authentication, federation, privileged access management, and CASBs.
MFA
MFA is one of the most important elements of IAM. MFA uses multiple forms of verification to strengthen the security of the authentication process. It is key to understanding that using multiple passwords or multiple tokens on their own would not meet MFA requirements, as this would only be using one form (something you know or something you have) rather than multiple forms. These factors include something you know, something you have, something you are, something you do, and somewhere you are. The latter is used infrequently but the others are a main component of most modern MFA setups.
Something you know includes things such as passwords, passphrases, PINs, or any other combination of data that only you are expected to know (non-public information). Something you have includes things such as smart cards, one-time passcodes (OTPs), and tokens. Something you are deals with biometrics, using unique characteristics of the human body, such as fingerprints, facial recognition, voice recognition, and eye or retina recognition. Something you do includes things such as keyboard and mouse dynamics recognition.
Somewhere you are factors include location-based identifiers such as through GPS. Figure 1.34 shows a physical RSA token, which is a popular vendor for these devices. The number automatically iterates based on the programmed algorithm. On the right side of the figure, it shows an authenticator mobile application that serves the same function but does not use a dedicated device.
Figure 1.34: RSA SecurID physical token and Google Authenticator mobile app
Generally, the more factors you include in your authentication scheme, the more secure you make it. The caveat is that this will also make it more complex and cumbersome, often leading to more failed authentication attempts by legitimate users.
Most major websites and organizations today use at least two-factor authentication (2FA) as a requirement or encouragement, with tokens or OTPs via SMS being the most common second factor. This heightens security as passwords can be phished, guessed, or compromised in various ways, but it is less likely for an attacker to have the second factor as well to complete authentication. Today, the standard is to have at least two factors, as this prevents an attacker from simply using stolen credentials to gain access. However, these systems are not unbreachable, as there are direct attacks against token systems as well as simply losing tokens or phones, or using insecure channels of communication, which then allow attackers to have this information as well.
Single Sign-On
Single sign-on (SSO) is a centralized authentication process that enables users to sign in once to access several linked systems or apps. By handling the authentication and securely transferring the user’s credentials to the various services, the SSO system serves as a middleman. It is commonly implemented in most organizations today and is also used by web applications. Figure 1.35 shows a simple SSO process.
Figure 1.35: Simple SSO process
It begins with the user requesting access to App 1. App 1 requests the user to provide a token. The user is redirected to request a token from the credential server. They must use their credentials to authenticate and authorize with the credential server. The user is then issued a token that will be valid for a set period. This token is then sent back to App 1 for access. App 1 verifies the token with the credential server, which approves the token and allows the user to access App 1. This is where the user benefit comes in, with a single sign-on. While the token is valid, the user requests access to App 2 and provides the token. App 2 follows the same process to verify the token and allow access, but the user does not have to enter their credentials again to access App 2. Depending on the backend setup, the applications may be preconfigured with elements they can verify about a token, removing the requirement to verify the provided user token with the credential server.
Lightweight Directory Access Protocol Secure (LDAPS) is a network protocol used to support SSO systems. It facilitates access and queries to directory services, particularly directory servers such as Active Directory, in a secure and encrypted manner. The S (Secure) in LDAPS is an enhancement of LDAP to include SSL/TLS for great security and encrypted communication. Active Directory is an additional common element in Windows-based SSO systems, as it is a main directory of users, passwords, permissions, roles, and other details.
SSO setups produce several benefits. The user experience is improved because they only have to enter their credentials once and set and remember one username and password. Security is improved as it reduces the problem of user passwords being reused across multiple systems and sites. It also helps reduce complexity for access administrators and help desks as they will maintain smaller databases of credentials. This can help reduce support costs as well.
However, SSO is not without risks. If an attacker can gain credentials, they will receive access to multiple resources with the same credentials. Also, if an attacker can gain access to an active session that is already authenticated, they will gain additional access to other SSO-enabled systems as well. Additional controls to help reduce this risk include periodic re-authentication and usage of MFA for critical systems. MFA would still require the user to supply an additional factor, even if their username and password may not require user input, before granting access to these systems.
Federation
Federation is a specifically listed CompTIA CySA+ exam objective in the IAM section and it deals with the concept of sharing a federated identity, which is a collection of linked identity attributes, between trusted entities. It uses the concepts of shared authentication, much like SSO, and a central authentication service (CAS). Users authenticate once and gain access to or share information with systems that are not the direct authorizer. Today’s online landscape often uses this concept, and you may have seen it at sites such as Google, Microsoft, LinkedIn, Facebook, and others.
Figure 1.36 shows the ChatGPT login screen. Here, a user has options to log in with their already existing Google, Microsoft, or Apple account, without having to create a new account with ChatGPT directly.
Figure 1.36: ChatGPT federated login options
Federated Identity System Design
One of the most important concepts of federated identity systems is that they move trust beyond the boundaries of your organization. This makes a risk-based design approach even more critical when designing, implementing, and securing these systems. An organization needs to trust these outside parties and potentially even review their security practices to help provide further assurances. There are a few main components to consider:
- Identity provider (IDP)
- Service provider (SP)
- Consumer
An IDP provides identity management and authentication. They store, verify, and supply information to the other parts of a federation. This can be provided for one or more trusted entities. Their role requires secure storage and transmission of all identity details. It also requires secure mechanisms to provide authentication. Okta is an example of an IDP that offers cloud-based identity management and authentication services.
An SP, sometimes also known as a relying partner (RP), provides services, resources, or applications to users. It relies on the IDP for identity management and authentication. It is important for this entity to securely handle these communications between itself, the consumer, and the IDP. Salesforce is an example of an SP that relies on an IDP such as Okta to facilitate user authentication and identity management.
A consumer relies on the SP to provide access to services. They are the ones who initially request access. They are responsible for accepting attribute release requests, providing requested information to the IDP, and validating information that the IDP has stored. Again, all communication between the consumer and SP needs to be done over secure channels. An employee user, such as for Salesforce, is an example of a consumer.
Figure 1.37 depicts the process for the consumer first requesting access to a service, then being redirected to the IDP to input credentials and verify their identity. A token is granted when successful, which is provided to the SP for access to the service.
Figure 1.37: Federated identity high-level access process
There are generally two levels of trust in federation systems. One is that IDPs do not directly verify specific identities. With these, they try to ensure that the correct account owner is validating, not necessarily who the account owner is specifically. In the other trust type, they do additional identity verification steps, such as with government IDs, additional private information, or even video calls, to verify and confirm actual identities. An example of this is the ID.me service. This service is used by many governmental websites and agencies, such as InfraGard, the IRS, the Department of Labor, and the Social Security Administration. It requires a user to verify their identity with government IDs, facial biometrics, and sometimes video conference calls. After verification, a user’s information and identity are certified as true and able to be shared with numerous RPs. It is important to consider which type would suit an organization’s needs and what type of access to grant internally to the federated identity based on these two types. Also, you should consider this information to decide on what level of monitoring to do against these account types.
Next, you must plan for how internal accounts are created, based on the federated identities. Generally, federated systems operate most efficiently when accounts are automatically provisioned, as this lowers administrative load overall and reduces any delays in user access. However, this does raise additional security concerns around trusting these accounts without any prior internal verification.
Once you decide on an IDP and RP, you must understand what additional related technologies they use to properly plan applicable security controls. Some of the common technologies are Security Assertion Markup Language (SAML), Active Directory Federated Services (AD FS), OAuth, and OpenID Connect. These are also important if you are planning your own internal federated system implementation.
All these factors should inform your security designs for implementation and usage of the federated system. You may require extra levels of detail and assurance from the external parties to further trust them. You may also decide not to work with certain IDPs, such as Google, as their model requires much less assurance of a user’s real identity.
News of federated identity-related hacks is becoming more and more common. It is not impossible for a breach in one member to potentially lead to breaching other members in a federation. This concept furthers the imperative to ensure secure designs, to protect your organization from any breach impact of the federation.
Federated Identity System Technologies
SAML, AD FS, OAuth, and OpenID Connect are currently the major technologies in use by most federation systems. They provide specific functionalities and the ability for IDPs to connect with SPs securely without specific knowledge of an SP’s services or usage of the identity. Here, you will learn more details about each, including how they function at a higher level, how they are used, and common security issues.
SAML
SAML is an XML-based standard used for exchanging authentication and authorization information between an IDP and SP. It is a common standard used for implementing SSO for web-based applications and services and provides authentication and authorization. It is utilized commonly with Linux environments, but it is OS-independent, and uses SAML assertions, which are statements about a subject (usually a user) that the IDP provides to the SP after successful authentication. They can contain information such as user identity, attributes, and permissions. Message confidentiality and protocol usage are some of the main security considerations.
AD FS, OAuth, and OpenID Connect
AD FS, OAuth, and OpenID Connect are additional common federated system technologies. AD FS is Microsoft’s federated identity system, implementing Active Directory solutions in a federated manner. Like SAML, it provides both authentication and authorization. It uses a security token service that generates SAML tokens for successful authentication. Within these tokens are claims, which are details about the user, role, and attributes. These claims are further used to make access control decisions. Its most common use is to integrate Windows on-prem AD with cloud-based Microsoft services. Due to its token usage, token-based attacks are a security concern.
OAuth, currently at version 2.0, is a protocol created by the Internet Engineering Task Force (IETF). It is designed to support embedded and mobile technologies access authorization within federated systems. It connects HTTP-based services with third-party applications, often using APIs. Related key terms include clients (applications for use), resource owners (end users), resource servers (servers for an application to use), and authorization servers (servers under the IDP). Unlike the other federation technologies, it only provides authorization. This authorization functionality is used by federation members to request sharing of user details.
Figure 1.38 shows an example screen of the process for a user’s details-sharing request. The Developer REST Console requests access and gathers information from a user’s LinkedIn profile details via OAuth. If the user inputs the correct authentication details and selects Allow access
, the data will then be shared as requested to the Developer REST Console.
Figure 1.38: Example OAuth authorization request screen
Figure 1.39 shows an approved OAuth authorization request for Credly, sharing the name and photo. This is an example screen seen after successful authentication and authorization have occurred. It provides further specifics regarding when Credly was granted access and what it has access to. It also provides a way to remove this access, which would require re-authentication and authorization if access was needed and requested again.
Figure 1.39: Example approved OAuth authorization request
Much like other federation technologies, message confidentiality is a security concern, as well as a redirect manipulation of messages and impersonation of resource servers or authorization servers.
OpenID Connect provides only authentication. Due to this, it is often used alongside OAuth, which would then provide the authorization. It adds functionality to the authorization server in the form of an ID token generated through successful authentication. It shares some of the same security concerns as OAuth, such as redirect manipulation and message confidentiality, but also has authentication-based concerns, including replay attacks, CSRF/XSS attacks, and phishing attacks.
Privileged Access Management
Privileged access management (PAM) is a solution framework that helps prevent unauthorized access to privileged accounts, such as administrator, system, or other elevated access accounts. It helps to implement additional IAM concepts such as least privilege access, password rotation, session monitoring, and access approval, among others.
PAM generally works by having a user authenticate into a central portal or client. They then can further access other devices and resources via sessions initiated and monitored by the PAM client. Another function may allow them to check out passwords, which could include approval from other parties to further access accounts. Once the user is done with their needs, they can check in the password, which is often set to auto-rotate. Another common setup is to have password auto check-in after a set period. This ensures that auto-rotation still occurs, even if the user forgets to manually check the password back in. An example of implementation for this is with the usage of service or administrator accounts. These highly privileged accounts would require more security. PAM allows them to be shared and facilitates password checkout approval and password autorotation. This auto-rotation can occur when the user checks the account back in or after a predefined time period for automatic check-in elapses. This process helps protect the usage of these accounts and increase the associated password strength through auto-rotation and assignment.
PAM enhances security through isolation and segmentation, granular access control, session monitoring, and workflow automation. The password rotation feature is a huge benefit as it allows much more frequent rotation to reduce the risk of compromised password use. It does have potential cons around cost, complexity, potential single points of failure, and user experience. It is important to carefully plan and design PAM implementations to reduce the impact of these cons.
Passwordless Authentication
Passwordless authentication allows authentication without the usage of a traditional password. It would use one of the other factors, as discussed in the MFA section. Items such as tokens or biometrics serve as the single factor for authentication. These schemes are more secure than a standard password, but generally less secure than 2FA or greater schemes. Due to only using one factor, it generally results in better, less complex user experience. Today, many mobile applications allow for passwordless authentication. This occurs by first requesting enrollment of stored biometrics from the user’s mobile device. This process includes authenticating via standard password methods. After enrollment is successful, future access can be facilitated through only biometrics, no longer requiring the use of a password. Passwords are still a part of this overall process as many of these applications also have web portals that would still require and use standard passwords.
CASB
CASB is a software tool designed to provide several security functions and benefits for cloud environments. It can exist on-prem or fully in the cloud. It assists with enforcing security policies by providing functions such as monitoring, data loss prevention, access controls, threat protection, and encryption and tokenization. CASB systems need to be carefully designed, implemented, and maintained due to these broad capabilities.
In this section, you delved into the various aspects of IAM and its essential role in securing systems and data. You learned about MFA and how it enhances security by requiring multiple forms of verification. SSO was discussed for its convenience in allowing users to access multiple systems with a single login. Federation and its components, including federated identity system design and technologies, were examined to understand how organizations manage authentication across different domains. You also explored PAM for controlling and monitoring access to critical systems and passwordless authentication as a modern approach to user verification. CASB was reviewed for its role in managing and securing cloud-based services. Next, you will explore encryption and data protection, focusing on methods and technologies used to secure data both at rest and in transit, and ensuring compliance with data protection regulations.