8000 Document PKIX path building failed error in truststore guide by kfaseela · Pull Request #55786 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content
Open
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
18 changes: 18 additions & 0 deletions docs/guides/server/keycloak-truststore.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<#import "/templates/guide.adoc" as tmpl>
<#import "/templates/kc.adoc" as kc>
<#import "/templates/links.adoc" as links>

<@tmpl.guide
title="Configuring trusted certificates"
Expand Down Expand Up @@ -56,4 +57,21 @@ You may refine how hostnames are verified by TLS connections with the `tls-hostn
+
Please note that this setting does not apply to LDAP secure connections, which require strict hostname checking.

== Troubleshooting

If {project_name}, or an application connecting to it, logs the following error:

[source,text]
----
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
----

the TLS client could not build a valid certificate chain from the server's certificate to a trusted certificate authority. Common causes include a missing trusted certificate authority or missing intermediate certificates. Check the certificate chain that the server presents, including any intermediate certificates. If intermediates are missing, fix the server configuration, or, if you do not control the server, add the intermediate certificate to the client's truststore.

If the chain is complete, also check certificate validity dates and the JVM's algorithm constraints. If the certificate authority is not trusted, make sure the appropriate certificate is added to the truststore that the failing connection actually uses and that the truststore is loaded:

* {project_name} connecting to an external service, such as an identity provider: add the certificate or its certificate authority to the {project_name} truststore, as described in <<Configuring the System Truststore>>. See also <@links.server id="outgoinghttp"/>.
* {project_name} connecting to its database: update the trust source set by the `db-tls-*` options or by TLS properties in `db-url` or `db-url-properties`, otherwise usually the {project_name} truststore. See <@links.server id="db"/>.
* An application connecting to {project_name}: update the application's own truststore, not the {project_name} truststore. If TLS terminates at a proxy or ingress in front of {project_name}, that is the server whose certificate chain the application validates.

</@tmpl.guide>
Loading
0