8000 backport 53182 26.7 by stianst · Pull Request #53192 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion docs/guides/server/fips.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ When starting the server, you can check that the startup log contains `KC` provi

[source]
----
FIPS1402Provider created: KC(BCFIPS version 2.0102 Approved Mode, FIPS-JVM: enabled)
FIPS1402Provider created: KC(BCFIPS version 2.0103 Approved Mode, FIPS-JVM: enabled)
----

=== Cryptography restrictions in strict mode
Expand Down Expand Up @@ -294,3 +294,20 @@ see the https://access.redhat.com/documentation/en-us/red_hat_build_of_openjdk/2
You can check the {project_name} server log at startup to see if the correct security providers are used. TRACE logging should be enabled for crypto-related {project_name} packages as described in the Keycloak startup command earlier.

</@tmpl.guide>


== Troubleshooting

BouncyCastle FIPS requires TLS certificates with a Subject Alternative Name (SAN), with no fallback to using
the Common Name (CN) from the certificate. Due to an issue in older versions of BouncyCastle FIPS the fallback was
enabled by default, which is no longer the case.
Comment on lines +301 to +303

If you see an error such as `No hostname specified for HTTPS endpoint ID check` the recommended solution is to
update the certificates to include a Subject Alternative Name (SAN).

As an alternative temporary solution enable the Common Name (CN) fallback with:

[source, bash]
----
export JAVA_OPTS_APPEND="-Dorg.bouncycastle.jsse.hostname_check_cn_fallback=true"
----
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@
<!-- Versions used mostly for Undertow server, aligned with WildFly -->
<jboss.dmr.version>1.5.1.Final</jboss.dmr.version>

<bouncycastle.pkixfips.version>2.1.10</bouncycastle.pkixfips.version>
<bouncycastle.bcfips.version>2.1.2</bouncycastle.bcfips.version>
<bouncycastle.bctls-fips.version>2.1.22</bouncycastle.bctls-fips.version>
<bouncycastle.bcutilfips.version>2.1.5</bouncycastle.bcutilfips.version>
<bouncycastle.pkixfips.version>2.1.13</bouncycastle.pkixfips.version>
<bouncycastle.bcfips.version>2.1.3</bouncycastle.bcfips.version>
<bouncycastle.bctls-fips.version>2.1.25</bouncycastle.bctls-fips.version>
<bouncycastle.bcutilfips.version>2.1.8</bouncycastle.bcutilfips.version>

<dom4j.version>2.1.3</dom4j.version>
<h2.version>2.4.240</h2.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
@Tag(DistributionTest.SLOW)
public class FipsDistTest {

private static final String BCFIPS_VERSION = "BCFIPS version 2.0102";
private static final String BCFIPS_VERSION = "BCFIPS version 2.0103";

@Test
void testFipsNonApprovedMode(KeycloakRunner runner) {
Expand Down
Binary file modified tests/base/src/test/resources/keycloak-truststore.bcfks
Binary file not shown.
27 changes: 27 additions & 0 deletions tests/base/src/test/resources/keycloak-truststore.pem
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,30 @@ p4xNlwocSs+Fhjqsf6L5AvAc8fLP1206f/lp/9qEnvD0kocw2KvxwZY2yDtf115z
aHxhil32iWME340LVSYyQZqwPPr3N2t4CGZsgGs8vPXLECAGqrT3V2/I3iZNF3J5
i0GE63/1Q35BPHxPAJcqB/a5woBwo/Ae40u6qWR15keFp3UaJ0M/C9GR
-----END CERTIFICATE-----
Bag Attributes
friendlyName: localhost
localKeyID: 54 69 6D 65 20 31 37 39 30 32 36 36 31 34 31 37 37 35
subject=C=US, ST=MA, L=Westword, O=Red Hat, OU=Keycloak, CN=localhost
issuer=C=US, ST=MA, L=Westword, O=Red Hat, OU=Keycloak, CN=localhost
-----BEGIN CERTIFICATE-----
MIIDjzCCAnegAwIBAgIJALWqyptL7iHLMA0GCSqGSIb3DQEBDAUAMGYxCzAJBgNV
BAYTAlVTMQswCQYDVQQIEwJNQTERMA8GA1UEBxMIV2VzdHdvcmQxEDAOBgNVBAoT
B1JlZCBIYXQxETAPBgNVBAsTCEtleWN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jH8/F
YwGN
-----END CERTIFICATE-----
Binary file modified tests/base/src/test/resources/keycloak.bcfks
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
0