이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 22. KafkaAuthorizationOpa schema reference


The type KafkaAuthorizationOpa has been deprecated. Please use KafkaAuthorizationCustom instead.

Used in: KafkaClusterSpec

Full list of KafkaAuthorizationOpa schema properties

Configures the Kafka custom resource to use Open Policy Agent authorization.

To use Open Policy Agent authorization, set the type property in the authorization section to the value opa, and configure OPA properties as required. Streams for Apache Kafka uses the Open Policy Agent plugin for Kafka authorization as the authorizer. For more information about the format of the input data and policy examples, see Open Policy Agent plugin for Kafka authorization.

The type: opa authorization is now deprecated and will be removed in the future. If you want to use the Open Policy Agent authorizer, you should use the type: custom authorization.

Example Open Policy Agent authorizer configuration using the type: custom API

apiVersion: kafka.strimzi.io/v1beta2
kind: Kafka
metadata:
  name: my-cluster
  namespace: myproject
spec:
  kafka:
    # ...
    authorization:
      type: custom
      authorizerClass: org.openpolicyagent.kafka.OpaAuthorizer
      superUsers:
        - CN=user-1
        - user-2
        - CN=user-3
    config:
      # OPA authorization options
      opa.authorizer.url: http://opa:8181/v1/data/kafka/allow
      opa.authorizer.cache.expire.after.seconds: 60
      opa.authorizer.allow.on.error: false
      opa.authorizer.cache.initial.capacity: 1000
      opa.authorizer.cache.maximum.size: 10000
    # ...
Copy to Clipboard Toggle word wrap

22.1. KafkaAuthorizationOpa schema properties

The type property is a discriminator that distinguishes use of the KafkaAuthorizationOpa type from KafkaAuthorizationSimple, KafkaAuthorizationKeycloak, KafkaAuthorizationCustom. It must have the value opa for the type KafkaAuthorizationOpa.

Expand
PropertyProperty typeDescription

type

string

Must be opa.

url

string

The URL used to connect to the Open Policy Agent server. The URL has to include the policy which will be queried by the authorizer. This option is required.

allowOnError

boolean

Defines whether a Kafka client should be allowed or denied by default when the authorizer fails to query the Open Policy Agent, for example, when it is temporarily unavailable). Defaults to false - all actions will be denied.

initialCacheCapacity

integer

Initial capacity of the local cache used by the authorizer to avoid querying the Open Policy Agent for every request Defaults to 5000.

maximumCacheSize

integer

Maximum capacity of the local cache used by the authorizer to avoid querying the Open Policy Agent for every request. Defaults to 50000.

expireAfterMs

integer

The expiration of the records kept in the local cache to avoid querying the Open Policy Agent for every request. Defines how often the cached authorization decisions are reloaded from the Open Policy Agent server. In milliseconds. Defaults to 3600000.

tlsTrustedCertificates

CertSecretSource array

Trusted certificates for TLS connection to the OPA server.

superUsers

string array

List of super users, which is specifically a list of user principals that have unlimited access rights.

enableMetrics

boolean

Defines whether the Open Policy Agent authorizer plugin should provide metrics. Defaults to false.

Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2026 Red Hat
맨 위로 이동