Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

WIP 45 - Update SB response for Conjur auth failure on bind #46

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ci/configure_v5.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#!/bin/bash -ex

docker-compose exec -T conjur_5 conjurctl wait -r 30 -p 80

# load the pcf policy for the non-empty CONJUR_POLICY test
api_key=$(docker-compose exec -T conjur_5 bash -c 'rails r "puts Role[%Q{cucumber:user:admin}].api_key" 2>/dev/null')
export CONJUR_AUTHN_API_KEY="$api_key"
docker-compose run --rm --entrypoint bash client -c "conjur policy load root /app/ci/policy.yml"
7 changes: 2 additions & 5 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,9 @@ function runTests5() {
export CONJUR_APPLIANCE_URL=http://conjur_5
export CONJUR_SSL_CERTIFICATE=""

local api_key=$(docker-compose exec -T conjur_5 bash -c 'rails r "puts Role[%Q{cucumber:user:admin}].api_key" 2>/dev/null')
local api_key=$(docker-compose exec -T conjur_5 bash -c 'rails r "puts Role[%Q{cucumber:user:pcf-admin}].api_key" 2>/dev/null')
export CONJUR_AUTHN_API_KEY="$api_key"

# load the pcf policy for the non-empty CONJUR_POLICY test
docker-compose run --rm --entrypoint bash client -c "conjur policy load root /app/ci/policy.yml"

runTests
}

Expand All @@ -51,7 +48,7 @@ function runTests4() {
export CONJUR_APPLIANCE_URL=https://conjur_4/api
export CONJUR_SSL_CERTIFICATE="$(cat tmp/conjur.pem)"

local api_key=$(docker-compose exec -T conjur_4 su conjur -c "conjur-plugin-service authn env RAILS_ENV=appliance rails r \"puts User['admin'].api_key\" 2>/dev/null")
local api_key=$(docker-compose exec -T conjur_4 su conjur -c "conjur-plugin-service authn env RAILS_ENV=appliance rails r \"puts User['pcf-admin'].api_key\" 2>/dev/null")
export CONJUR_AUTHN_API_KEY="$api_key"

runTests
Expand Down