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

Remove redundant auth error content #23407

Merged
merged 7 commits into from
Sep 6, 2024
Merged

Remove redundant auth error content #23407

merged 7 commits into from
Sep 6, 2024

Conversation

chlowell
Copy link
Member

@chlowell chlowell commented Sep 5, 2024

ChainedTokenCredential errors

Before

DefaultAzureCredential authentication failed. failed to acquire a token.
Attempted credentials:
        EnvironmentCredential: missing environment variable AZURE_TENANT_ID
        WorkloadIdentityCredential: no client ID specified. Check pod configuration or set ClientID in the options
        ManagedIdentityCredential authentication failed. ManagedIdentityCredential authentication failed. authentication failed
GET http://169.254.169.254/metadata/identity/oauth2/token
--------------------------------------------------------------------------------
RESPONSE 401 Unauthorized
--------------------------------------------------------------------------------
{
  "error": "unauthorized"
}
--------------------------------------------------------------------------------
To troubleshoot, visit https://aka.ms/azsdk/go/identity/troubleshoot#managed-id
GET http://169.254.169.254/metadata/identity/oauth2/token
--------------------------------------------------------------------------------
RESPONSE 401 Unauthorized
--------------------------------------------------------------------------------
{
  "error": "unauthorized"
}
--------------------------------------------------------------------------------
To troubleshoot, visit https://aka.ms/azsdk/go/identity/troubleshoot#managed-id
GET http://169.254.169.254/metadata/identity/oauth2/token
--------------------------------------------------------------------------------
RESPONSE 401 Unauthorized
--------------------------------------------------------------------------------
{
  "error": "unauthorized"
}
--------------------------------------------------------------------------------

After

DefaultAzureCredential: failed to acquire a token.
Attempted credentials:
        EnvironmentCredential: missing environment variable AZURE_TENANT_ID
        WorkloadIdentityCredential: no client ID specified. Check pod configuration or set ClientID in the options
        ManagedIdentityCredential authentication failed.
                GET http://169.254.169.254/metadata/identity/oauth2/token
                --------------------------------------------------------------------------------
                RESPONSE 401 Unauthorized
                --------------------------------------------------------------------------------
                {
                  "error": "unauthorized"
                }
                --------------------------------------------------------------------------------
                To troubleshoot, visit https://aka.ms/azsdk/go/identity/troubleshoot#managed-id

Lone credentials built on MSAL

Before

ClientSecretCredential authentication failed. FromClientSecret(): http call(https://login.microsoftonline.com/fake-tenant/oauth2/v2.0/token)(POST) error: reply status code was 418:
no tokens here
Request information not available
--------------------------------------------------------------------------------
RESPONSE I'm a teapot
--------------------------------------------------------------------------------
no tokens here
--------------------------------------------------------------------------------
To troubleshoot, visit https://aka.ms/azsdk/go/identity/troubleshoot#client-secret

After

ClientSecretCredential authentication failed.
Request information not available
--------------------------------------------------------------------------------
RESPONSE 418: I'm a teapot
--------------------------------------------------------------------------------
no tokens here
--------------------------------------------------------------------------------
To troubleshoot, visit https://aka.ms/azsdk/go/identity/troubleshoot#client-secret

@jhendrixMSFT
Copy link
Member

Looks way better!

@chlowell chlowell enabled auto-merge (squash) September 6, 2024 20:27
@chlowell chlowell merged commit 09f842c into Azure:main Sep 6, 2024
14 checks passed
@chlowell chlowell deleted the errors branch September 6, 2024 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

3 participants