GithubHelp home page GithubHelp logo

capgemininorway / learnmake-keycloak Goto Github PK

View Code? Open in Web Editor NEW
7.0 19.0 4.0 4.28 MB

Dockerized setup using KEYCLOAK with reference-apps

License: MIT License

Dockerfile 7.01% JavaScript 4.92% HTML 17.82% Vue 22.29% Java 30.65% Go 17.30%
keycloak keycloak-client spring-boot vuejs learning-by-doing learnmakeshare

learnmake-keycloak's Introduction

LearnMake KEYCLOAK

Baseline setup with reference-apps using KEYCLOAK!
See also medium-article

LEARN - MAKE - SHOW - SHARE

Prerequisites

In order to build and run this app you need to have a couple of things installed:

Keycloak instance with Docker

Building and running via Docker and Docker-Compose:

$ docker-compose up --build   

  # NOTE: in linux-env you might have permission problems with 'docker-data-*' folders      
  # to fix; stop docker-compose, set permissions as below, then run docker-compose again.    
$ sudo chown 1001:1001 -R docker-data-*  

  # to shut it down, ctrl+c and   
$ docker-compose down   

docker-compose up gets Keycloak instance up and running in your local environment.
Now you can access Keycloak admin panel via http://localhost:8081
the default admin username+passwd is inside docker-compose.yaml

After you login, you need to setup a Realm and Client!
NB! By default, docker-compose while starting should also reimport default config like realm, client and users.

If you still want to do this manually:
To learn more about creating a realm/clients/users, see https://www.keycloak.org/docs/latest/server_admin/index.html#admin-console
p.s. You can also reuse the first part of baeldung-tutorial*.

Here is just an outline of what you need to do for running these examples:

  • create a realm named KeycloakExampleApp
  • turn off the requirement of ssl for this realm (realmsettings -> login -> require ssl -> none)
  • create a client named login-app with default Client ID openid-connect and AccessType as public. And also set Valid Redirect URIs as http://localhost:8081/* which is the base URI of keycloak server.
  • create a user Role (Roles -> add role)
  • create a user named myuser with password mypass (Users -> add user). Make sure to activate, Role Mapping to userrole.

the resulting keycloak.json should yield:

{
  "realm": "KeycloakExampleApp",
  "auth-server-url": "http://localhost:8081/auth",
  "ssl-required": "none",
  "resource": "login-app",
  "public-client": true,
  "confidential-port": 0
}

NB! Client settings requires Valid Redirect URIs for each of the reference-app, see

After you've done all the config, now you can use Reference Apps which are listed below.

Separately building & running Reference Apps

See list of reference implementations

learnmake-keycloak's People

Contributors

zeusbaba avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.