Skip to content

Revert "CLOUDP-319308: Add LDAP support to AtlasDatabaseUser" #2335

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

Merged
merged 1 commit into from
May 19, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
7 changes: 0 additions & 7 deletions api/v1/atlasdatabaseuser_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,6 @@ type AtlasDatabaseUserSpec struct {
// +kubebuilder:validation:Enum:=NONE;MANAGED;CUSTOMER
// +optional
X509Type string `json:"x509Type,omitempty"`

// Part of the Lightweight Directory Access Protocol (LDAP) record that
// the database uses to authenticate this database user on the LDAP host.
// +kubebuilder:default:=NONE
// +kubebuilder:validation:Enum:=NONE;GROUP;USER
// +optional
LDAPAuthType string `json:"ldapAuthType,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down
10 changes: 0 additions & 10 deletions config/crd/bases/atlas.mongodb.com_atlasdatabaseusers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,6 @@ spec:
- value
type: object
type: array
ldapAuthType:
default: NONE
description: |-
Part of the Lightweight Directory Access Protocol (LDAP) record that
the database uses to authenticate this database user on the LDAP host.
enum:
- NONE
- GROUP
- USER
type: string
oidcAuthType:
default: NONE
description: |-
Expand Down
6 changes: 0 additions & 6 deletions internal/controller/atlasdatabaseuser/databaseuser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2116,7 +2116,6 @@ func TestHasChanged(t *testing.T) {
OIDCAuthType: "NONE",
AWSIAMType: "NONE",
X509Type: "NONE",
LDAPAuthType: "NONE",
},
ProjectID: "project-id",
},
Expand All @@ -2127,7 +2126,6 @@ func TestHasChanged(t *testing.T) {
OIDCAuthType: "NONE",
AWSIAMType: "NONE",
X509Type: "NONE",
LDAPAuthType: "NONE",
},
ProjectID: "project-id",
},
Expand All @@ -2143,7 +2141,6 @@ func TestHasChanged(t *testing.T) {
OIDCAuthType: "NONE",
AWSIAMType: "NONE",
X509Type: "MANAGED",
LDAPAuthType: "NONE",
},
ProjectID: "project-id",
},
Expand All @@ -2154,7 +2151,6 @@ func TestHasChanged(t *testing.T) {
OIDCAuthType: "NONE",
AWSIAMType: "NONE",
X509Type: "NONE",
LDAPAuthType: "NONE",
},
ProjectID: "project-id",
},
Expand All @@ -2170,7 +2166,6 @@ func TestHasChanged(t *testing.T) {
OIDCAuthType: "NONE",
AWSIAMType: "NONE",
X509Type: "NONE",
LDAPAuthType: "NONE",
},
ProjectID: "project-id",
},
Expand All @@ -2181,7 +2176,6 @@ func TestHasChanged(t *testing.T) {
OIDCAuthType: "NONE",
AWSIAMType: "NONE",
X509Type: "NONE",
LDAPAuthType: "NONE",
},
ProjectID: "project-id",
},
Expand Down
2 changes: 0 additions & 2 deletions internal/translation/dbuser/conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ func fromAtlas(dbUser *admin.CloudDatabaseUser) (*User, error) {
OIDCAuthType: dbUser.GetOidcAuthType(),
AWSIAMType: dbUser.GetAwsIAMType(),
X509Type: dbUser.GetX509Type(),
LDAPAuthType: dbUser.GetLdapAuthType(),
},
}
if err := normalize(u.AtlasDatabaseUserSpec); err != nil {
Expand Down Expand Up @@ -162,7 +161,6 @@ func toAtlas(au *User) (*admin.CloudDatabaseUser, error) {
Username: au.Username,
Password: pointer.MakePtrOrNil(au.Password),
OidcAuthType: pointer.MakePtrOrNil(au.OIDCAuthType),
LdapAuthType: pointer.MakePtrOrNil(au.LDAPAuthType),
}, nil
}

Expand Down
2 changes: 0 additions & 2 deletions internal/translation/dbuser/conversion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ func TestDiffSpecs(t *testing.T) {
spec.OIDCAuthType = "IDP_GROUP"
spec.AWSIAMType = "USER"
spec.X509Type = "MANAGED"
spec.LDAPAuthType = "GROUP"
return spec
}(),
},
Expand All @@ -283,7 +282,6 @@ func TestDiffSpecs(t *testing.T) {
"oidcAuthType",
"awsIamType",
"x509Type",
"ldapAuthType",
},
},

Expand Down
Loading