Este conteúdo não está disponível no idioma selecionado.
Chapter 22. KafkaAuthorizationOpa schema reference
Used in: KafkaClusterSpec
Full list of KafkaAuthorizationOpa schema properties
To use Open Policy Agent authorization, set the type property in the authorization section to the value opa, and configure OPA properties as required. AMQ Streams uses 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.
22.1. url Copiar o linkLink copiado para a área de transferência!
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. Required.
22.2. allowOnError Copiar o linkLink copiado para a área de transferência!
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.
22.3. initialCacheCapacity Copiar o linkLink copiado para a área de transferência!
Initial capacity of the local cache used by the authorizer to avoid querying the Open Policy Agent for every request. Defaults to 5000.
22.4. maximumCacheSize Copiar o linkLink copiado para a área de transferência!
Maximum capacity of the local cache used by the authorizer to avoid querying the Open Policy Agent for every request. Defaults to 50000.
22.5. expireAfterMs Copiar o linkLink copiado para a área de transferência!
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 milliseconds (1 hour).
22.6. tlsTrustedCertificates Copiar o linkLink copiado para a área de transferência!
Trusted certificates for TLS connection to the OPA server.
22.7. superUsers Copiar o linkLink copiado para a área de transferência!
A list of user principals treated as super users, so that they are always allowed without querying the open Policy Agent policy.
An example of Open Policy Agent authorizer configuration
apiVersion: kafka.strimzi.io/v1beta2
kind: Kafka
metadata:
name: my-cluster
namespace: myproject
spec:
kafka:
# ...
authorization:
type: opa
url: http://opa:8181/v1/data/kafka/allow
allowOnError: false
initialCacheCapacity: 1000
maximumCacheSize: 10000
expireAfterMs: 60000
superUsers:
- CN=fred
- sam
- CN=edward
# ...
22.8. KafkaAuthorizationOpa schema properties Copiar o linkLink copiado para a área de transferência!
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.
| Property | Description |
|---|---|
| type |
Must be |
| string | |
| url | 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. |
| string | |
| allowOnError |
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 |
| boolean | |
| initialCacheCapacity |
Initial capacity of the local cache used by the authorizer to avoid querying the Open Policy Agent for every request Defaults to |
| integer | |
| maximumCacheSize |
Maximum capacity of the local cache used by the authorizer to avoid querying the Open Policy Agent for every request. Defaults to |
| integer | |
| expireAfterMs |
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 |
| integer | |
| tlsTrustedCertificates | Trusted certificates for TLS connection to the OPA server. |
|
| |
| superUsers | List of super users, which is specifically a list of user principals that have unlimited access rights. |
| string array | |
| enableMetrics |
Defines whether the Open Policy Agent authorizer plugin should provide metrics. Defaults to |
| boolean |