wso2 / wso2/cipher-tool

Custom key store not detected in a plain, unused product pack

Open
#68 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type/Bug
Dominant language
Java
Stars
41
Forks
92
PR merge metrics
No merged PRs in 30d

Description

Description:
When using custom key stores (not with the default wso2carbon.jks file name) for the secret encryption process (using -Dconfigure option), the Cipher tool overrides the key store configurations set in the <PRODUCT_HOME>/repository/conf/security/secret-conf.properties file using the configurations set in the <PRODUCT_HOME>/repository/conf/carbon.xml at the given time.

Thus, any custom key store location path set in the <PRODUCT_HOME>/repository/conf/security/secret-conf.properties in a fresh pack which has not been used before fails, as the initial application of customized key store configurations set in the <PRODUCT_HOME>/repository/conf/deployment.toml to the <PRODUCT_HOME>/repository/conf/carbon.xml happens during the initial execution of the server startup script for the product.

Current workaround:

  • Set the custom key store configurations in the product's main configuration file <PRODUCT_HOME>/repository/conf/deployment.toml
  • Add the custom key stores to the <PRODUCT_HOME>/repository/resources/security directory
  • Execute the product server startup script
  • Set the secrets in the <PRODUCT_HOME>/repository/conf/deployment.toml file
  • Encrypt the secrets using the Cipher tool

Used Product and Version:
WSO2 Identity Server version 5.11.0 Release Candidate 1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Cipher tool's handling of repository/conf/security/secret-conf.properties and repository/conf/carbon.xml when -Dconfigure is used. Compare this with the initial startup processing of repository/conf/deployment.toml and the resources/security directory. Done means a custom key store in a fresh, unused product pack is detected without the listed startup workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.