-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added oidc Configuration section and operator management #464
base: master
Are you sure you want to change the base?
Changes from 6 commits
9ac5662
266cc6c
861ab81
82588f2
36d95aa
af8c0f5
7028437
b0444d9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,6 +130,20 @@ func (r *Reconciler) getNifiPropertiesConfigString(nConfig *v1.NodeConfig, id in | |
webProxyHosts = strings.Join(append(dnsNames, base.WebProxyHosts...), ",") | ||
} | ||
|
||
if strings.Contains(config.NifiPropertiesTemplate, "user.oidc.client.secret") { | ||
// read secret value | ||
clientSecret := &corev1.EnvVarSource{ | ||
SecretKeyRef: &corev1.SecretKeySelector{ | ||
LocalObjectReference: corev1.LocalObjectReference{ | ||
Name: OidcConfiguration.SecretRef.Name, | ||
NameSpace: OidcConfiguration.SecretRef.NameSpace, | ||
}, | ||
Key: clientSecret, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you please document (ad nauseum) what the key in the secret should be for the referenced secret? This should be documented on the website documentation, in |
||
}, | ||
} | ||
|
||
strings.Replace(config.NifiPropertiesTemplate, "nifi.security.user.oidc.client.secret=clientSecret", "nifi.security.user.oidc.client.secret=" + clientSecret, 1) | ||
} | ||
useSSL := configcommon.UseSSL(r.NifiCluster) | ||
var out bytes.Buffer | ||
t := template.Must(template.New("nConfig-config").Parse(config.NifiPropertiesTemplate)) | ||
|
@@ -162,6 +176,7 @@ func (r *Reconciler) getNifiPropertiesConfigString(nConfig *v1.NodeConfig, id in | |
// | ||
"LdapConfiguration": r.NifiCluster.Spec.LdapConfiguration, | ||
"SingleUserConfiguration": r.NifiCluster.Spec.SingleUserConfiguration, | ||
"OidcConfiguration": r.NifiCluster.Spec.OidcConfiguration, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you please correct the tab spacing for all of these? |
||
"IsNode": nConfig.GetIsNode(), | ||
"ZookeeperConnectString": r.NifiCluster.Spec.ZKAddress, | ||
"ZookeeperPath": r.NifiCluster.Spec.GetZkPath(), | ||
|
@@ -297,6 +312,7 @@ func (r *Reconciler) getLoginIdentityProvidersConfigString(nConfig *v1.NodeConfi | |
"Id": id, | ||
"LdapConfiguration": r.NifiCluster.Spec.LdapConfiguration, | ||
"SingleUserConfiguration": r.NifiCluster.Spec.SingleUserConfiguration, | ||
"OidcConfiguration": r.NifiCluster.Spec.OidcConfiguration, | ||
}); err != nil { | ||
log.Error("error occurred during parsing the config template", | ||
zap.String("clusterName", r.NifiCluster.Name), | ||
|
@@ -514,6 +530,7 @@ func (r *Reconciler) getAuthorizersConfigString(nConfig *v1.NodeConfig, id int32 | |
"NodeList": nodeList, | ||
"ControllerUser": r.NifiCluster.GetNifiControllerUserIdentity(), | ||
"SingleUserConfiguration": r.NifiCluster.Spec.SingleUserConfiguration, | ||
"OidcConfiguration": r.NifiCluster.Spec.OidcConfiguration, | ||
}); err != nil { | ||
log.Error("error occurred during parsing the config template", | ||
zap.String("clusterName", r.NifiCluster.Name), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please update these comments to correctly describe the variables?