
Discover Keycloak, an open source single sign-on and identity and access management solution, supporting OpenID Connect, OAuth 2.0, and SAML 2.0, with features like user federation and MFA.
Meet a senior technical staff member from Edge Verb, Infosys, with four years of Keycloak experience. This course helps future Keycloak learners understand sso concepts more simply.
Learn how Keycloak handles user registration and login for front-end and back-end apps, enabling secure credentials, centralized user management, federation with social providers, branding, and cost-effective open-source advantages.
Install Keycloak on your local system by first installing the Java JDK, then the Keycloak server, then PostgreSQL, then PgAdmin, and finally connect Keycloak to the database.
Install Java JDK 21 to support Keycloak SSO, download and install the latest JDK, and configure system environment variables and path on Windows, Mac, or Linux.
Install Keycloak locally by downloading from the official site, choosing tar or zip, extracting the package, and starting the server from bin to access the admin console at port 8080.
Install Docker on Windows by first enabling Linux with WSL via PowerShell, then download and install Docker Desktop and verify the installation with Docker version.
install Keycloak via Docker by running the provided command, pull the image, start the server, then access localhost:8080 and log in with admin/admin, with reference to OpenJDK/Docker setup.
Install Postgres on Windows, connect Keycloak to a proper database, and note the default port 5432 and the admin password. Then proceed to download Pgadmin.
Install Pgadmin after Postgres installation to access your database via a graphical interface. Download the latest Pgadmin version (8.3 as of Feb 9, 2024), run the installer, and complete setup.
Connect Keycloak with a Postgres database by configuring the vendor, username, password, and JDBC URL, then create a Keycloak database and start the server to populate tables.
Explore how to configure Keycloak via the admin console, covering realm settings, authentication, identity providers, user federation, security configuration, and management of clients, roles, and themes.
Learn how realms in Keycloak isolate and manage metadata, users, apps and roles; configure realm settings, endpoints, registration, localization, keys, tokens, events, and user profiles with a hands-on demo.
Explore configuring Keycloak authentication flows, including registration with terms, recaptcha, and OTP. Learn password policies and flow diagrams for login, reset credentials, and direct grant.
Explore identity providers (IDP) in Keycloak, connect external authentication with discovery endpoints, and configure client ID and secret for OpenID Connect and SAML 2.0, including social logins like Google.
Discover how Keycloak's user federation enables authentication against external stores, mapping ldap and Active Directory data into Keycloak's user model, using adapters for ldap, Kerberos, and custom databases.
Explore how Keycloak defines and manages clients, supports OpenID Connect and SAML, enables client authentication, redirect URLs, credentials, roles, and tokens for single sign-on.
Learn how Keycloak client scopes control which roles and protocol mappers appear in a client’s access token, including configuring a DOB attribute and default inclusion.
Realm roles in Keycloak define privileges, attributes, and assigned users within a realm, with options to create custom roles and map them to users across master and demo realms.
Explore how Keycloak manages users, including admin roles, role mapping, and user attributes like username, email, and DOB; learn about credentials hashing with Argon2, password reset, consents, and session details.
Keycloak groups create nested subgroups with attributes and role mappings, enabling creation, management, and membership handling across departments like HR, marketing, and engineering.
Explore how Keycloak sessions track user access across realms and clients, showing who is signed in from which IP address, and how sign-in and sign-out affect active sessions.
Explore events in Keycloak, including user and admin events tracked in a realm via event logs and configs, and learn about custom event listeners and JBoss logging.
Learn how to configure Keycloak's email settings, register a sending domain, set host and port, test mail delivery with MailHog via Docker, and verify the connection.
Explore Keycloak rest apis to automate administration—creating, updating, and deleting users, roles, clients, and realms—and enable programmatic, remote management and android app integration.
Explore Keycloak rest APIs to obtain access tokens, manage clients and roles, test endpoints with Postman, and handle authentication and user management via the admin console.
Learn to create custom Keycloak templates to tailor branding, localization, and user experiences across login, account, admin console, and email themes using ftl files.
Learn to extend keycloak by creating a custom theme from the base template, copying and renaming it, and editing login.ftl with html and css to apply a custom login experience.
Learn to customize the Keycloak login page by extending themes with custom css and html in ftl templates, modify login.html, and enhance language translations and resources.
Learn how to add a favicon icon by placing favicon.ico in the image directory and restarting the server to display it on localhost, using href and src paths.
Integrate Keycloak with a full stack app to secure backend APIs and frontend access using OpenID Connect and OAuth 2.0, with FastAPI, Django, Spring Boot, or ASP.NET.
Analyze the architecture diagram of a stack app powered by Keycloak for identity and access management, with a FastAPI backend, React UI, and Postgres database, using access tokens.
Integrate Keycloak with a FastAPI backend to enable single sign-on, configure OAuth2 bearer authentication, protect endpoints with token validation, and fetch the public key for token decoding.
Initialize a React project by verifying Node is installed, creating the app with npx create react app, entering the project directory, and starting the development server to enable integration.
Install npm packages for react and Keycloak, create a .env with your Keycloak URL, realm, and client id, then configure and export a Keycloak config in keycloakConfig.js.
Update to the latest keycloak react web package, configure env and init options, and route users to the keycloak login page via the react keycloak provider.
Learn to call secured APIs with Keycloak by adding api.js, fetching access tokens and CSRF cookies, attaching bearer tokens via axios interceptors, and handling CORS for a fast API backend.
Fixes a cors issue by adding a cors middleware to FastAPI, allowing all origins with credentials, so a React app can authenticate with Keycloak and access secured backend endpoints.
Git Hub Repository: https://github.com/raj713335/keycloak-spring-boot
Learn to integrate keycloak with spring boot using keycloak 25.0.1, set up a demo realm and client, create users, obtain an access token via postman, and inspect the JWT.
Set up a Spring Boot 3.3.1 project from the Spring Initializer using Java and Maven, enabling Keycloak with OAuth2 resource server and dependencies like Spring Web, Lombok, and Spring Security.
Configure spring boot on port 8089 and Keycloak jwt with demo realm at localhost:8080 using OpenID certs. Create a rest controller with endpoints /api/hello, /api/hello/admin, /api/hello/user, then run the application.
Configure spring security with a jwt converter to parse the token, extract sub and roles, and enforce admin or user access via bearer tokens.
Learn to integrate Keycloak with an Angular app by running Keycloak, configuring localhost:4200 as root and redirect URI, enabling client authentication, and updating the content security policy for localhost:4000.
Configure keycloak to accept requests from localhost 4000 and scaffold an angular app using angular 18, then install keycloak angular and keycloak js for integration.
Learn how to integrate Keycloak with an Angular app by configuring the app config, realm, and client, and secure private and public components with an auth guard and bearer token.
Keycloak uses clock event listeners to monitor and respond to events, featuring built-in logging and email listeners, custom listener options, and realm attribute configuration.
Develop a custom event listener for Keycloak by building a Maven project, configuring dependencies, and implementing a custom event listener provider factory and provider.
Implement a custom event listener provider in Keycloak, log event details, access realm and user models, and set user attributes such as email before building with mvn clean install.
Deploy a Keycloak event listener by configuring its starting point, building the project, and restarting the server, then confirm in realm events that new user creation triggers automated email assignment.
In this course, you will learn Keycloak, an open-source software product that allows single sign-on with Identity and Access Management aimed at modern applications.
Keycloak is an open-source tool that provides identity and access management for web applications and services. It supports standard protocols such as OpenID Connect, OAuth 2.0, and SAML 2.0, and offers features such as single sign-on, user federation, social login, and authorization policies. Here are some possible use cases for Keycloak:
1. Secure microservices and APIs: Keycloak can be used to secure microservices and APIs by providing authentication and access control based on standard protocols like OpenID Connect and OAuth 2.0. This ensures that only authorized users and applications can access your services, helping to maintain the security and integrity of your infrastructure.
2. Integrate with external identity providers: Keycloak can act as an identity broker that allows users to authenticate with external identity providers, such as Google, Facebook, or LDAP. This simplifies the user experience and reduces the need to manage multiple user accounts and passwords. Keycloak can also synchronize user data and attributes from external sources, and map them to roles and groups within Keycloak.
3. Customize and extend Keycloak: Keycloak is highly configurable and extensible, allowing you to customize its look and feel, add new features, and integrate with other systems. You can use themes, templates, and internationalization to change the appearance of Keycloak’s user interface. You can also use extensions, such as SPIs, event listeners, and user storage providers, to add new functionality and logic to Keycloak. You can also use REST APIs and an admin console to manage Keycloak programmatically.