forked from strimzi/strimzi-kafka-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(refactor): updates to the oauth doc following review (strimzi#10143
) Signed-off-by: prmellor <[email protected]>
- Loading branch information
1 parent
8736b0b
commit 9d56934
Showing
24 changed files
with
591 additions
and
817 deletions.
There are no files selected for viewing
24 changes: 8 additions & 16 deletions
24
...mentation/assemblies/oauth/assembly-managing-policies-permissions-keycloak.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,15 @@ | ||
ifdef::context[:parent-context: {context}] | ||
// This assembly is included in the following assemblies: | ||
// | ||
// assembly-oauth-security.adoc | ||
|
||
[id="assembly-managing-policies-permissions-keycloak_{context}"] | ||
= Managing policies and permissions in Keycloak Authorization Services | ||
|
||
:context: authz-model | ||
[id="assembly-managing-policies-permissions-keycloak-{context}"] | ||
= Setting up permissions in Keycloak | ||
|
||
[role="_abstract"] | ||
This section describes the authorization models used by Keycloak Authorization Services and Kafka, and defines the important concepts in each model. | ||
|
||
To grant permissions to access Kafka, you can map Keycloak Authorization Services objects to Kafka resources by creating an _OAuth client specification_ in Keycloak. | ||
Kafka permissions are granted to user accounts or service accounts using Keycloak Authorization Services rules. | ||
|
||
xref:ref-example-permissions-for-kafka-operations_{context}[Examples] are shown of the different user permissions required for common Kafka operations, such as creating and listing topics. | ||
When using Keycloak as the OAuth 2.0 authorization server, Kafka permissions are granted to user accounts or service accounts using authorization permissions. | ||
To grant permissions to access Kafka, create an _OAuth client specification_ in Keycloak that maps the authorization models of Keycloak Authorization Services and Kafka. | ||
|
||
include::../../modules/oauth/con-kafka-keycloak-authz-models.adoc[leveloffset=+1] | ||
|
||
include::../../modules/oauth/con-mapping-keycloak-authz-services-to-kafka-model.adoc[leveloffset=+1] | ||
|
||
include::../../modules/oauth/ref-example-permissions-for-kafka-operations.adoc[leveloffset=+1] | ||
|
||
ifdef::parent-context[:context: {parent-context}] | ||
ifndef::parent-context[:!context:] | ||
include::../../modules/oauth/proc-oauth-authorization-keycloak-example.adoc[leveloffset=+1] |
29 changes: 9 additions & 20 deletions
29
documentation/assemblies/oauth/assembly-oauth-authentication.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,23 @@ | ||
// This assembly is included in the following assemblies: | ||
// | ||
// assembly-deployment-configuration.adoc | ||
// assembly-oauth-security.adoc | ||
|
||
[id='assembly-oauth-authentication_{context}'] | ||
= Using OAuth 2.0 token-based authentication | ||
|
||
[role="_abstract"] | ||
Strimzi supports the use of link:https://oauth.net/2/[OAuth 2.0 authentication^] using the _OAUTHBEARER_ and _PLAIN_ mechanisms. | ||
Using OAuth 2.0 authentication, application clients can access resources on application servers (called _resource servers_) without exposing account credentials. | ||
|
||
The application client passes an access token as a means of authenticating, which application servers can also use to determine the level of access to grant. | ||
The authorization server handles the granting of access and inquiries about access. | ||
|
||
In the context of Strimzi: | ||
|
||
* Kafka brokers act as OAuth 2.0 resource servers | ||
* Kafka clients act as OAuth 2.0 application clients | ||
|
||
Strimzi supports the use of link:https://oauth.net/2/[OAuth 2.0^] for token-based authentication. | ||
An OAuth 2.0 authorization server handles the granting of access and inquiries about access. | ||
Kafka clients authenticate to Kafka brokers. | ||
The brokers and clients communicate with the OAuth 2.0 authorization server, as necessary, to obtain or validate access tokens. | ||
Brokers and clients communicate with the authorization server, as necessary, to obtain or validate access tokens. | ||
|
||
For a deployment of Strimzi, OAuth 2.0 integration provides: | ||
For a deployment of Strimzi, OAuth 2.0 integration provides the following support: | ||
|
||
* Server-side OAuth 2.0 support for Kafka brokers | ||
* Client-side OAuth 2.0 support for Kafka MirrorMaker, Kafka Connect, and the Kafka Bridge | ||
* Server-side OAuth 2.0 authentication for Kafka brokers | ||
* Client-side OAuth 2.0 authentication for Kafka MirrorMaker, Kafka Connect, and the Kafka Bridge | ||
|
||
include::../../modules/oauth/con-oauth-authentication-flow.adoc[leveloffset=+1] | ||
include::../../modules/oauth/con-oauth-authentication-broker.adoc[leveloffset=+1] | ||
include::../../modules/oauth/con-oauth-reauthentication.adoc[leveloffset=+1] | ||
include::../../modules/oauth/con-oauth-authentication-client.adoc[leveloffset=+1] | ||
include::../../modules/oauth/con-oauth-authentication-client-options.adoc[leveloffset=+1] | ||
include::../../modules/oauth/con-oauth-config.adoc[leveloffset=+1] | ||
include::../../modules/oauth/con-oauth-server-examples.adoc[leveloffset=+1] | ||
include::../../modules/oauth/con-oauth-reauthentication.adoc[leveloffset=+1] | ||
include::../../modules/oauth/con-oauth-config.adoc[leveloffset=+1] |
19 changes: 14 additions & 5 deletions
19
documentation/assemblies/oauth/assembly-oauth-authorization.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,21 @@ | ||
// This assembly is included in the following assemblies: | ||
// | ||
// assembly-deployment-configuration.adoc | ||
// assembly-oauth-security.adoc | ||
|
||
[id='assembly-oauth-authorization_{context}'] | ||
= Using OAuth 2.0 token-based authorization | ||
|
||
include::../../modules/oauth/con-oauth-authorization-intro.adoc[leveloffset=+1] | ||
include::../../modules/oauth/con-oauth-authorization-mechanism.adoc[leveloffset=+1] | ||
[role="_abstract"] | ||
Strimzi supports the use of OAuth 2.0 token-based authorization through {keycloak-authorization-services}, | ||
which lets you manage security policies and permissions centrally. | ||
|
||
Security policies and permissions defined in Keycloak grant access to Kafka resources. | ||
Users and clients are matched against policies that permit access to perform specific actions on Kafka brokers. | ||
|
||
Kafka allows all users full access to brokers by default, but also provides the `AclAuthorizer` and `StandardAuthorizer` plugins to configure authorization based on Access Control Lists (ACLs). | ||
The ACL rules managed by these plugins are used to grant or deny access to resources based on _username_, and these rules are stored within the Kafka cluster itself. | ||
|
||
However, OAuth 2.0 token-based authorization with Keycloak offers far greater flexibility on how you wish to implement access control to Kafka brokers. | ||
In addition, you can configure your Kafka brokers to use OAuth 2.0 authorization and ACLs. | ||
|
||
include::../../modules/oauth/proc-oauth-authorization-broker-config.adoc[leveloffset=+1] | ||
include::assembly-managing-policies-permissions-keycloak.adoc[leveloffset=+1] | ||
include::../../modules/oauth/proc-oauth-authorization-keycloak-example.adoc[leveloffset=+1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.