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

Armrest v0.1.3 CLI Auth is now not working anymore #3

Closed
RiddlerKnight opened this issue Sep 25, 2022 · 6 comments · Fixed by #5
Closed

Armrest v0.1.3 CLI Auth is now not working anymore #3

RiddlerKnight opened this issue Sep 25, 2022 · 6 comments · Fixed by #5
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@RiddlerKnight
Copy link

Reproduce:

az login -u xxx -p xxx     # output account detail in json
armrest auth               # output Unable to authenticate
armrest auth msi           # output Unable to authenticate
armrest auth cli           # output Unable to authenticate

Testing Environment:
os: wsl ubuntu 20.04
version: armrest v0.1.3

I'm a newbie in ruby. I try to debug with vscode on windows but It's quite difficult cuz there are some issue with devkit.

@tongueroo tongueroo added help wanted Extra attention is needed good first issue Good for newcomers labels Sep 25, 2022
@raquel11111
Copy link

Yes

@RiddlerKnight
Copy link
Author

According to ms doc, accessTokens.json is deprecated
https://learn.microsoft.com/en-us/cli/azure/msal-based-azure-cli

This line won't work anymore.

return unless File.exist?("#{ENV['HOME']}/.azure/accessTokens.json")

@tongueroo
Copy link
Collaborator

tongueroo commented Oct 2, 2022

Oh I see. That helps and explains it 👍 Can get rid of that line and check if the cli auth simply was able to return a token from the az account get-access-token call. Will take a look, but unsure when. Will also consider PRs. Thanks.

When you get a chance try

cd your-terraspace-project 
bundle info armrest

That’ll tell you where armrest is located. Then open up the file and comment out the line to test. On the road.

@tongueroo tongueroo changed the title Armrest v0.1.3 is now not working anymore. Armrest v0.1.3 CLI Auth is now not working anymore Oct 2, 2022
@tongueroo
Copy link
Collaborator

For posterity HTTPUnauthorized Community Post

@syepes
Copy link
Contributor

syepes commented Dec 20, 2023

Effectively this is the issue: https://learn.microsoft.com/en-us/cli/azure/msal-based-azure-cli#accesstokensjson-deprecation
If I user the cmd az account get-access-token I get the JSON

@syepes syepes mentioned this issue Dec 20, 2023
@syepes
Copy link
Contributor

syepes commented Dec 20, 2023

Looks like k.underscore is not working @tongueroo do you know whats going on?
https://github.com/boltops-tools/armrest/pull/4/files#diff-3d3be3f766e01cb6a2d4faaee6a692c7f674660ed85561542e1b57d3c7bc7086R24

Fixed in the last commit ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants