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

Move keystore persistence manager implementations to org.wso2.carbon.utils component #4143

Merged

Conversation

UdeshAthukorala
Copy link

@UdeshAthukorala UdeshAthukorala commented Dec 12, 2024

Purpose

Move keystore persistence manager implementations to org.wso2.carbon.utils component

Details

This pull request includes significant changes to the key store management system, focusing on improving security and modularizing the code. The primary changes involve updating the KeyStoreManager class, refactoring the KeyStorePersistenceManager interface, and modifying the pom.xml files to reflect these updates.

Key Store Management Improvements:

  • Refactored the KeyStoreManager class to use KeyStoreModel for key store operations, enhancing security by encrypting and decrypting passwords. [1] [2] [3] [4] [5] [6] [7]
  • Added encryption and decryption methods for passwords in KeyStoreManager to ensure sensitive data is securely handled.

Code Refactoring:

  • Renamed and moved the KeyStorePersistenceManager interface to a new package, org.wso2.carbon.keystore.persistence, and updated its methods to use KeyStoreModel. [1] [2] [3] [4] [5]
  • Updated package imports and removed unused imports in KeyStoreManager.java to reflect the new structure.

Dependency and Configuration Updates:

  • Modified pom.xml files to update package exports and dependencies, ensuring the new package structure is correctly referenced. [1] [2]

Testing and Data Holder Updates:

  • Updated test setup in KeyStoreManagerTest.java to use OSGiDataHolder instead of CarbonCoreDataHolder. [1] [2]

New Constants Class:

  • Added a new PersistenceManagerConstants class to centralize constants used in the persistence manager.

@@ -256,6 +256,7 @@
<Export-Package>
!org.wso2.carbon.utils.resolver,
org.wso2.carbon,
org.wso2.carbon.keystore.persistence.*;
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets make only the interfaces as exposed, keeping the Registry impl internal.

Copy link
Author

Choose a reason for hiding this comment

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

Will change this with the next PR when introducing KeyStorePersistenceManagerFactory

darshanasbg
darshanasbg previously approved these changes Dec 12, 2024
@jenkins-is-staging
Copy link

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/12301531944

darshanasbg
darshanasbg previously approved these changes Dec 12, 2024
@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/12301531944
Status: success

Copy link

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

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

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/12301531944

@UdeshAthukorala UdeshAthukorala merged commit 7f760ec into wso2:4.10.x Dec 12, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants