Skip to content
This repository was archived by the owner on Nov 16, 2022. It is now read-only.

Commit 170bc30

Browse files
Faisal Masoodslaskawi
authored andcommitted
KEYCLOAK-17607
1 parent 7cafc46 commit 170bc30

5 files changed

Lines changed: 39 additions & 9 deletions

File tree

deploy/crds/keycloak.org_keycloakrealms_crd.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,14 @@ spec:
7777
realm:
7878
description: Keycloak Realm REST object.
7979
properties:
80-
accessTokenLifespanForImplicitFlow:
81-
description: 'Max time before an access token issued during OpenID Connect Implicit Flow is expired.
82-
This value is recommended to be shorter than SSO timeout.
83-
There is no possibility to refresh token during implicit flow,
84-
thats why there is a separate timeout different to Access Token Lifespan.'
85-
type: integer
86-
format: int32
8780
accessTokenLifespan:
88-
description: 'Max time before an access token is expired. This value is recommended to be short relative to the SSO timeout.'
81+
description: Access Token Lifespan
82+
format: int32
8983
type: integer
84+
accessTokenLifespanForImplicitFlow:
85+
description: Access Token Lifespan For Implicit Flow
9086
format: int32
87+
type: integer
9188
accountTheme:
9289
description: Account Theme
9390
type: string
@@ -826,7 +823,7 @@ spec:
826823
description: Realm display name.
827824
type: string
828825
displayNameHtml:
829-
description: Realm display name in HTML.
826+
description: Realm HTML display name.
830827
type: string
831828
duplicateEmailsAllowed:
832829
description: Duplicate emails
@@ -921,6 +918,9 @@ spec:
921918
description: Minimum Quick Login Wait
922919
format: int32
923920
type: integer
921+
passwordPolicy:
922+
description: Realm Password Policy
923+
type: string
924924
permanentLockout:
925925
description: Permanent Lockout
926926
type: boolean
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: keycloak.org/v1alpha1
2+
kind: KeycloakRealm
3+
metadata:
4+
name: example-keycloakrealm
5+
labels:
6+
app: sso
7+
spec:
8+
realm:
9+
id: "basic"
10+
realm: "basic"
11+
enabled: True
12+
displayName: "Basic Realm"
13+
passwordPolicy: "lowerCase(1)"
14+
instanceSelector:
15+
matchLabels:
16+
app: sso

pkg/apis/keycloak/v1alpha1/keycloakrealm_types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ type KeycloakAPIRealm struct {
3838
// Realm HTML display name.
3939
// +optional
4040
DisplayNameHTML string `json:"displayNameHtml,omitempty"`
41+
// Realm Password Policy
42+
// +optional
43+
PasswordPolicy string `json:"passwordPolicy,omitempty"`
4144
// A set of Keycloak Users.
4245
// +optional
4346
Users []*KeycloakAPIUser `json:"users,omitempty"`

pkg/apis/keycloak/v1alpha1/zz_generated.deepcopy.go

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/e2e/keycloak_realm_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ func getKeycloakRealmCR(namespace string) *keycloakv1alpha1.KeycloakRealm {
6363
Enabled: true,
6464
DisplayName: "Operator Testing Realm",
6565
DisplayNameHTML: "<div class='kc-logo-text'><span>Operator Testing Realm</span></div>",
66+
PasswordPolicy: "lowerCase(1)",
6667
BruteForceProtected: &[]bool{true}[0],
6768
PermanentLockout: &[]bool{false}[0],
6869
FailureFactor: &[]int32{30}[0],

0 commit comments

Comments
 (0)