Druid pac4j 기반 보안 확장 기능
Druid pac4j 기반 보안 확장 기능 (Druid pac4j based Security extension)
pac4j 클라이언트 라이브러리를 사용해 Druid 프로세스에 OpenID Connect 기반 인증을 활성화하는 확장 기능이에요. OIDC 인증 서버의 사용자 그룹이 웹 콘솔을 통해 Druid 클러스터와 상호작용하도록 지원해요.
출처: 문서
본문
pac4j를 기반 클라이언트 라이브러리로 사용해 Druid 프로세스에 OpenID Connect 기반 인증을 활성화하는 Apache Druid 확장 기능이에요. 이는 Okta 등 이를 지원하는 인증 서버와 함께 사용할 수 있어요. pac4j authenticator는 라우터 노드에서만 사용해야 해요. 기존 인증 서버의 사용자 그룹이 웹 콘솔을 사용해 Druid 클러스터와 상호작용할 수 있게 하기 위해서예요.
이 확장 기능은 요청과 연관된 ID 토큰을 검증하는 JWT authenticator도 제공해요. ID 토큰은 Bearer 베어러 토큰 접두사와 함께 Authorization 헤더 아래 요청에 첨부돼요. 이 authenticator는 서비스가 OIDC 서버로 먼저 인증해 ID 토큰을 검색한 후, 그 토큰을 모든 Druid 요청에 첨부해 Druid와 통신하기 위한 용도예요.
이 확장 기능은 JDBC 클라이언트 인증은 지원하지 않아요.
구성 (Configuration)
Authenticator 생성 (Creating an Authenticator)
#Create a pac4j web user authenticator
druid.auth.authenticatorChain=["pac4j"]
druid.auth.authenticator.pac4j.type=pac4j
#Create a JWT token authenticator
druid.auth.authenticatorChain=["jwt"]
druid.auth.authenticator.jwt.type=jwt
속성 (Properties)
| Property | Description | Default | required | | druid.auth.pac4j.cookiePassphrase | Passphrase for encrypting the cookies used to manage authentication session with browser. It can be provided as plaintext string or the (recommended) Password Provider . | none | Yes | | druid.auth.pac4j.readTimeout | Socket connect and read timeout duration used when communicating with authentication server | PT5S | No | | druid.auth.pac4j.enableCustomSslContext | Whether to use custom SSLContext setup via simple-client-sslcontext extension which must be added to extensions list when this property is set to true. | false | No | | druid.auth.pac4j.oidc.clientID | OAuth Client Application id. | none | Yes | | druid.auth.pac4j.oidc.clientSecret | OAuth Client Application secret. It can be provided as plaintext string or The Password Provider . | none | Yes | | druid.auth.pac4j.oidc.discoveryURI | discovery URI for fetching OP metadata see this . | none | Yes | | druid.auth.pac4j.oidc.oidcClaim | claim that will be extracted from the ID Token after validation. | name | No | | druid.auth.pac4j.oidc.scope | scope is used by an application during authentication to authorize access to a user's details. | openid profile email | No |
info
사용자는 공격자가 단순한 무차별 대입(brute force)으로 추측할 수 없도록 강력한 passphrase를 설정해야 해요. 손상된 passphrase는 공격자가 세션 쿠키를 읽고 조작할 수 있게 할 수 있어요. 자세한 내용은 CVE-2024-45384를 참고하세요.