keycloak / keycloak

Open Source Identity and Access Management For Modern Applications and Services
https://www.keycloak.org
Apache License 2.0
23.29k stars 6.75k forks source link

[Documentation] - Configuring trusted certificates - Fully specify truststore path #32110

Closed horvaro closed 2 weeks ago

horvaro commented 2 months ago

Description

The doc page about configuring trusted certificates left me a bit confused.
https://github.com/keycloak/keycloak/blob/main/docs/guides/server/keycloak-truststore.adoc

The path to the truststore is mentioned but only partially.

[...] they can be included in the conf/truststores directory [...]

After some research, I found the Dockerfile for Keycloak and saw, that most of the files are in /opt/keycloak. This might seem obvious to you all in this project, but for someone who just uses/integrates Keycloak into their systems, it is not obvious where all these files are stored.

It would be nice, if this path in the mentioned doc page, or any other relative path in the docs, might get updated to its absolute path counterpart.

ahus1 commented 2 months ago

@shawkins - fyi.

shawkins commented 2 months ago

@horvaro it's intentional to use only relative paths as the install location for keycloak may change. In some places we may say something like \<keycloak home>/conf/... Is that what you'd like to see, and/or was it not obvious to what the installation location was?

horvaro commented 2 months ago

for me it was not obvious that the folder conf/truststores is inside the installation location. Besides that, yes, for me it was not clear what the installation location was.

shawkins commented 2 months ago

Double checking, nearly all of the references to the conf dir in the docs (caching, truststores, configuration, etc.) don't prefix with \<keycloak home>. Only when it's referenced in an example where it's targeted by copy operation or similar does it include a root prefix.

So we'd need to update more than just the truststore docs, or we should leave the relative paths alone if that is the desired convention - cc @andymunro

As for the installation location it seems like that could be highlighted in one or more of the getting starting guides dealing with Docker / container platforms. @horvaro where did you try to find that information from initially?

horvaro commented 2 months ago

I started on the "Getting started" pages.
Looking up the Guide for Kubernetes, I still did not find any clue where the main/home/install folder is. Next step was to double check the Server Guide "Configuring trusted certificates", checking if I missed something.
Next I checked the OpenShift and Docker Guides, still leaving me without the information about the home directory.
At last i checked the Guide "Running Keycloak in a container" which i skipped previously, because it started with "Creating a customized and optimized container image" which I was not interested in. But reading further than that title, I came across the Dockerfile in that page, which contained WORKDIR /opt/keycloak which finally lead me to the hopefully correct directory.

shawkins commented 2 months ago

Sounds like we need a new getting started guide should be added that is an overview of the installation directories with links to how they are used. It would also mention that the image and most Docker examples default to /opt/keycloak as the install root.

I'll leave it up to @andymunro if a separate issue is needed about clarifying the relative paths used in various places in the docs.

~priority-low