Skip to content

GlaSSLess FIPS implementation#51082

Draft
slaskawi wants to merge 2 commits into
keycloak:mainfrom
slaskawi:glassless
Draft

GlaSSLess FIPS implementation#51082
slaskawi wants to merge 2 commits into
keycloak:mainfrom
slaskawi:glassless

Conversation

@slaskawi

@slaskawi slaskawi commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

This Pull Request contains a prototype for introducing GlaSSLess FIPS provider into Keycloak codebase.

The glassless_report.md file contains detailed information how GlaSSLess is integrated.

How to play with it?

The easiest way to test this out is to use a pre-built Docker container and foloowing the guide below.

1. Pull the image

docker pull quay.io/sebastian_laskawiec/keycloak:glassless

2. Start Keycloak

The bootstrap password below is deliberately long enough for strict FIPS mode.

CONTAINER_ID=$(docker run --detach \
  --publish 8080:8080 \
  --env KC_BOOTSTRAP_ADMIN_USERNAME=admin \
  --env KC_BOOTSTRAP_ADMIN_PASSWORD=glasslessAdminPassword25 \
  quay.io/sebastian_laskawiec/keycloak:glassless \
  start --optimized \
  --features=fips \
  --fips-mode=strict \
  --fips-provider=glassless \
  --http-enabled=true \
  --hostname-strict=false)

echo "$CONTAINER_ID"

The image is already optimized with these FIPS settings. Supplying them explicitly at startup makes the selected mode and provider visible and verifies that the invocation matches the optimized image.

3. Wait for readiness

docker logs --follow "$CONTAINER_ID"

The important messages are:

GlasslessCryptoProvider created: KC(GlaSSLess version 0.13.0 [..., FIPS], FIPS mode: enabled, FIPS provider available: true)
Keycloak 999.0.0-SNAPSHOT on JVM ... started

Press Ctrl+C after the startup message. Then verify OpenID discovery:

curl --fail --silent --output /dev/null --write-out 'HTTP %{http_code}\n' \
  http://127.0.0.1:8080/realms/master/.well-known/openid-configuration

Expected result:

HTTP 200

The administration console is available at http://127.0.0.1:8080/admin/ using admin and glasslessAdminPassword25.

4. Request a token

curl --fail --silent \
  --request POST \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data client_id=admin-cli \
  --data username=admin \
  --data password=glasslessAdminPassword25 \
  --data grant_type=password \
  http://127.0.0.1:8080/realms/master/protocol/openid-connect/token

A successful response contains a three segment JWT access_token and "token_type":"Bearer".

5. Verify Glassless and OpenSSL FIPS status

docker exec "$CONTAINER_ID" \
  java --enable-native-access=ALL-UNNAMED \
  -jar /opt/keycloak/providers/glassless-provider-0.13.0.jar

Expected result:

Provider: GlaSSLess v0.13.0
FIPS Mode: ENABLED
FIPS Provider Available: true
OpenSSL FIPS Enabled: true
Hybrid Mode: DISABLED

Verify the persisted Keycloak provider selection:

docker exec "$CONTAINER_ID" /opt/keycloak/bin/kc.sh show-config

Expected configuration includes:

kc.fips-provider = glassless (Persisted)
kc.features = fips (Persisted)
kc.optimized = true (Persisted)

Signed-off-by: Sebastian Łaskawiec <sebastian.laskawiec@defenseunicorns.com>
@slaskawi

Copy link
Copy Markdown
Contributor Author

@codex review

@slaskawi
slaskawi marked this pull request as ready for review July 23, 2026 07:24
Copilot AI review requested due to automatic review settings July 23, 2026 07:24
@slaskawi
slaskawi requested review from a team as code owners July 23, 2026 07:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@slaskawi
slaskawi marked this pull request as draft July 23, 2026 07:24
Signed-off-by: Sebastian Łaskawiec <sebastian.laskawiec@defenseunicorns.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants