Articles by Deepak Prasad
Keycloak Protocol Mappers: Add Custom Claims to Access and ID Tokens
Add custom claims to Keycloak access and ID tokens with protocol mappers. Map user attributes, groups, and audience on Keycloak 26.7.3, then verify with a decoded JWT.
Keycloak Realm Roles vs Client Roles vs Composite Roles
Compare Keycloak realm roles, client roles, and composite roles—create employee and order-reader, inspect realm_access vs resource_access in access tokens, and troubleshoot roles missing from JWTs on Keycloak 26.7.3.
Keycloak Public vs Confidential Clients: Which Should You Use?
Learn the difference between public and confidential clients in Keycloak, which client type to use for SPAs, mobile apps and server-side applications, and how Client authentication, PKCE and client secrets fit together.
Configure Keycloak with PostgreSQL
Configure Keycloak 26.7.3 with PostgreSQL using KC_DB and JDBC settings, start production mode against an external database, and prove realm data survives Keycloak container replacement on Podman or Docker.
Build an Optimized Keycloak Container Image with kc.sh build
Learn how to build an optimized Keycloak container image with kc.sh build, separate build-time and runtime configuration, and start it with start --optimized.
Configure Keycloak Behind a Reverse Proxy
Run Keycloak behind Nginx or HAProxy with edge, re-encrypt, or passthrough TLS, set KC_PROXY_HEADERS and trusted addresses, enable PROXY protocol when needed, and fix 403, wrong scheme, and wrong OIDC issuer issues on …
Configure Keycloak HTTPS/TLS with SSL Certificates
Enable Keycloak HTTPS on port 8443 with PEM or PKCS12 certificates, set KC_HOSTNAME to the full public URL, reload certificates without restart, tune TLS protocols, and verify the OIDC issuer on Keycloak 26.7.3.
Keycloak Groups: Create Nested Groups and Inherit Roles
Learn how Keycloak groups work, create nested groups, add users, assign realm and client roles, and understand role and attribute inheritance.
How to Configure Keycloak with Environment Variables (KC_*)
Learn how Keycloak KC_* environment variables work, how to set them in Docker, Podman, Compose, and Linux, and how to fix values that appear ignored.
How to Automatically Assign Roles and Groups to New Users in Keycloak
Learn how to automatically assign Keycloak default roles and default groups to new users, verify inheritance in the Admin Console, and understand what happens to existing accounts on Keycloak 26.7.3.
How to Persist Keycloak Data in Docker and Podman
Learn which Keycloak Docker and Podman volumes to persist: mount /opt/keycloak/data for start-dev H2 data, persist the database for external PostgreSQL, and understand restart vs container recreate.
Keycloak Configuration with keycloak.conf: Examples & Precedence
Learn how Keycloak loads keycloak.conf, where the file lives, how CLI flags and KC_* environment variables interact, configuration precedence, ${…} interpolation, build-time vs runtime options, and how to verify settings …
Run Keycloak as a systemd Service on Linux
Run Keycloak 26.7.3 as a Linux systemd service after a ZIP install: dedicated keycloak user, minimal keycloak.conf, unit file directives, enable at boot, journalctl logs, and common startup failures.
Install and Run Keycloak with Podman
Install Keycloak 26.7.3 with rootless Podman on RHEL-family Linux, start-dev on port 8080, Podman volumes and SELinux :Z mounts, container logs, and Quadlet persistence paths.
How to Install Keycloak on Linux
Install Keycloak on Linux using the official distribution, with Java runtime setup for Ubuntu, Debian, RHEL, Rocky Linux and AlmaLinux, first admin login, and start-dev verification.
Install Keycloak on Kubernetes with the Keycloak Operator
Install Keycloak 26.7.3 on an existing Kubernetes cluster with the Keycloak Operator, PostgreSQL, database Secrets, a Keycloak custom resource, bootstrap admin login, and kubectl port-forward to the Admin Console.
Install Keycloak with Helm: Chart Options vs Keycloak Operator
Compare Keycloak Helm chart options with the official Operator, then install Keycloak 26.7.3 with the codecentric keycloakx chart, PostgreSQL, bootstrap admin credentials, helm upgrade, and uninstall on Kubernetes.
Keycloak Docker Compose with PostgreSQL
Run Keycloak 26.7.3 with PostgreSQL using Docker Compose on Linux — compose.yaml, KC_BOOTSTRAP_ADMIN variables, health checks, persistent volumes, Admin Console login, and PostgreSQL verification.
How to Install Keycloak with Docker
Install Keycloak 26.7.3 with Docker Engine using the official Quay image, start-dev, bootstrap admin, port 8080, Docker logs, configuration delivery, first login, and container restarts.
Keycloak Clients Explained: OIDC, SAML, URLs, and Client Settings
Learn what a Keycloak client is, how realm clients differ from users, OIDC vs SAML client types, client ID vs internal UUID, redirect URIs, web origins, authentication settings, and common client errors on Keycloak …
Keycloak Client Scopes: Default, Optional & Dedicated Explained
Learn how Keycloak client scopes work — Default, Optional, and Dedicated scopes, creating and assigning scopes, and verifying JWT claims with before-and-after token examples.
Authentication vs Authorization: Differences and Examples
Learn how authentication and authorization differ, with examples from login, API bearer tokens, roles, OAuth, OpenID Connect, and HTTP 401 versus 403 responses.
What Is IAM? Identity and Access Management Explained
Learn what identity and access management (IAM) is, how authentication and authorization differ, and how SSO, MFA, provisioning, federation and access lifecycle management work together.
What Is Keycloak and How Does It Work?
Learn what Keycloak is, how its login and SSO flow works, and how realms, clients, users, roles, LDAP federation, identity brokering, OIDC and SAML fit together.
Fix "watchdog: BUG: soft lockup - CPU stuck" on Linux
Diagnose watchdog BUG soft lockup CPU stuck on Linux from the kernel journal and stack trace. Separate VM starvation, workload pressure, storage stalls, and real driver bugs before changing watchdog_thresh.
How to Reset Keycloak Admin Password and Recover Access
Reset a lost Keycloak admin password with bootstrap-admin user, repair the permanent administrator, and remove OTP lockout with bootstrap-admin service when the Admin Console is unreachable.
Keycloak Bootstrap Admin: Create the Initial Admin User
Create Keycloak’s first administrator in the master realm with KC_BOOTSTRAP_ADMIN_USERNAME, the Welcome Page, or bootstrap-admin before the first server start.
Keycloak Service Accounts: Client Credentials Flow for Machine-to-Machine Auth
Enable Keycloak service accounts and request client_credentials tokens for machine-to-machine auth—assign roles, fix role intersection with client scopes, call orders-api with curl, and troubleshoot invalid_client on …
Keycloak Realms Explained: Isolation, Multi-Tenancy, and the Master Realm
Learn what a Keycloak realm contains, how realm isolation differs from groups and Organizations, when to add another realm, and why the master realm is for administration—not application users.
Genymotion Android Pentest Lab: Install, Root & Connect ADB
Install Genymotion Desktop Pro on the physical host, create a rooted Android 10 device, fix VirtualBox host-only networking, and connect from Kali with adb for MobSF dynamic analysis.

