Skip to content

Commit 78118d9

Browse files
committed
test: Use Keycloak version 26.3 for tests (#192)
- Updated Keycloak version to 26.3 for test cases. - Tests: changed the alias and providerId from "instagram" to "github" because the "instagram" provider was deprecated and isn't available by default. - Added a note about the FGAP:V1 for KeycloakClient.Spec.AdminFineGrainedPermissionsEnabled. More details: https://www.keycloak.org/docs/latest/upgrading/index.html#migrating-to-26-2-0
1 parent 3fd91d9 commit 78118d9

File tree

13 files changed

+39
-41
lines changed

13 files changed

+39
-41
lines changed

api/v1/keycloakclient_types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ type KeycloakClientSpec struct {
132132
AuthorizationServicesEnabled bool `json:"authorizationServicesEnabled,omitempty"`
133133

134134
// AdminFineGrainedPermissionsEnabled enable/disable fine-grained admin permissions for a client.
135-
// Feature flag ADMIN_FINE_GRAINED_AUTHZ should be enabled in Keycloak server.
135+
// Feature flag admin-fine-grained-authz:v1 should be enabled in Keycloak server.
136+
// Important: FGAP:V1 Keycloak feature remains in preview and may be deprecated and removed in a future releases.
136137
// +optional
137138
AdminFineGrainedPermissionsEnabled bool `json:"adminFineGrainedPermissionsEnabled,omitempty"`
138139

bundle/manifests/edp-keycloak-operator.clusterserviceversion.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -454,12 +454,11 @@ metadata:
454454
"name": "keycloakrealmidentityprovider-sample"
455455
},
456456
"spec": {
457-
"alias": "instagram",
457+
"alias": "github",
458458
"authenticateByDefault": false,
459459
"config": {
460460
"clientId": "foo",
461461
"clientSecret": "$secretName:secretKey",
462-
"hideOnLoginPage": "true",
463462
"syncMode": "IMPORT",
464463
"useJwksUrl": "true"
465464
},
@@ -471,7 +470,7 @@ metadata:
471470
"role": "role-tr",
472471
"syncMode": "INHERIT"
473472
},
474-
"identityProviderAlias": "instagram",
473+
"identityProviderAlias": "github",
475474
"identityProviderMapper": "oidc-hardcoded-role-idp-mapper",
476475
"name": "test3212"
477476
},
@@ -481,12 +480,12 @@ metadata:
481480
"attribute.value": "bar",
482481
"syncMode": "IMPORT"
483482
},
484-
"identityProviderAlias": "instagram",
483+
"identityProviderAlias": "github",
485484
"identityProviderMapper": "hardcoded-attribute-idp-mapper",
486485
"name": "test-33221"
487486
}
488487
],
489-
"providerId": "instagram",
488+
"providerId": "github",
490489
"realmRef": {
491490
"kind": "KeycloakRealm",
492491
"name": "keycloakrealm-sample"

config/crd/bases/v1.edp.epam.com_keycloakclients.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ spec:
4747
adminFineGrainedPermissionsEnabled:
4848
description: |-
4949
AdminFineGrainedPermissionsEnabled enable/disable fine-grained admin permissions for a client.
50-
Feature flag ADMIN_FINE_GRAINED_AUTHZ should be enabled in Keycloak server.
50+
Feature flag admin-fine-grained-authz:v1 should be enabled in Keycloak server.
51+
Important: FGAP:V1 Keycloak feature remains in preview and may be deprecated and removed in a future releases.
5152
type: boolean
5253
adminUrl:
5354
description: |-

config/samples/v1_v1_keycloakrealmidentityprovider.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,26 @@ spec:
66
realmRef:
77
name: keycloakrealm-sample
88
kind: KeycloakRealm
9-
alias: instagram
9+
alias: github
1010
authenticateByDefault: false
1111
enabled: true
1212
firstBrokerLoginFlowAlias: "first broker login"
13-
providerId: "instagram"
13+
providerId: "github"
1414
config:
1515
clientId: "foo"
1616
clientSecret: "$secretName:secretKey"
17-
hideOnLoginPage: "true"
1817
syncMode: "IMPORT"
1918
useJwksUrl: "true"
2019
mappers:
2120
- name: "test3212"
2221
identityProviderMapper: "oidc-hardcoded-role-idp-mapper"
23-
identityProviderAlias: "instagram"
22+
identityProviderAlias: "github"
2423
config:
2524
role: "role-tr"
2625
syncMode: "INHERIT"
2726
- name: "test-33221"
2827
identityProviderMapper: "hardcoded-attribute-idp-mapper"
29-
identityProviderAlias: "instagram"
28+
identityProviderAlias: "github"
3029
config:
3130
attribute: "foo"
3231
"attribute.value": "bar"

deploy-templates/Chart.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,30 +183,29 @@ annotations:
183183
- apiVersion: v1.edp.epam.com/v1
184184
kind: KeycloakRealmIdentityProvider
185185
metadata:
186-
name: instagram-test
186+
name: github-test
187187
spec:
188188
realm: d2-id-k8s-realm-name
189-
alias: instagram
189+
alias: github
190190
authenticateByDefault: false
191191
enabled: true
192192
firstBrokerLoginFlowAlias: "first broker login"
193-
providerId: "instagram"
193+
providerId: "github"
194194
config:
195195
clientId: "foo"
196196
clientSecret: "bar"
197-
hideOnLoginPage: "true"
198197
syncMode: "IMPORT"
199198
useJwksUrl: "true"
200199
mappers:
201200
- name: "test3212"
202201
identityProviderMapper: "oidc-hardcoded-role-idp-mapper"
203-
identityProviderAlias: "instagram"
202+
identityProviderAlias: "github"
204203
config:
205204
role: "role-tr"
206205
syncMode: "INHERIT"
207206
- name: "test-33221"
208207
identityProviderMapper: "hardcoded-attribute-idp-mapper"
209-
identityProviderAlias: "instagram"
208+
identityProviderAlias: "github"
210209
config:
211210
attribute: "foo"
212211
"attribute.value": "bar"

deploy-templates/_crd_examples/keycloakrealmidentityprovider.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,20 @@ spec:
66
realmRef:
77
kind: KeycloakRealm
88
name: keycloakrealm-sample
9-
alias: instagram
9+
alias: github
1010
authenticateByDefault: false
1111
enabled: true
1212
firstBrokerLoginFlowAlias: "first broker login"
13-
providerId: "instagram"
13+
providerId: "github"
1414
config:
1515
clientId: "foo"
1616
clientSecret: "$secretName:secretKey"
17-
hideOnLoginPage: "true"
1817
syncMode: "IMPORT"
1918
useJwksUrl: "true"
2019
mappers:
2120
- name: "test-33221"
2221
identityProviderMapper: "hardcoded-attribute-idp-mapper"
23-
identityProviderAlias: "instagram"
22+
identityProviderAlias: "github"
2423
config:
2524
attribute: "foo"
2625
"attribute.value": "bar"

deploy-templates/crds/v1.edp.epam.com_keycloakclients.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ spec:
4747
adminFineGrainedPermissionsEnabled:
4848
description: |-
4949
AdminFineGrainedPermissionsEnabled enable/disable fine-grained admin permissions for a client.
50-
Feature flag ADMIN_FINE_GRAINED_AUTHZ should be enabled in Keycloak server.
50+
Feature flag admin-fine-grained-authz:v1 should be enabled in Keycloak server.
51+
Important: FGAP:V1 Keycloak feature remains in preview and may be deprecated and removed in a future releases.
5152
type: boolean
5253
adminUrl:
5354
description: |-

docs/api.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1967,7 +1967,8 @@ KeycloakClientSpec defines the desired state of KeycloakClient.
19671967
<td>boolean</td>
19681968
<td>
19691969
AdminFineGrainedPermissionsEnabled enable/disable fine-grained admin permissions for a client.
1970-
Feature flag ADMIN_FINE_GRAINED_AUTHZ should be enabled in Keycloak server.<br/>
1970+
Feature flag admin-fine-grained-authz:v1 should be enabled in Keycloak server.
1971+
Important: FGAP:V1 Keycloak feature remains in preview and may be deprecated and removed in a future releases.<br/>
19711972
</td>
19721973
<td>false</td>
19731974
</tr><tr>

internal/controller/keycloakrealmidentityprovider/keycloakrealmidentityprovider_controller_integration_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ var _ = Describe("KeycloakRealmIdentityProvider controller", func() {
4545
Name: KeycloakRealmCR,
4646
Kind: keycloakApi.KeycloakRealmKind,
4747
},
48-
ProviderID: "instagram",
48+
ProviderID: "github",
4949
Alias: "new-provider",
5050
Config: map[string]string{
5151
"clientId": "provider-client",
@@ -95,7 +95,7 @@ var _ = Describe("KeycloakRealmIdentityProvider controller", func() {
9595
Name: KeycloakRealmCR,
9696
Kind: keycloakApi.KeycloakRealmKind,
9797
},
98-
ProviderID: "instagram",
98+
ProviderID: "github",
9999
Alias: "identity-provider-with-preserve-resources-on-deletion",
100100
Enabled: true,
101101
DisplayName: "New provider",

tests/e2e/helm-success-path/01-install-keycloak-server.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,20 @@ spec:
6262
- name: configs
6363
mountPath: /etc/nginx/conf.d
6464
- name: keycloak
65-
image: quay.io/keycloak/keycloak:24.0.4
65+
image: quay.io/keycloak/keycloak:26.3
6666
args:
6767
- "start-dev"
6868
- "--proxy-headers"
6969
- "forwarded"
7070
- "--http-enabled"
7171
- "true"
7272
env:
73-
- name: KEYCLOAK_ADMIN
73+
- name: KC_BOOTSTRAP_ADMIN_USERNAME
7474
value: "admin"
75-
- name: KEYCLOAK_ADMIN_PASSWORD
75+
- name: KC_BOOTSTRAP_ADMIN_PASSWORD
7676
value: "admin"
7777
- name: KC_FEATURES
78-
value: admin-fine-grained-authz
78+
value: admin-fine-grained-authz:v1
7979
ports:
8080
- name: http
8181
containerPort: 8080

0 commit comments

Comments
 (0)