Skip to content

Conversation

@tsaarni
Copy link
Member

@tsaarni tsaarni commented Oct 6, 2023

This code is not part of upstream Keycloak.

This PR adds support to use x.509 client certificate authentication using SASL EXTERNAL with LDAP federation. It also adds support for hot-reload of LDAP client certificate and private key without restarting Keycloak by using Keystore SPI.

Following new provider configuration options are introduced for configuring LDAP client credentials:

Configure credentials as PEM files

--spi-keystore-default-ldap-certificate-file=CERTIFICATE_PEM_FILENAME
--spi-keystore-default-ldap-certificate-key-file=PRIVATE_KEY_PEM_FILENAME

or alternatively as keystore file

--spi-keystore-default-ldap-keystore-file=KEYSTORE_FILENAME
--spi-keystore-default-ldap-keystore-password=PASSWORD
--spi-keystore-default-ldap-keystore-type=TYPE (optional, defaults to "JKS" which in practise is able to load both JKS and PKCS12 keystore files)

The PR builds on top of #230.

This code is also in upstream PR keycloak#7365 but it is blocked until Keycloak can support certificate hot-reload with solution such as #230 or an alternative approach with similar capabilities.

@tsaarni tsaarni force-pushed the keystore-spi-ldap-sasl-external branch from d6b40fc to 56e98af Compare October 31, 2023 15:44
@tsaarni tsaarni mentioned this pull request Oct 31, 2023
justin-tay and others added 17 commits October 31, 2023 11:33
Bumps [rollup](https://github.com/rollup/rollup) from 4.1.5 to 4.2.0.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](rollup/rollup@v4.1.5...v4.2.0)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.8.9 to 20.8.10.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@tsaarni tsaarni force-pushed the keystore-spi-ldap-sasl-external branch from 56e98af to 392d1da Compare November 2, 2023 06:30
@tsaarni tsaarni force-pushed the keystore-spi-ldap-sasl-external branch from 392d1da to 4241521 Compare November 3, 2023 07:28
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.