Skip to content

Refactor ShadowAndroidSdkStorageEncryptionManager to use ISecretKeyProvider for key management, Fixes AB#3297746 #2326

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

Merged
merged 3 commits into from
Jul 4, 2025

Conversation

p3dr0rv
Copy link
Collaborator

@p3dr0rv p3dr0rv commented Jul 3, 2025

Copy link

github-actions bot commented Jul 3, 2025

❌ Work item link check failed. Description does not contain AB#{ID}.

Click here to Learn more.

@github-actions github-actions bot added the msal label Jul 3, 2025
@p3dr0rv p3dr0rv added the No-Changelog This change does not update the changelog. label Jul 3, 2025
Copy link

github-actions bot commented Jul 3, 2025

✅ Work item link check complete. Description contains link AB#3297746 to an Azure Boards work item.

Copy link

github-actions bot commented Jul 3, 2025

❌ Work item link check failed. Description contains AB#3297746 but the Bot could not link it to an Azure Boards work item.

Click here to learn more.

@github-actions github-actions bot changed the title Refactor ShadowAndroidSdkStorageEncryptionManager to use ISecretKeyProvider for key management Refactor ShadowAndroidSdkStorageEncryptionManager to use ISecretKeyProvider for key management, Fixes AB#3297746 Jul 3, 2025
@p3dr0rv p3dr0rv marked this pull request as ready for review July 3, 2025 22:56
@Copilot Copilot AI review requested due to automatic review settings July 3, 2025 22:56
@p3dr0rv p3dr0rv requested a review from a team as a code owner July 3, 2025 22:56
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Refactor the Robolectric shadow of AndroidAuthSdkStorageEncryptionManager to use the new ISecretKeyProvider interface for key handling.

  • Swap out AES256KeyLoader/PredefinedKeyLoader for ISecretKeyProvider/PredefinedKeyProvider
  • Rename methods and return types from getKeyLoader* to getKeyProvider*
  • Update imports to match the new interfaces
Comments suppressed due to low confidence (1)

msal/src/test/java/com/microsoft/identity/client/e2e/shadows/ShadowAndroidSdkStorageEncryptionManager.java:38

  • [nitpick] Consider renaming mUserDefinedKey to mUserDefinedKeyProvider to better reflect its type (ISecretKeyProvider) and improve readability.
    final ISecretKeyProvider mUserDefinedKey = new PredefinedKeyProvider("MOCK_ALIAS", encryptionKey);

@p3dr0rv p3dr0rv requested a review from a team as a code owner July 3, 2025 23:22
Copy link
Contributor

@mohitc1 mohitc1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@p3dr0rv p3dr0rv merged commit 8cc0c1a into dev Jul 4, 2025
13 of 14 checks passed
@p3dr0rv p3dr0rv deleted the pedroro/i-secret-key-provider branch July 4, 2025 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
msal No-Changelog This change does not update the changelog.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants