-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathkeycloakclient.yaml
128 lines (124 loc) · 2.96 KB
/
keycloakclient.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
apiVersion: v1.edp.epam.com/v1
kind: KeycloakClient
metadata:
name: keycloakclient-sample
spec:
realmRef:
name: keycloakrealm-sample
kind: KeycloakRealm
advancedProtocolMappers: true
clientId: agocd
directAccess: true
public: false
secret: $client-secret-name:client-secret-key
webUrl: https://argocd.example.com
adminUrl: https://admin.example.com
homeUrl: /home/
defaultClientScopes:
- groups
redirectUris:
- /url1/*
- /url2/*
---
apiVersion: v1.edp.epam.com/v1
kind: KeycloakClient
metadata:
name: keycloakclient-authorization-sample
spec:
realmRef:
name: keycloakrealm-sample
kind: KeycloakRealm
clientId: authorization-sample
secret: $client-secret-authorization-sample:client-secret-key
webUrl: https://example.com
directAccess: true
authorizationServicesEnabled: true
serviceAccount:
enabled: true
authorization:
scopes:
- scope1
resources:
- name: resource1
displayName: Resource 1
type: test
iconUri: https://example.com/icon.png
scopes:
- scope1
policies:
- name: role-policy
type: role
decisionStrategy: AFFIRMATIVE
logic: POSITIVE
description: "Role policy"
rolePolicy:
roles:
- name: developer
required: true
- type: aggregate
name: aggregate-policy
description: "Aggregate policy"
aggregatedPolicy:
policies:
- policy1
- policy2
- type: client
name: client-policy
description: "Client policy"
clientPolicy:
clients:
- client1
- client2
- type: group
name: group-policy
description: "Group policy"
groupPolicy:
groups:
- name: group1
extendChildren: true
- type: role
name: role-policy
description: "Role policy"
rolePolicy:
roles:
- name: developer
required: true
- type: time
name: time-policy
description: "Time policy"
timePolicy:
notBefore: "2021-01-01T00:00:00Z"
notOnOrAfter: "2021-12-31T23:59:59Z"
- type: user
name: user-policy
description: "User policy"
userPolicy:
users:
- user1
- user2
permissions:
- name: resource-permission
type: resource
logic: POSITIVE
description: "Resource permission"
decisionStrategy: AFFIRMATIVE
policies:
- role-policy
resources:
- resource1
- name: scope-permission
type: scope
logic: POSITIVE
description: "Scope permission"
decisionStrategy: CONSENSUS
policies:
- role-policy
scopes:
- scope1
---
apiVersion: v1
kind: Secret
metadata:
name: client-secret-authorization-sample
data:
client-secret-key: cGFzc3dvcmQ=