Skip to content

Add custom keystore support to JWT basic authenticator #228

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

Conversation

DilshanSenarath
Copy link
Contributor

@DilshanSenarath DilshanSenarath commented Apr 19, 2025

Purpose

This PR introduces the necessary changes to support configuring a custom keystore for the OAuth protocol. It updates all relevant areas where keystores are used. If a custom keystore is not configured, the system will fall back to the default primary or tenanted keystore.

The main changes include:

  • When the KeyStoreManager was previously used to resolve keystore keys, it is now replaced with the IdentityKeyStoreResolver, which dynamically selects the appropriate keystore—custom, primary, or tenanted.

To configure a custom keystore for OAuth, use the following TOML configuration:

[[keystore.custom]]
file_name = "custom.p12"
password = "password"
type = "PKCS12"
alias = "myOrgCert"
key_password = "password"

[keystore.mapping.oauth]
keystore_file_name = "custom.p12"
use_in_all_tenants = true

Related Issue

@DilshanSenarath DilshanSenarath marked this pull request as draft April 19, 2025 19:15
@DilshanSenarath DilshanSenarath marked this pull request as ready for review April 23, 2025 05:32
@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/14744666267
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/14744666267

@DilshanSenarath DilshanSenarath merged commit bdf78f8 into wso2-extensions:master Apr 30, 2025
2 checks 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