Skip to content

Commit

Permalink
Add ldap idp support
Browse files Browse the repository at this point in the history
  • Loading branch information
yadzhang authored and choujimmy committed Jan 17, 2020
1 parent 82a6864 commit 8ac9e51
Show file tree
Hide file tree
Showing 30 changed files with 1,572 additions and 289 deletions.
11 changes: 11 additions & 0 deletions api/auth/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ type Group struct {
metav1.ObjectMeta
// Spec defines the desired identities of group in this set.
Spec GroupSpec

Status GroupStatus
}

// GroupSpec is a description of an Group.
Expand All @@ -230,6 +232,12 @@ type GroupSpec struct {
Description string
}

// GroupStatus represents information about the status of a group.
type GroupStatus struct {
// Users represents the members of the group.
Users []Subject
}

// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

Expand Down Expand Up @@ -783,6 +791,9 @@ type IdentityProviderSpec struct {
Name string
// The type of the connector. E.g. 'oidc' or 'ldap'
Type string

// The admins means the users is super admin for the idp.
Admins []string
// Config holds all the configuration information specific to the connector type. Since there
// no generic struct we can use for this purpose, it is stored as a json string.
Config string
Expand Down
720 changes: 500 additions & 220 deletions api/auth/v1/generated.pb.go

Large diffs are not rendered by default.

17 changes: 14 additions & 3 deletions api/auth/v1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 13 additions & 3 deletions api/auth/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,16 +231,24 @@ type Group struct {
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec defines the desired identities of group in this set.
Spec GroupSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`

Status GroupStatus `json:"status" protobuf:"bytes,3,opt,name=status"`
}

// GroupSpec is a description of an Group.
// GroupSpec is a description of a Group.
type GroupSpec struct {
ID string `json:"id" protobuf:"bytes,1,opt,name=id"`
DisplayName string `json:"displayName" protobuf:"bytes,2,opt,name=displayName"`
TenantID string `json:"tenantID" protobuf:"bytes,3,opt,name=tenantID"`
Description string `json:"description" protobuf:"bytes,4,opt,name=description"`
}

// GroupStatus represents information about the status of a group.
type GroupStatus struct {
// Users represents the members of the group.
Users []Subject `json:"users" protobuf:"bytes,2,rep,name=users"`
}

// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

Expand Down Expand Up @@ -836,9 +844,11 @@ type IdentityProviderList struct {
// IdentityProviderSpec is a description of an identity provider.
type IdentityProviderSpec struct {
// The Name of the connector that is used when displaying it to the end user.
Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
// The type of the connector. E.g. 'oidc' or 'ldap'
Type string `json:"type" protobuf:"bytes,3,opt,name=type"`
Type string `json:"type" protobuf:"bytes,2,opt,name=type"`
// The admins means the users is super admin for the idp.
Admins []string `json:"admin" protobuf:"bytes,3,opt,name=admins"`
// Config holds all the configuration information specific to the connector type. Since there
// no generic struct we can use for this purpose, it is stored as a json string.
Config string `json:"config" protobuf:"bytes,4,opt,name=config"`
Expand Down
12 changes: 11 additions & 1 deletion api/auth/v1/types_swagger_doc_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions api/auth/v1/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 28 additions & 1 deletion api/auth/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 28 additions & 1 deletion api/auth/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8ac9e51

Please sign in to comment.