@@ -19,6 +19,18 @@ class { 'keycloak': }
19
19
'Keycloak_flow_execution[duo-universal under form-browser-with-duo on test]',
20
20
],
21
21
}
22
+ keycloak::spi_deployment { 'osc-keycloak-scripts':
23
+ deployed_name => 'osc-keycloak-scripts-jar-with-dependencies.jar',
24
+ source => "https://github.com/OSC/osc-keycloak-scripts/releases/download/1.1.0/osc-keycloak-scripts-jar-with-dependencies.jar",
25
+ test_url => 'authentication/authenticator-providers',
26
+ test_key => 'id',
27
+ test_value => 'script-user-enabled-authenticator.js',
28
+ test_realm => 'test',
29
+ test_before => [
30
+ 'Keycloak_flow[form-browser-with-duo]',
31
+ 'Keycloak_flow_execution[script-user-enabled-authenticator.js under form-browser-with-duo on test]',
32
+ ],
33
+ }
22
34
keycloak_realm { 'test': ensure => 'present' }
23
35
keycloak_flow { 'browser-with-duo on test':
24
36
ensure => 'present',
@@ -52,6 +64,11 @@ class { 'keycloak': }
52
64
priority => 10,
53
65
requirement => 'REQUIRED',
54
66
}
67
+ keycloak_flow_execution { 'script-user-enabled-authenticator.js under form-browser-with-duo on test':
68
+ ensure => 'present',
69
+ requirement => 'REQUIRED',
70
+ priority => 15,
71
+ }
55
72
keycloak_flow_execution { 'duo-universal under form-browser-with-duo on test':
56
73
ensure => 'present',
57
74
configurable => true,
@@ -93,8 +110,10 @@ class { 'keycloak': }
93
110
expect ( form [ 'description' ] ) . to eq ( 'Form Browser with DUO' )
94
111
auth_form = data . find { |d | d [ 'providerId' ] == 'auth-username-password-form' }
95
112
expect ( auth_form [ 'index' ] ) . to eq ( 0 )
113
+ script = data . find { |d | d [ 'authenticationConfig' ] == 'script-user-enabled-authenticator.js' }
114
+ expect ( script [ 'index' ] ) . to eq ( 1 )
96
115
duo = data . find { |d | d [ 'providerId' ] == 'duo-universal' }
97
- expect ( duo [ 'index' ] ) . to eq ( 1 )
116
+ expect ( duo [ 'index' ] ) . to eq ( 2 )
98
117
end
99
118
end
100
119
end
@@ -115,6 +134,18 @@ class { 'keycloak': }
115
134
'Keycloak_flow_execution[duo-universal under form-browser-with-duo on test]',
116
135
],
117
136
}
137
+ keycloak::spi_deployment { 'osc-keycloak-scripts':
138
+ deployed_name => 'osc-keycloak-scripts-jar-with-dependencies.jar',
139
+ source => "https://github.com/OSC/osc-keycloak-scripts/releases/download/1.1.0/osc-keycloak-scripts-jar-with-dependencies.jar",
140
+ test_url => 'authentication/authenticator-providers',
141
+ test_key => 'id',
142
+ test_value => 'script-user-enabled-authenticator.js',
143
+ test_realm => 'test',
144
+ test_before => [
145
+ 'Keycloak_flow[form-browser-with-duo]',
146
+ 'Keycloak_flow_execution[script-user-enabled-authenticator.js under form-browser-with-duo on test]',
147
+ ],
148
+ }
118
149
keycloak_realm { 'test': ensure => 'present' }
119
150
keycloak_flow { 'browser-with-duo on test':
120
151
ensure => 'present',
@@ -161,6 +192,11 @@ class { 'keycloak': }
161
192
priority => 25,
162
193
requirement => 'REQUIRED',
163
194
}
195
+ keycloak_flow_execution { 'script-user-enabled-authenticator.js under form-browser-with-duo on test':
196
+ ensure => 'present',
197
+ requirement => 'REQUIRED',
198
+ priority => 35,
199
+ }
164
200
PUPPET_PP
165
201
166
202
apply_manifest ( pp , catch_failures : true )
@@ -187,6 +223,8 @@ class { 'keycloak': }
187
223
expect ( auth_form [ 'index' ] ) . to eq ( 1 )
188
224
duo = data . find { |d | d [ 'providerId' ] == 'duo-universal' }
189
225
expect ( duo [ 'index' ] ) . to eq ( 0 )
226
+ script = data . find { |d | d [ 'authenticationConfig' ] == 'script-user-enabled-authenticator.js' }
227
+ expect ( script [ 'index' ] ) . to eq ( 2 )
190
228
end
191
229
end
192
230
end
0 commit comments