{"id":22691064,"url":"https://github.com/said-aabilla/spring-boot-keycloack","last_synced_at":"2026-02-09T01:01:13.686Z","repository":{"id":259450587,"uuid":"877910408","full_name":"Said-Aabilla/spring-boot-keycloack","owner":"Said-Aabilla","description":"How to integrate Spring Boot 3, Spring Security, and Keycloak","archived":false,"fork":false,"pushed_at":"2024-10-24T13:11:11.000Z","size":11,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-22T18:40:42.215Z","etag":null,"topics":["authentication","authorization","keycloak","spring-boot","spring-security"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Said-Aabilla.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-24T13:03:41.000Z","updated_at":"2025-01-17T20:34:44.000Z","dependencies_parsed_at":"2024-10-25T15:14:39.143Z","dependency_job_id":"389fda39-19b9-400a-9b2b-c3780268841a","html_url":"https://github.com/Said-Aabilla/spring-boot-keycloack","commit_stats":null,"previous_names":["said-aabilla/spring-boot-keycloack"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Said-Aabilla/spring-boot-keycloack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Said-Aabilla%2Fspring-boot-keycloack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Said-Aabilla%2Fspring-boot-keycloack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Said-Aabilla%2Fspring-boot-keycloack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Said-Aabilla%2Fspring-boot-keycloack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Said-Aabilla","download_url":"https://codeload.github.com/Said-Aabilla/spring-boot-keycloack/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Said-Aabilla%2Fspring-boot-keycloack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29252652,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T22:49:53.206Z","status":"ssl_error","status_checked_at":"2026-02-08T22:49:51.384Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","authorization","keycloak","spring-boot","spring-security"],"created_at":"2024-12-10T01:09:19.780Z","updated_at":"2026-02-09T01:01:13.668Z","avatar_url":"https://github.com/Said-Aabilla.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sample Java Application with Spring Boot 3, Spring Security, and Keycloak\n\nThis tutorial explains how to create a sample Java application using Spring Boot 3 and protect it with Spring Security and Keycloak, without requiring Keycloak adapters.\n\n## Prerequisites\n\n- Java 17+\n- Docker installed\n- Spring Boot 3\n- Keycloak 17\n\n---\n\n## Step 1: Install Keycloak\n\nWe will install **Keycloak 17** using a Docker container. This will set up an instance of Keycloak where we can manage realms and clients. For this example, we will use `admin` as the username and `password` as the password.\n\n### Commands\n\n```bash\n$ docker pull keycloak/keycloak:17.0.0\n$ docker run -p 8080:8080 \\ \n    -e KEYCLOAK_ADMIN=admin \\ \n    -e KEYCLOAK_ADMIN_PASSWORD=password \\ \n    keycloak/keycloak:17.0.0 start-dev\n```\n\n\n## Step 2: Create a Realm\n\nAfter logging in, we will create a new realm. A realm in Keycloak is a space where you define clients, roles, and users.\n\n1. Go to the **Realm settings**.\n2. Click on **Add Realm**.\n3. Name the realm **external**.\n\n---\n\n## Step 3: Create a Keycloak Client\n\nA client is an application that interacts with Keycloak to authenticate users. We will now create a client with the name **external-client**.\n\n1. Navigate to **Clients** under the newly created realm.\n2. Click **Create**.\n3. Set the following configurations:\n\n   - **Client ID**: `external-client`\n   - **Enabled**: On\n   - **Client Protocol**: `openid-connect`\n   - **Access Type**: `Confidential`\n   - **Standard Flow Enabled**: On\n   - **Direct Access Grants Enabled**: On\n   - **Valid Redirect URIs**: `http://localhost:8081/*`\n\n4. Save the changes.\n\n---\n\n## Step 4: Create a User\n\nNow we will create a user for our **external** realm. This user will be used to authenticate with the Java application.\n\n1. Navigate to **Users**.\n2. Click **Add User**.\n3. Set\n\n## Step 5: Change your application.properties to include your secret client, then you are ready to run the app.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaid-aabilla%2Fspring-boot-keycloack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaid-aabilla%2Fspring-boot-keycloack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaid-aabilla%2Fspring-boot-keycloack/lists"}