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

Add config property to specify a list of truststores #24148

Closed
shawkins opened this issue Oct 19, 2023 · 1 comment · Fixed by #24473
Closed

Add config property to specify a list of truststores #24148

shawkins opened this issue Oct 19, 2023 · 1 comment · Fixed by #24473
Labels
kind/enhancement Categorizes a PR related to an enhancement release/24.0.0
Milestone

Comments

@shawkins
Copy link
Contributor

shawkins commented Oct 19, 2023

Description

To support the work on #23742 there should be a option for specifying multiple truststores such that they will treated as a single logical truststore. It should likely extend to the java default truststore as well - with potentially an option to opt out.

Support will only for truststores which do not have a password.

Detailed Design:

  • Add a new security option --truststore-paths - it will accept both files and directories. Directories will be processed recursively to support the operator usecase of having multiple mounts under a single root directory. The files accepted will be .p12 / .pfx, otherwise they will be assumed to be pem files. A single merged truststore will be created from these files and the system default truststore. The javax.net.ssl properties will be updated at startup to reference the new merged store.
  • The spi-truststore will need to fallback to the system truststore when no file is specifically configured. This will pickup the truststore created by the --truststore-paths option for use by several existing logic paths in keycloak that expect the truststore to be provided by the spi-truststore. This will also allow for users to use the hostname verification property even without specifing the file.

Discussion

No response

Motivation

To simplify the user experience around truststores.

Details

Ideally the implementation should allow for automatic reloading of the certs to satify #10654

@shawkins shawkins added kind/enhancement Categorizes a PR related to an enhancement status/triage labels Oct 19, 2023
@shawkins
Copy link
Contributor Author

shawkins commented Oct 23, 2023

A related effort in quarkus - quarkusio/quarkus#17038 - that unfortunately did not progress.

quarkusio/quarkus#20594 - matches the intent of issue almost exactly. This also did not progress.

Some related considerations if/when native is in the picture (at least for the javax property truststore): https://quarkus.io/guides/native-and-ssl https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/CertificateManagement/

shawkins added a commit to shawkins/keycloak that referenced this issue Nov 29, 2023
closes keycloak#24148

Signed-off-by: Steve Hawkins <shawkins@redhat.com>

Co-authored-by: Václav Muzikář <vaclav@muzikari.cz>
Co-authored-by: Martin Bartoš <mabartos@redhat.com>
@ghost ghost removed the status/triage label Nov 30, 2023
vmuzikar added a commit that referenced this issue Nov 30, 2023
closes #24148

Co-authored-by: Václav Muzikář <vaclav@muzikari.cz>
Co-authored-by: Martin Bartoš <mabartos@redhat.com>
ShefeeqPM pushed a commit to ShefeeqPM/keycloak that referenced this issue Jan 27, 2024
closes keycloak#24148

Co-authored-by: Václav Muzikář <vaclav@muzikari.cz>
Co-authored-by: Martin Bartoš <mabartos@redhat.com>
Signed-off-by: ShefeeqPM <86718986+ShefeeqPM@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Categorizes a PR related to an enhancement release/24.0.0
Projects
None yet
2 participants