You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: Correctly encode user given content, such as passwords (#627)
* fix: Correctly encode user given content, such as passwords
* changelog
* fix bcrypt problems
* Update rust/operator-binary/src/security/authentication.rs
Co-authored-by: Malte Sander <[email protected]>
---------
Co-authored-by: Malte Sander <[email protected]>
* add vscode debugging profile
* wip: add integration test for oidc
* wip: debug oidc & jwts
* wip
* wip: map over ContainerBuilders
* fix oidc test
* fix oidc test
* fix clippy, update CRD and remove debug files
* run cargo fmt
* address clippy and yamllint feedback
* remove unneccessary return
* reenable all tests
* add docs and fix oidc test
* remove reporting task from oidc test
* add debug logging
* fix test logging
* use nifi-latest in oidc test
* add comment why nifi-latest is used
* clean up code and add comment
* address feedback from review
* improve oidc integration test
* fix oidc test for nifi 2.0.0-M4
* increase timeout on test job creation
* fix docs on oidc
* move config for debugger to operator-templating
* add comment to test job assert
---------
Co-authored-by: Sebastian Bernauer <[email protected]>
Co-authored-by: Malte Sander <[email protected]>
Co-authored-by: Nick Larsen <[email protected]>
Copy file name to clipboardExpand all lines: deploy/helm/nifi-operator/crds/crds.yaml
+20-1Lines changed: 20 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -33,8 +33,27 @@ spec:
33
33
items:
34
34
properties:
35
35
authenticationClass:
36
-
description: Name of the [AuthenticationClass](https://docs.stackable.tech/home/nightly/concepts/authentication) used to authenticate users. Supported providers are `static` and `ldap`. For `static` the "admin" user needs to be present in the referenced secret, and only this user will be added to NiFi, other users are ignored.
36
+
description: A name/key which references an authentication class. To get the concrete [`AuthenticationClass`], we must resolve it. This resolution can be achieved by using [`ClientAuthenticationDetails::resolve_class`].
37
37
type: string
38
+
oidc:
39
+
description: |-
40
+
This field contains authentication provider specific configuration.
41
+
42
+
Use [`ClientAuthenticationDetails::oidc_or_error`] to get the value or report an error to the user.
43
+
nullable: true
44
+
properties:
45
+
clientCredentialsSecret:
46
+
description: A reference to the OIDC client credentials secret. The secret contains the client id and secret.
47
+
type: string
48
+
extraScopes:
49
+
default: []
50
+
description: An optional list of extra scopes which get merged with the scopes defined in the [`AuthenticationClass`].
Copy file name to clipboardExpand all lines: docs/modules/nifi/pages/usage_guide/security.adoc
+74-7Lines changed: 74 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ spec:
22
22
serverSecretClass: non-default-secret-class # <1>
23
23
----
24
24
25
-
<1> The name of the `SecretClass` that will be used for certificates for the NiFi UI.
25
+
<1> The name of the SecretClass that will be used for certificates for the NiFi UI.
26
26
27
27
== Authentication
28
28
@@ -49,8 +49,8 @@ spec:
49
49
name: nifi-admin-credentials # <2>
50
50
----
51
51
52
-
<1> The name of the `AuthenticationClass` that will be referenced in the NiFi cluster.
53
-
<2> The name of the `Secret` containing the admin credentials.
52
+
<1> The name of the AuthenticationClass that will be referenced in the NiFi cluster.
53
+
<2> The name of the Secret containing the admin credentials.
54
54
55
55
[source,yaml]
56
56
----
@@ -63,9 +63,9 @@ stringData:
63
63
bob: bob # <3>
64
64
----
65
65
66
-
<1> The name of the `Secret` containing the admin user credentials.
67
-
<2> The user and password combination of the admin user. The username *must* be "admin" and cannot be changed. The NiFi pods will not start if they cannot mount the "admin" entry from the secret. The password can be adapted.
68
-
<3> The secret maybe used by other products of the Stackable Data Platform that allow more than one user. The Stackable Operator for Apache NiFi will ignore all users except for "admin".
66
+
<1> The name of the Secret containing the admin user credentials.
67
+
<2> The user and password combination of the admin user. The username *must* be "admin" and cannot be changed. The NiFi pods will not start if they cannot mount the "admin" entry from the Secret. The password can be adapted.
68
+
<3> The Secret maybe used by other products of the Stackable Data Platform that allow more than one user. The Stackable Operator for Apache NiFi will ignore all users except for "admin".
69
69
70
70
[source,yaml]
71
71
----
@@ -75,7 +75,7 @@ spec:
75
75
- authenticationClass: simple-nifi-users # <1>
76
76
----
77
77
78
-
<1> The reference to an `AuthenticationClass`. NiFi only supports one authentication mechanism at a time.
78
+
<1> The reference to an AuthenticationClass. NiFi only supports one authentication mechanism at a time.
79
79
80
80
[#authentication-ldap]
81
81
=== LDAP
@@ -100,13 +100,72 @@ spec:
100
100
101
101
You can follow the xref:tutorials:authentication_with_openldap.adoc[] tutorial to learn how to set up an AuthenticationClass for an LDAP server, as well as consulting the {crd-docs}/authentication.stackable.tech/authenticationclass/v1alpha1/[AuthenticationClass reference {external-link-icon}^].
102
102
103
+
[#authentication-oidc]
104
+
=== OIDC
105
+
106
+
NiFi supports xref:concepts:authentication.adoc[authentication] of users against an OIDC provider.
107
+
This requires setting up an AuthenticationClass for the OIDC provider and specifying a Secret containing the OIDC client id and client secret as part of the NiFi configuration.
108
+
The AuthenticationClass and the OIDC client credentials Secret are then referenced in the NifiCluster resource:
109
+
110
+
[source,yaml]
111
+
----
112
+
apiVersion: nifi.stackable.tech/v1alpha1
113
+
kind: NifiCluster
114
+
metadata:
115
+
name: test-nifi
116
+
spec:
117
+
clusterConfig:
118
+
authentication:
119
+
- authenticationClass: oidc # <1>
120
+
oidc:
121
+
clientCredentialsSecret: nifi-oidc-client # <2>
122
+
----
123
+
124
+
<1> The reference to an AuthenticationClass called `oidc`
125
+
<2> The reference to an existing Secret called `nifi-oidc-client`
NiFi supports {nifi-docs-authorization}[multiple authorization methods], the available authorization methods depend on the chosen authentication method.
107
165
108
166
Authorization is not fully implemented by the Stackable Operator for Apache NiFi.
109
167
168
+
[#authorization-single-user]
110
169
=== Single user
111
170
112
171
With this authorization method, a single user has administrator capabilities.
@@ -118,6 +177,14 @@ The operator uses the {nifi-docs-fileusergroupprovider}[`FileUserGroupProvider`]
118
177
This user is then able to create and modify groups and policies in the web interface.
119
178
These changes local to the Pod running NiFi and are *not* persistent.
120
179
180
+
[#authorization-oidc]
181
+
=== OIDC
182
+
183
+
With this authorization method, all authenticated users have administrator capabilities.
184
+
185
+
An admin user with an auto-generated password is created that can access the NiFi API.
186
+
The password for this user is stored in a Kubernetes Secret called `<nifi-name>-oidc-admin-password`.
0 commit comments