개요
Keycloak은 인증, 사용자 페더레이션, 강력한 인증, 사용자 관리 및 세분화된 권한 부여를 제공하여 최소한의 노력으로 애플리케이션과 서비스를 보호하며, OIDC 및 SAML 프로토콜을 지원합니다.
README 미리보기
\n\n\n[](https://bestpractices.coreinfrastructure.org/projects/6818)\n[](https://clomonitor.io/projects/cncf/keycloak)\n[](https://securityscorecards.dev/viewer/?uri=github.com/keycloak/keycloak)\n[](https://artifacthub.io/packages/olm/community-operators/keycloak-operator)\n\n\n[](docs/translation.md)\n\n# Open Source Identity and Access Management\n\nAdd authentication to applications and secure services with minimum effort. No need to deal with storing users or authenticating users.\n\nKeycloak provides user federation, strong authentication, user management, fine-grained authorization, and more.\n\n\n## Help and Documentation\n\n* [Documentation](https://www.keycloak.org/documentation.html)\n* [User Mailing List](https://groups.google.com/d/forum/keycloak-user) - Mailing list for help and general questions about Keycloak\n* Join [#keycloak](https://cloud-native.slack.com/archives/C056HC17KK9) for general questions, or [#keycloak-dev](https://cloud-native.slack.com/archives/C056XU905S6) on Slack for design and development discussions, by creating an account at [https://slack.cncf.io/](https://slack.cncf.io/).\n\n\n## Reporting Security Vulnerabilities\n\nIf you have found a security vulnerability, please look at the [instructions on how to properly report it](https://github.com/keycloak/keycloak/security/policy).\n\n\n## Reporting an issue\n\nIf you believe you have discovered a defect in Keycloak, please open [an issue](https://github.com/keycloak/keycloak/issues).\nPlease remember to provide a good summary, description as well as steps to reproduce the issue.\n\n\n## Getting started\n\nTo run Keycloak, download the distribution from our [website](https://www.keycloak.org/downloads.html). Unzip and run:\n\n bin/kc.[sh|bat] start-dev\n\nAlternatively, you can use the Docker image by running:\n\n docker run quay.io/keycloak/keycloak start-dev\n \nFor more details refer to the [Keycloak Documentation](https://www.keycloak.org/documentation.html).\n\n\n## B
FAQ (5)
문제 해결VCIEnsureCredentialTimeClaimsNotLinkable iat linkability 경고가 동반되는 간헐적인 Oid4VciNonHaipTestSuite 실패를 해결하는 방법은?
이 간헐적인(flaky) 실패는 확률적인 RANDOMIZE time-claim 전략으로 인해 발생합니다: 서로 독립적인 두 개의 랜덤 오프셋이 우연히 일치하면서 iat2 - iat1이 실제 발급 간격과 근사해질 수 있습니다. 재실행하면 대부분 통과하지만, 결정론적인 수정 방법은 MINUTE 단위로 ROUND를 사용하는 것입니다.
tests/conformance/src/test/java/org/keycloak/tests/conformance/vci/VciConformanceRealmUtil.java 파일에서 applyCommon() 내부의 RANDOMIZE/300초 구성을 다음으로 교체하세요:
.attribute(OID4VCIConstants.TIME_CLAIMS_STRATEGY, TimeClaimNormalizer.Strategy.ROUND.name())
.attribute(OID4VCIConstants.TIME_ROUND_UNIT, TimeClaimNormalizer.RoundUnit.MINUTE.name())
HOUR나 DAY가 아닌 MINUTE를 사용하세요: 크리덴셜의 만료 시간은 300초이며, 300초는 정확히 1분 경계 5개에 해당합니다. 더 거친 단위를 사용하면 exp가 라운딩된 iat까지 내려가 크리덴셜이 즉시 만료될 수 있습니다. 라운딩은 RFC 9901 §10.1에서 허용하는 unlinkability 완화 조치입니다. Oid4VciNonHaipTestSuite 컨포먼스 작업을 다시 빌드하고 재실행하세요.
문제 해결Keycloak ExternalLinksTest가 EntityManager API 링크에 대해 HTTP 404 오류로 실패하는 문제를 해결하는 방법은?
server-development user-storage 가이드에서 EntityManager 링크를 수정하세요. /entitymanager로 끝나는 소문자 경로를 대소문자를 구분하는 /EntityManager.html로 교체하세요. 수정된 URL이 HTTP 200을 반환하는지 확인한 후 다음을 다시 실행하세요: ./mvnw install -Dtest=ExternalLinksTest -am -pl docs/documentation/tests -Pdocumentation
문제 해결CVE-2026-91777 jackson-databind 역직렬화 DoS 취약점을 해결하는 방법은?
com.fasterxml.jackson.core:jackson-databind를 패치된 버전인 **2.22.3**, **2.21.7** 또는 **2.18.11**로 업그레이드하세요 (영향 받는 버전: 2.21.5, 2.22.1, 2.22.2 및 이전 라인).
**Maven:**
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.22.3</version>
</dependency>
**Gradle:**
implementation 'com.fasterxml.jackson.core:jackson-databind:2.22.3'
**Quarkus 사용자:** 버전은 quarkus-bom에 의해 관리됩니다 (예: 3.40.1은 영향 받는 버전을 포함합니다). 수정 사항이 포함된 최신 quarkus-bom 릴리스로 업그레이드하거나, BOM import 이후 dependencyManagement 섹션에서 수정된 jackson-databind 버전을 명시적으로 고정하세요.
이 취약점은 @JsonIdentityInfo 객체 ID가 포함된 JSON을 Collection 또는 Map 타입으로 역직렬화할 때, N개의 forward reference가 역순으로 해석되는 경우 2차적인 CPU 소비(N*(N+1)/2번의 identity 비교)를 유발하여, 깊이가 얕고 크기가 선형적으로 증가하는 페이로드만으로도 서비스 거부(DoS) 공격을 가능하게 합니다. 패치는 대기 중인 참조(pending-reference) 누산기에 대한 반복적인 선형 스캔을 키 기반 조회 구조로 대체합니다.
**업그레이드가 불가능한 경우의 완화 조치:** 신뢰할 수 없거나 공격자가 제어하는 JSON을 identity가 활성화된(@JsonIdentityInfo) 컬렉션이나 맵으로 역직렬화하는 것을 피하고, API 경계(edge)에서 페이로드 크기 제한을 강제하세요.
문제 해결Keycloak 워크플로 조건에서 `!has-role()`을 사용할 때 왜 반대 사용자에 대해 실행되나요?
Keycloak 26.8.0에서는 workflow 표현식이 not, and, or만 지원합니다. ! 문자는 유효성 검증 오류를 발생시키는 대신 아무 경고 없이 제거되므로, if: "!has-role(vip)"가 if: "has-role(vip)"로 평가되어 조건이 반전됩니다. 지원되는 연산자로 변경하십시오: if: "not has-role(vip)". 마찬가지로 &&/|| 대신 and/or를 사용하십시오. 영향을 받는 workflow를 식별하려면 서버 로그에서 token recognition error at: '!'를 검색하십시오. 수정 사항은 인식할 수 없는 문자를 workflowExpressionInvalid로 거부합니다. PR "Reject workflow expressions with unrecognized characters"가 포함된 릴리스가 제공되면 해당 릴리스로 업그레이드하십시오.
문제 해결Keycloak Protection API가 지정된 사용자 대신 리소스 서버 소유로 리소스를 생성하는 문제를 어떻게 해결하나요?
이 동작은 Keycloak 26.6.x에서 의도된 동작입니다. PAT로 POST /realms/{realm}/authz/protection/resource_set을 호출하면, Keycloak은 요청 본문의 owner를 무시하고 소유권을 PAT 주체, 즉 일반적으로 리소스 서버에 할당합니다. PUT으로 리소스를 업데이트해도 소유자는 변경되지 않습니다.
다른 사용자가 소유하는 리소스를 생성하려면 대신 Keycloak Admin API를 사용하세요:
curl -X POST \
"http://localhost:8080/admin/realms/{realm}/clients/{client-uuid}/authz/resource-server/resource" \
-H "Authorization: Bearer $ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Alice Resource",
"owner": "{alice-user-id}",
"ownerManagedAccess": true
}'
클라이언트의 clientId가 아닌 UUID를 사용하고, 인가(authorization) 리소스를 관리할 권한이 있는 관리자 토큰을 사용하세요. 사용자가 리소스를 직접 관리해야 하는지 여부에 따라 ownerManagedAccess를 설정하세요. Protection API는 제시된 PAT가 나타내는 주체에 대한 리소스만 생성할 수 있으며, 임의의 사용자 소유권 설정은 이제 Admin API를 통해 수행해야 합니다.