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

[Identity] [External] Availability of MSAL cache plugins #14381

Closed
sadasant opened this issue Mar 19, 2021 · 6 comments
Closed

[Identity] [External] Availability of MSAL cache plugins #14381

sadasant opened this issue Mar 19, 2021 · 6 comments
Assignees
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library. tracking-external-issue

Comments

@sadasant
Copy link
Contributor

sadasant commented Mar 19, 2021

As part of #14064, I'm determining whether a MSAL cache plugin is available by attempting a read. If the read throws, I fall back to storing the cache in a plain file, if the user has allowed this to be a possibility.

In .Net however, their cache plugins provide a specific method to confirm whether the persistence plugin is available. They call it VerifyPersistence and can be seen here: https://github.com/AzureAD/microsoft-authentication-extensions-for-dotnet/blob/master/docs/keyring_fallback_proposal.md

The MSAL team is aware of this suggestion. This issue is to track whether the MSAL team decides to implement this, and if so, to clean up our code.

External issue: AzureAD/microsoft-authentication-library-for-js#3335

@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Mar 19, 2021
@sadasant sadasant self-assigned this Mar 19, 2021
@sadasant sadasant added Azure.Identity Client This issue points to a problem in the data-plane of the library. and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Mar 19, 2021
@sadasant sadasant added this to the [2021] April milestone Mar 19, 2021
@sadasant
Copy link
Contributor Author

@sadasant
Copy link
Contributor Author

sadasant commented Jun 2, 2021

Moved to July Milestone, since MSAL hasn’t released these changes.

@sadasant sadasant modified the milestones: [2021] June, [2021] July Jun 2, 2021
@sadasant
Copy link
Contributor Author

I tried using MSAL’s solution, but I’m finding one issue. I’ve reported it to the MSAL team:

Regarding the verify persistence feature: AzureAD/microsoft-authentication-library-for-js@b6c2f67#diff-60b5051ec55723d810adab4252c24ed915131c5988e041932b038fa2a366fb2b

More specifically, I’m using @azure/msal-node-extensions@1.0.0-alpha.7

When using this code from a Linux machine without UX nor X11, after the cache is verified as available, saving into the cache causes the error. I am not sure why, but it is not catching the following error: GnomeKeyringError: Cannot autolaunch D-Bus without X11 $DISPLAY

The code I’m using:

const persistence = await LibSecretPersistence.create(persistencePath, service, account);
const validator = await persistence.createForPersistenceValidation();
console.log("VERIFY", await validator.verifyPersistence()); // this logs true
await persistence.save("{}"); // this causes the error

Meaning that the persistence appears to be available even though saving triggers the GnomeKeyringError.

@sadasant
Copy link
Contributor Author

I’ve made a PR showcasing a change that does the fix for me: AzureAD/microsoft-authentication-library-for-js#3787

In the mean time, I’ll push this to the next milestone.

@sadasant
Copy link
Contributor Author

Moving this to the backlog since it doesn’t add any functional benefit to our users and we won’t have time to get to it.

@sadasant sadasant removed their assignment May 9, 2022
Copy link

Hi @sadasant, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 18, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 18, 2024
@xirzec xirzec removed this from the Backlog milestone May 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library. tracking-external-issue
Projects
None yet
Development

No branches or pull requests

3 participants