Skip to content

Commit 8892125

Browse files
Merge pull request #222 from cyberark/build-fix
Use new AuthnOIDC ca-cert variable in test
2 parents fd964f4 + d418389 commit 8892125

2 files changed

Lines changed: 12 additions & 15 deletions

File tree

ci/oauth/keycloak/fetch_certificate

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,3 @@ openssl s_client \
1212
openssl x509 \
1313
-outform PEM \
1414
>/etc/ssl/certs/keycloak.pem
15-
16-
hash=$(openssl x509 -hash -in /etc/ssl/certs/keycloak.pem -out /dev/null)
17-
18-
ln -s /etc/ssl/certs/keycloak.pem "/etc/ssl/certs/${hash}.0"

features/step_definitions/policy_steps.rb

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -85,20 +85,19 @@
8585

8686
Given(/^I setup a keycloak authenticator$/) do
8787
$conjur.load_policy 'root', <<-POLICY
88-
- !policy
88+
- !policy
8989
id: conjur/authn-oidc/keycloak
90-
body:
91-
- !webservice
92-
93-
- !variable provider-uri
94-
- !variable client-id
95-
- !variable client-secret
90+
body:
91+
- !webservice
92+
93+
- !variable provider-uri
94+
- !variable client-id
95+
- !variable client-secret
9696
- !variable name
97-
98-
- !variable claim-mapping
99-
100-
- !variable nonce
97+
- !variable claim-mapping
98+
- !variable nonce
10199
- !variable state
100+
- !variable ca-cert
102101
103102
- !variable redirect-uri
104103
@@ -122,6 +121,7 @@
122121
@nonce = $conjur.resource("cucumber:variable:conjur/authn-oidc/keycloak/nonce")
123122
@state = $conjur.resource("cucumber:variable:conjur/authn-oidc/keycloak/state")
124123
@redirect_uri = $conjur.resource("cucumber:variable:conjur/authn-oidc/keycloak/redirect-uri")
124+
@ca_cert = $conjur.resource("cucumber:variable:conjur/authn-oidc/keycloak/ca-cert")
125125

126126
@provider_uri.add_value "https://keycloak:8443/auth/realms/master"
127127
@client_id.add_value "conjurClient"
@@ -131,4 +131,5 @@
131131
@state.add_value SecureRandom.uuid
132132
@name.add_value "keycloak"
133133
@redirect_uri.add_value "http://conjur_5/authn-oidc/keycloak/cucumber/authenticate"
134+
@ca_cert.add_value File.read("/etc/ssl/certs/keycloak.pem")
134135
end

0 commit comments

Comments
 (0)