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

az login with SP #9282

Closed
Sas002 opened this issue May 2, 2019 · 4 comments
Closed

az login with SP #9282

Sas002 opened this issue May 2, 2019 · 4 comments
Assignees
Labels
Account az login/account

Comments

@Sas002
Copy link

Sas002 commented May 2, 2019

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@Sas002
Copy link
Author

Sas002 commented May 2, 2019

I am trying use az login with SP . I am using on Suse Linux using export . Problem is az vm list or any az command is not working unless, I authenticate with az login --service-principal -u $AZURE_CLIENT_ID -p $AZURE_CLIENT_SECRET --tenant $AZURE_TENANT_ID

Which is fine but after az login , it is generating .azure/accessTokens.json on home directory and SP credential information are on clear text , which is a big risk for security.

How it should work : After export , az login should work but without generating any .azure/accessTokens.json in clear text. Same login concept is working for AWS . When aws credentials are export then just aws s3 ls or similar command work without generating Key and secret in clear text.

Example:

export AZURE_CLIENT_ID=xxxxxxx
export AZURE_CLIENT_SECRET=xxxxxxx
export AZURE_TENANT_ID=xxxxxxx
export AZURE_SUBSCRIPTION_ID=xxxxxx
az login --service-principal -u $AZURE_CLIENT_ID -p $AZURE_CLIENT_SECRET --tenant $AZURE_TENANT_ID
az vm list

@yugangw-msft
Copy link
Contributor

yugangw-msft commented May 3, 2019

Thanks @Sas002 for the feedback. Right now this is by-design. Also ~/.azure is being ACL'd correctly for protection. For record, AWS also saves secret in plain text, or if that been changed, please let me know.
For secret free solution, I very much suggest you go with the managed service identity
Any questions/suggestion, let us know

@yugangw-msft yugangw-msft added the Account az login/account label May 3, 2019
@yugangw-msft
Copy link
Contributor

Closing as we don't have outstanding bugs

@jiasli
Copy link
Member

jiasli commented Mar 23, 2020

Let's discuss this further in #10241.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Account az login/account
Projects
None yet
Development

No branches or pull requests

4 participants