Skip to content
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

Add settings for doing secure auth LDAPS/AD #391

Merged
merged 9 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

### Added

- [PR #391](https://github.com/konpyutaika/nifikop/pull/391) - **[Operator/NifiUserGroup]** Added settings missing for secure LDAP connections in login_identity_providers.xml

- [PR #381](https://github.com/konpyutaika/nifikop/pull/381) - **[Operator/NifiUserGroup]** Added ability to set `NifiUserGroup.Spec.Identity` when users need to override the default naming convention.

### Changed
Expand Down
12 changes: 12 additions & 0 deletions api/v1/nificluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,19 @@ type LdapConfiguration struct {
// The default functionality if this property is missing is USE_DN in order to retain backward compatibility.
// USE_DN will use the full DN of the user entry if possible.
// USE_USERNAME will use the username the user logged in with.
TLSKeystore string `json:"tlsKeystore,omitempty"`
wrender marked this conversation as resolved.
Show resolved Hide resolved
TLSKeystorePassword string `json:"tlsKeystorePassword,omitempty"`
TLSKeystoretype string `json:"tlsKeystoreType,omitempty"`
TLSTruststore string `json:"tlsTruststore,omitempty"`
TLSTruststorePassword string `json:"tlsTruststorePassword,omitempty"`
TLSTruststoreType string `json:"tlsTruststoreType,omitempty"`
ClientAuth string `json:"clientAuth,omitempty"`
Protocol string `json:"protocol,omitempty"`
ShutdownGracefully string `json:"shutdownGracefully,omitempty"`
ReferralStrategy string `json:"referralStrategy,omitempty"`

IdentityStrategy string `json:"identityStrategy,omitempty"`

}

// NifiClusterTaskSpec specifies the configuration of the nifi cluster Tasks.
Expand Down
20 changes: 20 additions & 0 deletions config/crd/bases/nifi.konpyutaika.com_nificlusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,26 @@ spec:
type: string
managerPassword:
type: string
tlsKeystore:
type: string
tlsKeytorePassword:
type: string
tlsKeytoreType:
type: string
tlsTruststore:
type: string
tlsTruststorePassword:
type: string
tlsTruststoreType:
type: string
clientAuth:
type: string
protocol:
type: string
shutdownGracefully:
type: string
referralStrategy:
type: string
searchBase:
type: string
searchFilter:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1116,6 +1116,26 @@ spec:
type: string
identityStrategy:
type: string
tlsKeystore:
type: string
tlsKeytorePassword:
type: string
tlsKeytoreType:
type: string
tlsTruststore:
type: string
tlsTruststorePassword:
type: string
tlsTruststoreType:
type: string
clientAuth:
type: string
protocol:
type: string
shutdownGracefully:
type: string
referralStrategy:
type: string
type: object
listenersConfig:
description: listenerConfig specifies nifi's listener specifig configs
Expand Down
20 changes: 20 additions & 0 deletions helm/nifikop/crds/nifi.konpyutaika.com_nificlusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,26 @@ spec:
type: string
managerPassword:
type: string
tlsKeystore:
type: string
tlsKeytorePassword:
type: string
tlsKeytoreType:
type: string
tlsTruststore:
type: string
tlsTruststorePassword:
type: string
tlsTruststoreType:
type: string
clientAuth:
type: string
protocol:
type: string
shutdownGracefully:
type: string
referralStrategy:
type: string
searchBase:
type: string
searchFilter:
Expand Down
21 changes: 11 additions & 10 deletions pkg/resources/templates/config/login_identity_providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,18 @@ var LoginIdentityProvidersTemplate = `<?xml version="1.0" encoding="UTF-8" stand
<property name="Authentication Strategy">{{or .LdapConfiguration.AuthenticationStrategy "START_TLS"}}</property>
<property name="Manager DN">{{.LdapConfiguration.ManagerDn}}</property>
<property name="Manager Password">{{.LdapConfiguration.ManagerPassword}}</property>
<property name="TLS - Keystore"></property>
<property name="TLS - Keystore Password"></property>
<property name="TLS - Keystore Type"></property>
<property name="TLS - Truststore"></property>
<property name="TLS - Truststore Password"></property>
<property name="TLS - Truststore Type"></property>
<property name="TLS - Client Auth"></property>
<property name="TLS - Protocol"></property>
<property name="TLS - Shutdown Gracefully"></property>
<property name="TLS - Keystore">{{.LdapConfiguration.TLSKeystore}}</property>
<property name="TLS - Keystore Password">{{.LdapConfiguration.TLSKeystorePassword}}</property>
<property name="TLS - Keystore Type">{{.LdapConfiguration.TLSKeystoreType}}</property>
<property name="TLS - Truststore">{{.LdapConfiguration.TLSTruststore}}</property>
<property name="TLS - Truststore Password">{{.LdapConfiguration.TLSTruststorePassword}}</property>
<property name="TLS - Truststore Type">{{.LdapConfiguration.TLSTruststoreType}}</property>
<property name="TLS - Client Auth">{{.LdapConfiguration.ClientAuth}}</property>
<property name="TLS - Protocol">{{.LdapConfiguration.Protocol}}</property>
<property name="TLS - Shutdown Gracefully">{{.LdapConfiguration.ShutdownGracefully}}</property>

<property name="Referral Strategy">FOLLOW</property>
<property name="Referral Strategy">{{.LdapConfiguration.ReferralStrategy}}</property>
<property name="Referral Strategy">{{or .LdapConfiguration.ReferralStrategy "FOLLOW"}}</property>
wrender marked this conversation as resolved.
Show resolved Hide resolved
<property name="Connect Timeout">10 secs</property>
<property name="Read Timeout">10 secs</property>
<property name="Url">{{.LdapConfiguration.Url}}</property>
Expand Down