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

Public API LoadFirstValidCredentialsAsync still loads skipped credentials #3022

Open
bgavrilMS opened this issue Sep 19, 2024 · 3 comments
Open
Assignees
Labels
bug Something isn't working P2

Comments

@bgavrilMS
Copy link
Member

bgavrilMS commented Sep 19, 2024

Microsoft.Identity.Web Library

Microsoft.Identity.Web

Microsoft.Identity.Web version

3.10.0

Web app

Not Applicable

Web API

Not Applicable

Token cache serialization

Not Applicable

Description

  1. Create a list of CredentialDescription with 2 credentials, and mark the first one with SKIP=true;
  2. Call the public API LoadFirstValidCredentialsAsync(list)

Actual: it loads the first credential, and then it doesn't use it
Expected: do not load the first credential and do not use it.

Reproduction steps

^^

Error message

No response

Id Web logs

No response

Relevant code snippets

CredentialDescription[] credentialDescriptions = new[]
{
    new CredentialDescription
    {
        SourceType = CredentialSource.SignedAssertionFromManagedIdentity,
        Skip = true
    },

    new CredentialDescription
    {
        SourceType = CredentialSource.KeyVault,
        KeyVaultUrl = "https://bogus.net",
        KeyVaultCertificateName = "Self-Signed-5-5-22"
    }
};
await DefaultCredentialLoader.LoadFirstValidCredentialsAsync(credentialDescriptions );


// Actual: credential1 (managed identity) is still attempted.

Regression

No response

Expected behavior

don't load skipped creds

@jmprieur
Copy link
Collaborator

Is it a regression?

@jennyf19
Copy link
Collaborator

Are you expecting my team to pick this up?

@bgavrilMS
Copy link
Member Author

Good first issue for someone from MSAL team to pick up.

@bgavrilMS bgavrilMS self-assigned this Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2
Projects
None yet
Development

No branches or pull requests

3 participants