Developer Blog

Tipps und Tricks für Entwickler und IT-Interessierte

Keycloak | Cookbook

Thymeleaf

Add css file

Add css files from static folder into templates files

<link href="../static/lib/bootstrap/current/bootstrap.min.css" th:href="@{/lib/bootstrap/current/bootstrap.min.css}" rel="stylesheet" />

Keycloak | Troubleshooting

Configuration

Change Server Port

By default, executing standalone.sh (for Linux) / standalone.bat (for Windows) makes the server available at following urls:

https://localhost:8443/auth/
http://localhost:8080/auth/

If we need to run multiple instance of server at different ports, run the following command:

For Linux:

standalone.sh -Djboss.socket.binding.port-offset=100

For Windows:

standalone.bat -Djboss.socket.binding.port-offset=100

The above commands will add the offset of 100 to the defaults ports available for Keycloak server.

For example, previously the ports where 8443 and 8000. Now the new ports become 8443 + 100 = 8543 and 8080 + 100 = 8180.

References:

https://www.keycloak.org/docs/3.2/getting_started/topics/secure-jboss-app/before.html

Location of Server Logfile

\standalone\log

Errors

Client secret not provided in request

{"error":"unauthorized_client","error_description":"Client secret not provided in request"

Possible Solution

Change Access Type to public

Keycloak - Set Access Type to PUBLIC

Additional Readings

Keycloak | Getting Started

Introduction

Keycloak – Open Source Identity and Access Management for Modern Applications and Services

Installation

Java

Using AdoptOpenJDK8

brew info adoptopenjdk8

Eclipse

Keycloak

WildFly

See Also

Troubleshooting

Change Server Port

By default, executing standalone.sh (for Linux) / standalone.bat (for Windows) makes the server available at following urls:

https://localhost:8443/auth/
http://localhost:8080/auth/

If we need to run multiple instance of server at different ports, run the following command:

For Linux:

standalone.sh -Djboss.socket.binding.port-offset=100

For Windows:

standalone.bat -Djboss.socket.binding.port-offset=100

The above commands will add the offset of 100 to the defaults ports available for Keycloak server.

For example, previously the ports where 8443 and 8000. Now the new ports become 8443 + 100 = 8543 and 8080 + 100 = 8180.

References:

https://www.keycloak.org/docs/3.2/getting_started/topics/secure-jboss-app/before.html

Location of Server Logfile

\standalone\log

Additional Readings