-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[Core] Support Continuous Access Evaluation #23635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I accidentally bumped into a scenario where silent re-auth works, without interactive re-auth: > az login
# Switch to a tenant 54826b22-38d6-4fb2-bad9-b7b93a3e9c5a where I am a guest
> az account set -s 0b1f6471-1bf0-4dda-aec3-cb9272f09590
# Revoke all sessions
> az rest -m POST -u https://graph.microsoft.com/v1.0/me/revokeSignInSessions
> az group list > $null
WARNING: Acquiring new access token silently for tenant 54826b22-38d6-4fb2-bad9-b7b93a3e9c5a with claims challenge: {"access_token":{"nbf":{"essential":true, "value":"1661243399"}}}I guess it is because I didn't revoke sessions in home tenant |
|
The implementation with |
| result = self.cmd('account get-access-token').get_output_in_json() | ||
| access_token = result['accessToken'] | ||
| decoded = decode_access_token(access_token) | ||
| self.assertEqual(decoded['xms_cc'], ['CP1']) # xms_cc: extension microsoft client capabilities |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems xms_ssm claims is dropped from GA version of CAE, so this test is no longer needed:
self.assertEqual(decoded['xms_ssm'], '1') # xms_ssm: extension microsoft smart session management
Description
Close #21296
Support Continuous Access Evaluation. For details of CAE, see
Testing Guide
az loginnow passesCP1client capability to MSAL and AAD eSTS server:Decode the retrieved access token at https://jwt.ms/ to verify it has
CP1inxms_cc:Revoke all sessions:
Retry calling ARM until failure:
Log in again with the returned claims challenge:
Additional information
However, as explained in #21296 (comment), according to AAD document:
https://docs.microsoft.com/en-us/azure/active-directory/develop/app-resilience-continuous-access-evaluation#the-code
claims challenge should be sent back to interactive re-auth. But Azure PowerShell cmdlet
Connect-AzAccountdoesn't expose-Claimsparameter, and everything still works as expected.We still need to decide whether Azure CLI wants to expose
--claimsinaz login.2022-08-33 Update
As discussed with Azure PowerShell, Azure CLI will not support
--claimsfor now until further required.Azure CLI will support
AZURE_IDENTITY_DISABLE_CP1to align with Azure PowerShell, .NET Azure Identity SDK and Python Azure Identity SDK.