Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Generate the certificate with keytool on RHEL 6.6

Attila Levente EGYEDI edited this page Apr 5, 2017 · 8 revisions

The documentation below is based on the information from these pages:

http://docs.jboss.org/keycloak/docs/1.0-rc-1/userguide/html/server-installation.html

http://blog.keycloak.org/2015_06_01_archive.html

http://www.java-samples.com/showtutorial.php?tutorialid=210

https://docs.oracle.com/javase/tutorial/security/toolsign/step5.html

Generate self signed certificate

Generate the certificate:

gocedar
cd CEDAR_CA
keytool -genkey -alias auth.<HOSTNAME> -keyalg RSA -keystore keycloak.jks -validity 3650

Replace <HOSTNAME> with the server hostname.

This will prompt you for a Keystore password. Auto-generate it and keep the password in the CEDAR password stash under the name of the server with the name Keycloak Keystore - keycloak.jks.

Then fill out the responses to the question as below:

What is your first and last name?
[Unknown]:  auth.<HOSTNAME> 
What is the name of your organizational unit?
[Unknown]:  BMIR
What is the name of your organization?
[Unknown]:  MED
What is the name of your City or Locality?
[Unknown]:  Stanford
What is the name of your State or Province?
[Unknown]:  California
What is the two-letter country code for this unit?
[Unknown]:  US
Is CN=auth.<HOSTNAME>, OU=BMIR, O=MED, L=Stanford, ST=California, C=US correct?
[no]:  yes

At the end, enter the same password again, or just press Enter.

Clone this wiki locally