mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Valery Kharseko
6 hours ago 0db6a25e6bba295ce7ed840c2da08e8012d72384
refs
author Valery Kharseko <vharseko@3a-systems.ru>
Saturday, November 21, 2026 15:13 +0100
committer GitHub <noreply@github.com>
Saturday, November 21, 2026 15:13 +0100
commit0db6a25e6bba295ce7ed840c2da08e8012d72384
tree 31767cc63388d75ae3559b63d02cb9bd6ceec79a tree | zip | gz
parent c88f9abb38f0a17db2aaa71030756276cc23e404 view | diff
[#1307] Load the Docker administration certificate from a mounted Secret (#1308)

## Summary

- Load the administration keystore and PIN from `SECRET_VOLUME` on fresh
and reused volumes and during periodic refresh. Open the JKS or PKCS12
store with the default administration provider's loader and key manager
factory to check key recovery with the supplied PIN. Verify that the
selected `admin-cert` key can sign and matches its certificate. For
RSA-PSS, require the pair to sign and verify using a JSSE TLS scheme
with SHA-256, SHA-384, or SHA-512. Require the private key and
certificate to use the same algorithm and honor the certificate's Key
Usage and Extended Key Usage for TLS server authentication. Auxiliary
keys can use key agreement algorithms. A zero-byte PIN file is rejected,
and an empty first line supplies an empty password.
- Preserve the installed pair when validation fails or the
administration certificate nickname or key manager is customized.
Validate intact pending pairs and recheck the configuration and queued
changes immediately before installation. Move rejected pairs out of the
pending directory before cleanup. If the keystore has already moved,
finish installing its PIN on restart without the Secret mount, including
when configuration changes are queued.
- Document cert-manager 1.15+ with matching CRDs, a single-line ASCII
password for the JKS example, password rotation, the separate
`admin-truststore` password, and the BuildKit requirement. Show the
endpoint certificate's DNS SANs in the troubleshooting guide.

## Verification

- All 20 Docker administration TLS scenarios passed on both the standard
and Alpine images from the previous round with the updated validator.
The local runs used `-XX:ActiveProcessorCount=2` and a shorter
health-check interval. The tests check the served certificate serial on
port 4444 and confirm that `dsconfig` succeeds with CA trust and
hostname verification.
- An RSA-PSS pair with different private- and public-key minimum salt
lengths replaces the installed certificate and completes CA- and
hostname-verified TLS 1.2 and 1.3. A pair that matches no JSSE TLS
scheme leaves the installed certificate in service during mounted Secret
updates and intact pending recovery.
- The installed certificate stays usable when an `admin-cert` key that
cannot sign arrives through the Secret mount or is recovered from an
intact pending directory. The tests also preserve the installed
certificate when a mounted pair has a certificate that disallows digital
signatures, a client-only certificate, or mismatched RSA and RSA-PSS key
types. The auxiliary X25519 scenario still succeeds, and PIN-only
recovery succeeds with a queued configuration change and no Secret
mount.
- The validator and the JKS fixture generator compiled with `javac
--release 11`. The Maven Docker package contains the updated validator
source and entrypoint. Shell syntax and `git diff --check` passed.

Fixes #1307
8 files modified
3 files added
883 ■■■■■ changed files
.github/scripts/ReencodeAdminSecretKey.java 66 ●●●●● diff | view | raw | blame | history
.github/scripts/docker-test-admin-certificate.sh 354 ●●●●● diff | view | raw | blame | history
.github/workflows/build.yml 5 ●●●●● diff | view | raw | blame | history
opendj-doc-generated-ref/src/main/asciidoc/admin-guide/chap-change-certs.adoc 18 ●●●●● diff | view | raw | blame | history
opendj-doc-generated-ref/src/main/asciidoc/admin-guide/chap-troubleshooting.adoc 26 ●●●●● diff | view | raw | blame | history
opendj-packages/opendj-docker/AdminSecretValidator.java 178 ●●●●● diff | view | raw | blame | history
opendj-packages/opendj-docker/Dockerfile 6 ●●●●● diff | view | raw | blame | history
opendj-packages/opendj-docker/Dockerfile-alpine 6 ●●●●● diff | view | raw | blame | history
opendj-packages/opendj-docker/README.md 95 ●●●●● diff | view | raw | blame | history
opendj-packages/opendj-docker/pom.xml 1 ●●●●● diff | view | raw | blame | history
opendj-packages/opendj-docker/run.sh 128 ●●●●● diff | view | raw | blame | history