Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/h3ar7b3a7/keycloakwithspring

Exploring KeyCloak with a Spring application.
https://github.com/h3ar7b3a7/keycloakwithspring

jwt keycloak oauth2 openid-connect saml

Last synced: 17 days ago
JSON representation

Exploring KeyCloak with a Spring application.

Awesome Lists containing this project

README

        

# Key Cloak

[[Original Documentation](https://www.keycloak.org/docs/latest/getting_started/index.html)]

## Setup Container

docker pull jboss/keycloak:latest
docker run --name KeyCloak -e KEYCLOAK_USER=root -e KEYCLOAK_PASSWORD=pass -p 8888:8080 jboss/keycloak

The server will be available at:

http://localhost:8888/auth

```
user: root
password: pass
```

## Realm

Master realm:
- Created on server setup with admin credentials
- Only used to create other realms

Other realms:
- Used to create users & applications
- Applications are owned by users

### Create Realm

Master menu (top left) -> Add realm...

Example name: "overworld"

### Create Group

Manage -> Groups -> New...

Example group: "humans"

### Create User

Manage -> Users -> Add user...

*After saving set a temporary password in the credentials tab.*

Example user: "steve"

### Create Client

Clients -> Create...

```
Access type: confidential
Valid Redirect URIs: http://localhost:8080/login/oauth2/code/first-keycloak-client
```

*Get the client secret from the credentials tab.*

To enable fine-grained authorization support:
- Toggle **Authorization Enabled**
- A tab named **Authorization** will appear

## Log In

Login page for overworld user:

http://localhost:8888/auth/realms/overworld/account

Login page for admin user:

http://localhost:8888/auth/realms/master/account/

## Some Projects

- [OpenID Connect (+ Thymeleaf)](first-attempt/README.md)
- [SAML ???](second-attempt/README.md)
- [OpenID Connect (REST Service)](third-attempt/README.md)

---
Work in progress ...