Difference between revisions of "Keycloak"

From Dogtag
Jump to: navigation, search
(Created page with "= Installation = To install Keycloak server: $ wget https://downloads.jboss.org/keycloak/6.0.1/keycloak-6.0.1.tar.gz $ tar xzvf keycloak-6.0.1.tar.gz $ cd keycloak-6.0.1/...")
 
m (See Also)
Line 12: Line 12:
  
 
To access a realm, open http://$HOSTNAME:8080/auth/realms/<realm>/account.
 
To access a realm, open http://$HOSTNAME:8080/auth/realms/<realm>/account.
 +
 +
= Tomcat =
 +
 +
* Edit tomcat-user.xml
 +
* Add admin-gui role
 +
* Edit index.html
 +
* Edit context.xml
 +
* Add Keycloak Valve
 +
* Add keycloak.json
 +
* Edit web.xml
 +
* Define security constraints
 +
* Define login-config with auth-method set to KEYCLOAK
  
 
= See Also =
 
= See Also =
Line 20: Line 32:
 
* [http://blog.arungupta.me/bind-wildfly-different-ip-address-multihomed/ Bind WildFly to a different IP address]
 
* [http://blog.arungupta.me/bind-wildfly-different-ip-address-multihomed/ Bind WildFly to a different IP address]
 
* [https://dzone.com/articles/deploying-keycloak-in-tomcat Deploying Keycloak In Tomcat]
 
* [https://dzone.com/articles/deploying-keycloak-in-tomcat Deploying Keycloak In Tomcat]
 +
* [https://www.youtube.com/watch?v=FdYAdJkwynA Configuring Tomcat to use Keycloak for oAuth login]

Revision as of 18:30, 9 August 2019

Installation

To install Keycloak server:

$ wget https://downloads.jboss.org/keycloak/6.0.1/keycloak-6.0.1.tar.gz
$ tar xzvf keycloak-6.0.1.tar.gz
$ cd keycloak-6.0.1/bin
$ ./add-user-keycloak.sh -u admin -p Secret.123
$ ./standalone.sh -b=0.0.0.0

To access the Admin Console, open http://$HOSTNAME:8080/auth/admin/.

To access a realm, open http://$HOSTNAME:8080/auth/realms/<realm>/account.

Tomcat

  • Edit tomcat-user.xml
  • Add admin-gui role
  • Edit index.html
  • Edit context.xml
  • Add Keycloak Valve
  • Add keycloak.json
  • Edit web.xml
  • Define security constraints
  • Define login-config with auth-method set to KEYCLOAK

See Also