-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #505 from cyberark/cli8
Use Conjur CLI v8.0
- Loading branch information
Showing
17 changed files
with
49 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,41 @@ | ||
#!/bin/bash | ||
#!/bin/sh | ||
set -eo pipefail | ||
|
||
if [ "$CONJUR_APPLIANCE_URL" != "" ]; then | ||
echo "Running conjur init with $CONJUR_APPLIANCE_URL" | ||
conjur init -u $CONJUR_APPLIANCE_URL -a $CONJUR_ACCOUNT | ||
conjur init -u $CONJUR_APPLIANCE_URL -a $CONJUR_ACCOUNT --self-signed --force | ||
fi | ||
|
||
# check for unset vars after checking for appliance url | ||
set -u | ||
|
||
echo "Login to Conjur with the conjur-cli" | ||
conjur authn login -u admin -p $CONJUR_ADMIN_PASSWORD | ||
conjur login -i admin -p $CONJUR_ADMIN_PASSWORD | ||
|
||
readonly POLICY_DIR="/policy" | ||
|
||
# NOTE: generated files are prefixed with the test app namespace to allow for parallel CI | ||
readonly POLICY_FILES=( | ||
"$POLICY_DIR/users.yml" | ||
"$POLICY_DIR/generated/$APP_NAMESPACE_NAME.project-authn.yml" | ||
"$POLICY_DIR/generated/$APP_NAMESPACE_NAME.cluster-authn-svc.yml" | ||
"$POLICY_DIR/generated/$APP_NAMESPACE_NAME.app-identity.yml" | ||
"$POLICY_DIR/generated/$APP_NAMESPACE_NAME.conjur-secrets.yml" | ||
set -- "$POLICY_DIR/users.yml" \ | ||
"$POLICY_DIR/generated/$APP_NAMESPACE_NAME.project-authn.yml" \ | ||
"$POLICY_DIR/generated/$APP_NAMESPACE_NAME.cluster-authn-svc.yml" \ | ||
"$POLICY_DIR/generated/$APP_NAMESPACE_NAME.app-identity.yml" \ | ||
"$POLICY_DIR/generated/$APP_NAMESPACE_NAME.conjur-secrets.yml" \ | ||
"$POLICY_DIR/generated/$APP_NAMESPACE_NAME.authn-any-policy-branch.yml" | ||
) | ||
|
||
for policy_file in "${POLICY_FILES[@]}"; do | ||
for policy_file in "$@"; do | ||
echo "Loading policy $policy_file..." | ||
conjur policy load root "$policy_file" | ||
conjur policy load -b root -f "$policy_file" | ||
done | ||
|
||
# the values of these secrets aren't important as we populate the secret that we | ||
# are testing in each test. We need them to have some value as both are required | ||
# in the pod | ||
conjur variable values add secrets/test_secret "some-secret" | ||
conjur variable values add "secrets/var with spaces" "some-secret" | ||
conjur variable values add "secrets/var+with+pluses" "some-secret" | ||
conjur variable values add "secrets/umlaut" "some-secret" | ||
conjur variable values add secrets/url "postgresql://test-app-backend.app-test.svc.cluster.local:5432" | ||
conjur variable values add secrets/username "some-user" | ||
conjur variable values add secrets/password "7H1SiSmYp@5Sw0rd" | ||
|
||
conjur authn logout | ||
conjur variable set -i secrets/test_secret -v "some-secret" | ||
conjur variable set -i "secrets/var with spaces" -v "some-secret" | ||
conjur variable set -i "secrets/var+with+pluses" -v "some-secret" | ||
conjur variable set -i "secrets/umlaut" -v "some-secret" | ||
conjur variable set -i secrets/url -v "postgresql://test-app-backend.app-test.svc.cluster.local:5432" | ||
conjur variable set -i secrets/username -v "some-user" | ||
conjur variable set -i secrets/password -v "7H1SiSmYp@5Sw0rd" | ||
|
||
conjur logout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,9 @@ main() { | |
|
||
deployConjur() { | ||
pushd .. | ||
git clone [email protected]:cyberark/kubernetes-conjur-deploy kubernetes-conjur-deploy-$UNIQUE_TEST_ID | ||
git clone --single-branch --branch master \ | ||
[email protected]:cyberark/kubernetes-conjur-deploy \ | ||
kubernetes-conjur-deploy-$UNIQUE_TEST_ID | ||
|
||
cmd="./start" | ||
if [ $CONJUR_DEPLOYMENT = "oss" ]; then | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,8 @@ deployConjur() { | |
# from inside the container | ||
docker pull $CONJUR_APPLIANCE_IMAGE | ||
|
||
git clone [email protected]:cyberark/kubernetes-conjur-deploy \ | ||
git clone --single-branch --branch master \ | ||
[email protected]:cyberark/kubernetes-conjur-deploy \ | ||
kubernetes-conjur-deploy-$UNIQUE_TEST_ID | ||
|
||
cmd="./start" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters