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

Patch Key alias migration for Secure Credentials Manager #325

Merged
merged 3 commits into from
Aug 4, 2020

Conversation

lbalmaceda
Copy link
Contributor

@lbalmaceda lbalmaceda commented Aug 3, 2020

Changes

We recently shipped a change that affected how the generated KeyStore keys were stored to avoid collisions with other Auth0 enabled android apps. The anticipated impact was that the end-users would be required to log in back again since existing keys under the old alias would not be found.

The hasValidCredentials method however, was not aware of this key alias change being introduced and so, was still reporting "valid credentials" for the old alias, making the call to getCredentials() fail passing the exception in the error callback.

This PR attempts to fix that by storing the key alias string that is used when saving the credentials, and adding that check when calling hasValidCredentials().

References

Testing

I've added some tests for migration scenarios (e.g. key not set / key set with a value different than expected)

  • This change adds unit test coverage

  • This change adds integration test coverage

  • This change has been tested on the latest version of the platform/language or why not

Checklist

@lbalmaceda lbalmaceda added CH: Fixed small Small review labels Aug 3, 2020
@lbalmaceda lbalmaceda added this to the v1-Next milestone Aug 3, 2020
@lbalmaceda lbalmaceda requested a review from a team August 3, 2020 19:57
@jimmyjames jimmyjames requested review from jimmyjames and removed request for a team August 4, 2020 14:48
@lbalmaceda lbalmaceda merged commit bad61f1 into master Aug 4, 2020
@lbalmaceda lbalmaceda deleted the patch-sec-cm branch August 4, 2020 17:05
@lbalmaceda lbalmaceda modified the milestones: v1-Next, 1.24.1 Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CH: Fixed small Small review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Credentials lost after update
2 participants