Keycloak

Open Source Identity Solution for Applications, Services and APIs

Follow publication

Member-only story

Running Keycloak with TLS (Self-signed certificate)

Abhishek koserwal
Keycloak
Published in
2 min readOct 18, 2022

This post will go through how to quickly set up a self-signed TLS certificate for running an instance of Keycloak locally. Only for local development purposes.

Setup

  • Openssl
  • Keycloak(Quarkus) distribution

Generate the SSL certificate (self-signed certificate) in your preferred terminal

openssl req -newkey rsa:2048 -nodes \
-keyout keycloak-server.key.pem -x509 -days 3650 -out keycloak-server.crt.pem

It will prompt for details like

Country Name (2 letter code) []:
State or Province Name (full name) []:
Locality Name (eg, city) []:
Organization Name (eg, company) []:
Organizational Unit Name (eg, section) []:
Common Name (eg, fully qualified host name) []:
Email Address []

Keycloak (Quarkus distribution using Keycloak 19.0.1)

Using the kc shell script to launch the Keycloak server with flags to pass the server certificate & key.

./kc.sh start-dev --https-port=8081 --https-certificate-file=keycloak-server.crt.pem --https-certificate-key-file=keycloak-server.key.pem
Keycloak (TLS)
[io.quarkus] (main) Keycloak 19.0.1 on JVM…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Keycloak
Keycloak

Published in Keycloak

Open Source Identity Solution for Applications, Services and APIs

Abhishek koserwal
Abhishek koserwal

Written by Abhishek koserwal

#redhatter #opensource #developer #kubernetes #keycloak #golang #openshift #quarkus #spring

Responses (3)

Write a response