Skip to content
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

AzIdentity with Cache - logout? #23499

Open
DariuszPorowski opened this issue Sep 25, 2024 · 7 comments
Open

AzIdentity with Cache - logout? #23499

DariuszPorowski opened this issue Sep 25, 2024 · 7 comments
Assignees
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-author-feedback Workflow: More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@DariuszPorowski
Copy link

Hi there

I am trying caching (1.8.0-beta.3) for user context authentication - so far looks good. But I wonder how to do "logout"?
I assume that simply deleting the cache file does not solve the problem (it only contains user metadata) and the rest is in the encryption facility. So how to do "logout" and remove stuff from the encryption facility according to the user's operating system?

@github-actions github-actions bot added Azure.Identity Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Sep 25, 2024
Copy link

Thank you for your feedback. Tagging and routing to the team member best able to assist.

@chlowell
Copy link
Member

Neither azidentity nor its underlying cache implementation has an API for logging users in or out because applications decide whether a user is logged in or not. azidentity only authenticates users, and the cache is just a simple data store; neither has a concept of a "logged in" user. azidentity does require an AuthenticationRecord to access persisted user data, so at the application level "logging in" means authenticating a user and storing an AuthenticationRecord, and "logging out" means deleting deleting it.

Is it important for your application to actually delete cached data when a user logs out?

@chlowell chlowell added needs-author-feedback Workflow: More information is needed from author to address the issue. and removed needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team labels Sep 26, 2024
Copy link

Hi @DariuszPorowski. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

@DariuszPorowski
Copy link
Author

Hi @chlowell, everything regarding AzIdentity being stateless is understood. Let me outline the scenario.

I have a CLI tool named mytool. When I execute mytool login, it uses azidentity for authentication and creates a state with the AzIdenity Cache (AuthenticationRecord) to avoid re-authentication on subsequent executions. Now, I wish to remove my authentication state by calling mytool logout. While it is straightforward to delete the file containing user metadata - which theoretically logs me out - AzIdenity Cache uses encryption facility to store sensitive data. Therefore, I need to ensure that mytool also clears this.

@github-actions github-actions bot added needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team and removed needs-author-feedback Workflow: More information is needed from author to address the issue. labels Sep 26, 2024
@chlowell
Copy link
Member

Why do you need to delete the data? Sure, it's sensitive, but it's encrypted and the OS protects it from other users.

@chlowell chlowell added needs-author-feedback Workflow: More information is needed from author to address the issue. and removed needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team labels Sep 26, 2024
Copy link

Hi @DariuszPorowski. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

Copy link

github-actions bot commented Oct 3, 2024

Hi @DariuszPorowski, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

@github-actions github-actions bot added the no-recent-activity There has been no recent activity on this issue. label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-author-feedback Workflow: More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
Status: Untriaged
Development

No branches or pull requests

2 participants