-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsso-operator-config
161 lines (158 loc) · 3.39 KB
/
sso-operator-config
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
echo '
apiVersion: v1
kind: Namespace
metadata:
name: sso-app-demo
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: sso-operator-group
namespace: sso-app-demo
spec:
targetNamespaces:
- sso-app-demo
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: rhsso-operator
namespace: sso-app-demo
spec:
channel: alpha
installPlanApproval: Automatic
name: rhsso-operator
source: redhat-operators
sourceNamespace: openshift-marketplace' | oc apply -f -
echo '
---
apiVersion: keycloak.org/v1alpha1
kind: Keycloak
metadata:
name: example-sso
labels:
app: sso
spec:
instances: 1
externalAccess:
enabled: True
storageClassName: "thin"
---
apiVersion: keycloak.org/v1alpha1
kind: KeycloakRealm
metadata:
name: openshift
labels:
app: sso
spec:
realm:
id: "openshift"
realm: "openshift"
enabled: True
displayName: "OpenShift Realm"
instanceSelector:
matchLabels:
app: sso
---
apiVersion: keycloak.org/v1alpha1
kind: KeycloakUser
metadata:
name: openshift-user
spec:
user:
username: "testuser"
firstName: "Test"
lastName: "User"
email: "[email protected]"
enabled: True
emailVerified: False
credentials:
- type: "password"
value: "test"
realmRoles:
- "offline_access"
- "uma_authorization"
clientRoles:
account:
- "manage-account"
realm-management:
- "manage-users"
realmSelector:
matchLabels:
app: sso
---
apiVersion: keycloak.org/v1alpha1
kind: KeycloakUser
metadata:
name: openshift-user2
spec:
user:
username: "testuser2"
firstName: "Test"
lastName: "User2"
email: "[email protected]"
enabled: True
emailVerified: False
credentials:
- type: "password"
value: "test"
realmRoles:
- "offline_access"
- "uma_authorization"
clientRoles:
account:
- "manage-account"
realm-management:
- "manage-users"
realmSelector:
matchLabels:
app: sso
---
apiVersion: keycloak.org/v1alpha1
kind: KeycloakClient
metadata:
name: openshift-demo
labels:
app: sso
spec:
realmSelector:
matchLabels:
app: sso
client:
clientId: openshift-demo
name: openshift-demo
surrogateAuthRequired: False
enabled: true
clientAuthenticatorType: client-secret
redirectUris:
- https://oauth-openshift.apps.autoupivmw.example.com/*
webOrigins: []
notBefore: 0
bearerOnly: False
consentRequired: False
standardFlowEnabled: True
implicitFlowEnabled: False
directAccessGrantsEnabled: True
serviceAccountsEnabled: False
publicClient: False
frontchannelLogout: False
protocol: openid-connect
attributes:
saml.assertion.signature: "false"
saml.multivalued.roles: "false"
saml.force.post.binding: "false"
saml.encrypt: "false"
saml.server.signature: "false"
saml.server.signature.keyinfo.ext: "false"
exclude.session.state.from.auth.response: "false"
saml_force_name_id_format: "false"
saml.client.signature: "false"
tls.client.certificate.bound.access.tokens: "false"
saml.authnstatement: "false"
display.on.consent.screen: "false"
saml.onetimeuse.condition: "false"
fullScopeAllowed: True
access:
view: True
configure: True
manage: True' | oc apply -f - -n sso-app-demo