-
Notifications
You must be signed in to change notification settings - Fork 198
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
Move "current-user" settings out of config.json
#2071
Conversation
Previously, the identity of currently logged in user (either the home account id, when logged in as a user, or the client and tenant id when logged in as a service principal) as stored in user's `config.json`. A downside of storing this information in `config.json` is that when a user did `azd config reset`, it would "log out" the current user, which is very surprising behavior. In addition, anyone looking at `config.json` would see properties that were much more like state of the auth subsystem instead of actual config values that a user would want to change. So, this change moves this information out of `config.json` and instead stores it in `auth.json` (a new file) which is also stored in `~/.azd`. On first use, we'll migrate the relevent properties from `config.json` into `auth.json`. Fixes Azure#1721
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.
LGTM. Minor comments about the persistence logic, but they can be addressed rather easily if applicable.
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash:
pwsh:
WindowsPowerShell install
MSI install
Standalone Binary
MSIContainer
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference (preview)
|
Previously, the identity of currently logged in user (either the home account id, when logged in as a user, or the client and tenant id when logged in as a service principal) as stored in user's
config.json
.A downside of storing this information in
config.json
is that when a user didazd config reset
, it would "log out" the current user, which is very surprising behavior. In addition, anyone looking atconfig.json
would see properties that were much more like state of the auth subsystem instead of actual config values that a user would want to change.So, this change moves this information out of
config.json
and instead stores it inauth.json
(a new file) which is also stored in~/.azd
.On first use, we'll migrate the relevent properties from
config.json
intoauth.json
.Fixes #1721