feat: ldap provider login (#5448)

Add the logic to configure and use LDAP provider as an external IDP with a dedicated login GUI.
This commit is contained in:
Stefan Benz
2023-03-24 16:18:56 +01:00
committed by GitHub
parent a8bfcc166e
commit 41ff0bbc63
40 changed files with 2240 additions and 1142 deletions

View File

@@ -2,6 +2,7 @@ package org
import (
"context"
"time"
"github.com/zitadel/zitadel/internal/crypto"
"github.com/zitadel/zitadel/internal/eventstore"
@@ -751,15 +752,16 @@ func NewLDAPIDPAddedEvent(
ctx context.Context,
aggregate *eventstore.Aggregate,
id,
name,
host,
port string,
tls bool,
baseDN,
userObjectClass,
userUniqueAttribute,
admin string,
password *crypto.CryptoValue,
name string,
servers []string,
startTLS bool,
baseDN string,
bindDN string,
bindPassword *crypto.CryptoValue,
userBase string,
userObjectClasses []string,
userFilters []string,
timeout time.Duration,
attributes idp.LDAPAttributes,
options idp.Options,
) *LDAPIDPAddedEvent {
@@ -773,14 +775,15 @@ func NewLDAPIDPAddedEvent(
),
id,
name,
host,
port,
tls,
servers,
startTLS,
baseDN,
userObjectClass,
userUniqueAttribute,
admin,
password,
bindDN,
bindPassword,
userBase,
userObjectClasses,
userFilters,
timeout,
attributes,
options,
),
@@ -803,8 +806,7 @@ type LDAPIDPChangedEvent struct {
func NewLDAPIDPChangedEvent(
ctx context.Context,
aggregate *eventstore.Aggregate,
id,
oldName string,
id string,
changes []idp.LDAPIDPChanges,
) (*LDAPIDPChangedEvent, error) {
@@ -815,7 +817,6 @@ func NewLDAPIDPChangedEvent(
LDAPIDPChangedEventType,
),
id,
oldName,
changes,
)
if err != nil {