Secure access to email and other business productivity tools continues to be a top priority for IT administrators. Microsoft services, such as Azure Active Directory and Office 365, use OpenID Connect for authentication and OAuth 2.0 for authorization. Here’s how that process works: When Outlook connects to Exchange Online, the API requests are authorized using OAuth 2.0 Access Tokens. They are valid for one hour. When the tokens expire, the Outlook client is redirected back to Azure AD to refresh them. This provides an opportunity to re-evaluate policies for user access. If a user has been disabled in the directory or because of a Conditional Access policy, the admin might choose not to refresh the token.
Continuous Access Evaluation to the Rescue
While token refresh and expiry are a tried-and-true mechanism, it was not enough to reduce security risks and concern around the lag between when risk conditions change for a user and when policies can be enforced related to that change. This is where Continuous Access Evaluation (CAE) comes to the rescue.
Microsoft now leverages OpenID’s Continuous Access and Evaluation Protocol. This new approach to cybersecurity utilizes a user’s online footprint, collected through an exchange of security events and signals between Azure AD and Relying Parties (Resource Providers), to reauthorize or terminate access.
This provides significant improvements for security across Microsoft services.
This blog provides an overview of how using the CAE Protocol can help deliver Zero Trust to Microsoft services by providing signals and events as input to machine learning, addressing current challenges around continuous access to online resources.
A timely response to policy violations or security issues really requires a “conversation” between the token issuer - Azure and the relying party such as Exchange Online.
This two-way conversation gives us two important capabilities:
CAE is the mechanism for this conversation. Here’s how Azure AD’s converses with relying parties:
And Relying parties converse with Azure AD:
Because CAE security benefits were so great, Microsoft’s initial implementation was rolled out to Exchange, Teams and SharePoint (OneDrive) in April 2020. Initially, this feature was only for tenants with no Conditional Access policies.
A Deeper Dive on How CAE Works
In order to inform clients to bypass their cache even though the cached tokens have not expired, Microsoft introduced a mechanism called claim challenge to indicate the token was rejected, and required that a new access token be issued by Azure AD.
CAE requires a client update to understand the claim challenge. The latest versions of Outlook, Teams and Office on - Win, Mac, iOS, Android, support claim challenge. When the access token’s been revoked or the API detects an IP address change, a 401 status and a WWW-Authenticate header containing a Claims Challenge is sent from the API. The client application uses this information to acquire a new access token.
The app checks for:
When these conditions are met, the app extracts and decodes the claims challenge.
Token Lifetime
The second level of security CAE provides is through token lifetime changes. Because risk and policy are evaluated in real time, clients that negotiate continuous access evaluation aware sessions will rely on CAE instead of existing static access token lifetime policies. Since revocation is driven by critical events and policy evaluation, and not just an arbitrary time period, Token lifetime is increased to up to 28 hours in CAE sessions.
This change greatly increases the stability of applications without affecting security posture. In situations where Continuous Access Evaluation-capable clients are not being used the default access token lifetime will be 1 hour unless token refresh and session lifetimes have been configured. (Configurable token lifetimes will be going away Jan 2021, replaced by sign-in frequency in Conditional Access)
CAE is implemented by enabling Exchange Online, SharePoint Online, and Teams to subscribe to critical events in Azure AD so those events can be evaluated and enforced near real time. There are two scenarios that make up continuous access evaluation: Critical Event Evaluation and Conditional Access Policy Evaluation
Critical Event Evaluation
Critical Event Evaluation enables a scenario where users lose access to SharePoint files, Exchange email, calendar, or tasks, and Teams from Microsoft 365 client apps within minutes after one of these critical events.
User revocation event flow:
Conditional Access Policy Evaluation
In the second scenario for Conditional Access policy evaluation, Exchange and SharePoint are able to synchronize key Conditional Access policies so they can be evaluated within the service itself. This process enables the scenario where users lose access to SharePoint files, Exchange email, calendar, or tasks from Microsoft 365 client apps, Exchange Outlook on the web or SharePoint Online immediately after network location changes. Not all app and resource provider combinations are supported for this scenario.
For this scenario, imagine that a user leaves the company network and joins the guest network in the building’s public café area. All locations outside of corporate are blocked.
A Conditional Access Policy has been implemented to block all non-enterprise networks:
User condition change flow (Preview)
Azure AD reevaluates all the conditions and will deny access in this case.
Supported Services and Clients
CAE (Preview) for tenants with Conditional Access policies is now available for tenants as of October 2020.
Caveats
There are a few caveats worth noting.
CAE was a topic we covered at one of our Cloud Clinic sessions – a series of complimentary training webinars. In addition, my colleagues Jared Kennefick and Chris Beamon, have authored blogs on other topics including Azure Reserved Instances and Azure Sentinel to explain how these features work. I encourage you to check them out. We’ll be hosting more Cloud Clinics in 2021. Follow us on Twitter @Daymarksi to keep up with new topics and dates.