mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:27:42 +00:00
feat(ldap): adding root ca option to ldap config (#9292)
# Which Problems Are Solved Adding ability to add a root CA to LDAP configs # Additional Context - Closes https://github.com/zitadel/zitadel/issues/7888 --------- Co-authored-by: Iraq Jaber <IraqJaber@gmail.com>
This commit is contained in:
@@ -22,6 +22,7 @@ type LDAPIDPAddedEvent struct {
|
||||
UserObjectClasses []string `json:"userObjectClasses"`
|
||||
UserFilters []string `json:"userFilters"`
|
||||
Timeout time.Duration `json:"timeout"`
|
||||
RootCA []byte `json:"rootCA"`
|
||||
|
||||
LDAPAttributes
|
||||
Options
|
||||
@@ -142,6 +143,7 @@ func NewLDAPIDPAddedEvent(
|
||||
userObjectClasses []string,
|
||||
userFilters []string,
|
||||
timeout time.Duration,
|
||||
rootCA []byte,
|
||||
attributes LDAPAttributes,
|
||||
options Options,
|
||||
) *LDAPIDPAddedEvent {
|
||||
@@ -158,6 +160,7 @@ func NewLDAPIDPAddedEvent(
|
||||
UserObjectClasses: userObjectClasses,
|
||||
UserFilters: userFilters,
|
||||
Timeout: timeout,
|
||||
RootCA: rootCA,
|
||||
LDAPAttributes: attributes,
|
||||
Options: options,
|
||||
}
|
||||
@@ -198,6 +201,7 @@ type LDAPIDPChangedEvent struct {
|
||||
UserObjectClasses []string `json:"userObjectClasses,omitempty"`
|
||||
UserFilters []string `json:"userFilters,omitempty"`
|
||||
Timeout *time.Duration `json:"timeout,omitempty"`
|
||||
RootCA []byte `json:"rootCA,omitempty"`
|
||||
|
||||
LDAPAttributeChanges
|
||||
OptionChanges
|
||||
@@ -315,6 +319,12 @@ func ChangeLDAPTimeout(timeout time.Duration) func(*LDAPIDPChangedEvent) {
|
||||
}
|
||||
}
|
||||
|
||||
func ChangeLDAPRootCA(rootCA []byte) func(*LDAPIDPChangedEvent) {
|
||||
return func(e *LDAPIDPChangedEvent) {
|
||||
e.RootCA = rootCA
|
||||
}
|
||||
}
|
||||
|
||||
func ChangeLDAPAttributes(attributes LDAPAttributeChanges) func(*LDAPIDPChangedEvent) {
|
||||
return func(e *LDAPIDPChangedEvent) {
|
||||
e.LDAPAttributeChanges = attributes
|
||||
|
Reference in New Issue
Block a user