-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
276 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Example 1: User Federation Group Mapper | ||
# This example fetches an LDAP group from an OpenLDAP server into Keycloak. | ||
apiVersion: ldap.keycloak.crossplane.io/v1alpha1 | ||
kind: GroupMapper | ||
metadata: | ||
name: admin-group | ||
spec: | ||
forProvider: | ||
name: "amsterdam" | ||
ldapGroupsDn: "ou=groups,dc=example,dc=local" | ||
groupNameLdapAttribute: "cn" | ||
groupObjectClasses: ["groupOfNames"] | ||
groupsPath: "LDAP-ADMIN" | ||
membershipLdapAttribute: "member" | ||
membershipAttributeType: "DN" | ||
membershipUserLdapAttribute: "memberOf" | ||
groupsLdapFilter: "(&(objectClass=groupOfNames)(cn=amsterdam))" | ||
mode: "READ_ONLY" | ||
userRolesRetrieveStrategy: "LOAD_GROUPS_BY_MEMBER_ATTRIBUTE" | ||
preserveGroupInheritance: false | ||
memberofLdapAttribute: "memberOf" | ||
ldapUserFederationIdRef: | ||
name: example | ||
realmId: my-realm | ||
providerConfigRef: | ||
name: keycloak-provider-config | ||
|
||
--- | ||
# Example 2: User Federation Group Mapper | ||
# This example fetches an LDAP group from an Active Directory server into Keycloak. | ||
apiVersion: ldap.keycloak.crossplane.io/v1alpha1 | ||
kind: GroupMapper | ||
metadata: | ||
name: admin-group | ||
spec: | ||
forProvider: | ||
name: "amsterdam" | ||
ldapGroupsDn: "ou=groups,dc=example,dc=local" | ||
groupNameLdapAttribute: "cn" | ||
groupObjectClasses: ["group"] | ||
groupsPath: "LDAP-ADMIN" | ||
membershipLdapAttribute: "member" | ||
membershipAttributeType: "DN" | ||
membershipUserLdapAttribute: "sAMAccountName" | ||
groupsLdapFilter: "(&(objectClass=group)(cn=amsterdam))" | ||
mode: "READ_ONLY" | ||
userRolesRetrieveStrategy: "LOAD_GROUPS_BY_MEMBER_ATTRIBUTE" | ||
preserveGroupInheritance: false | ||
memberofLdapAttribute: "memberOf" | ||
ldapUserFederationIdRef: | ||
name: example | ||
realmId: my-realm | ||
providerConfigRef: | ||
name: keycloak-provider-config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Example 1: To map a Client Role to all LDAP users | ||
# This example maps a Client Role named k8s-admin from the Kubernetes client to all LDAP users. | ||
apiVersion: ldap.keycloak.crossplane.io/v1alpha1 | ||
kind: HardcodedRoleMapper | ||
metadata: | ||
name: default-kubernetes-role | ||
spec: | ||
forProvider: | ||
name: "default-kubernetes-role" | ||
role: kubernetes.k8s-admin # Client.<Role name> | ||
ldapUserFederationIdRef: | ||
name: my-realm | ||
realmId: my-realm | ||
providerConfigRef: | ||
name: keycloak-provider-config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Example 1: to add User Attribute Mapper in User Federation | ||
# This example creates a new firstname mapper to use givenName as the LDAP attribute. | ||
apiVersion: ldap.keycloak.crossplane.io/v1alpha1 | ||
kind: UserAttributeMapper | ||
metadata: | ||
name: firstname | ||
spec: | ||
forProvider: | ||
name: "firstname" | ||
userModelAttribute: "firstName" | ||
ldapAttribute: "givenName" | ||
alwaysReadValueFromLdap: true | ||
ldapUserFederationIdRef: | ||
name: my-realm | ||
realmId: my-realm | ||
providerConfigRef: | ||
name: keycloak-provider-config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Example 1: User Federation to integrate LDAP with Keycloak | ||
# This example integrates OpenLDAP with Keycloak.. | ||
apiVersion: ldap.keycloak.crossplane.io/v1alpha1 | ||
kind: UserFederation | ||
metadata: | ||
name: my-realm | ||
spec: | ||
forProvider: | ||
name: "example" | ||
connectionUrl: "ldap://10.0.1.8:389" | ||
startTls: false | ||
bindDn: "cn=admin,dc=example,dc=local" | ||
bindCredentialSecretRef: | ||
key: "password" | ||
name: "ldap-password" | ||
namespace: "crossplane-system" | ||
editMode: "UNSYNCED" | ||
usersDn: "ou=users,dc=example,dc=local" | ||
usernameLdapAttribute: "uid" | ||
rdnLdapAttribute: "uid" | ||
uuidLdapAttribute: "entryUUID" | ||
userObjectClasses: ["inetOrgPerson", "shadowAccount"] | ||
searchScope: "SUBTREE" | ||
importEnabled: true | ||
batchSizeForSync: 100 | ||
changedSyncPeriod: 604800 | ||
trustEmail: true | ||
validatePasswordPolicy: false | ||
realmId: my-realm | ||
providerConfigRef: | ||
name: keycloak-provider-config | ||
|
||
# Example 2: User Federation to integrate LDAP with Keycloak | ||
# This example integrates Active Directory with Keycloak. | ||
apiVersion: ldap.keycloak.crossplane.io/v1alpha1 | ||
kind: UserFederation | ||
metadata: | ||
name: my-realm | ||
spec: | ||
forProvider: | ||
name: "example" | ||
connectionUrl: "ldap://10.0.1.8:389" | ||
startTls: false | ||
bindDn: "cn=admin,dc=example,dc=local" | ||
bindCredentialSecretRef: | ||
key: "password" | ||
name: "ldap-password" | ||
namespace: "crossplane-system" | ||
editMode: "UNSYNCED" | ||
usersDn: "ou=users,dc=example,dc=local" | ||
usernameLdapAttribute: "sAMAccountName" | ||
rdnLdapAttribute: "cn" | ||
uuidLdapAttribute: "sAMAccountName" | ||
userObjectClasses: ["person", "organizationalPerson","user"] | ||
searchScope: "SUBTREE" | ||
importEnabled: true | ||
batchSizeForSync: 100 | ||
changedSyncPeriod: 604800 | ||
trustEmail: true | ||
validatePasswordPolicy: false | ||
realmId: my-realm | ||
providerConfigRef: | ||
name: keycloak-provider-config |