diff --git a/dev/ca.pem b/dev/ca.pem new file mode 100644 index 00000000..ddec6114 --- /dev/null +++ b/dev/ca.pem @@ -0,0 +1,20 @@ +-----BEGIN CERTIFICATE----- +MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsF +ADA5MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6 +b24gUm9vdCBDQSAxMB4XDTE1MDUyNjAwMDAwMFoXDTM4MDExNzAwMDAwMFowOTEL +MAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJv +b3QgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4gHHKeNXj +ca9HgFB0fW7Y14h29Jlo91ghYPl0hAEvrAIthtOgQ3pOsqTQNroBvo3bSMgHFzZM +9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qw +IFAGbHrQgLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6 +VOujw5H5SNz/0egwLX0tdHA114gk957EWW67c4cX8jJGKLhD+rcdqsq08p8kDi1L +93FcXmn/6pUCyziKrlA4b9v7LWIbxcceVOF34GfID5yHI9Y/QCB/IIDEgEw+OyQm +jgSubJrIqg0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AYYwHQYDVR0OBBYEFIQYzIU07LwMlJQuCFmcx7IQTgoIMA0GCSqGSIb3DQEBCwUA +A4IBAQCY8jdaQZChGsV2USggNiMOruYou6r4lK5IpDB/G/wkjUu0yKGX9rbxenDI +U5PMCCjjmCXPI6T53iHTfIUJrU6adTrCC2qJeHZERxhlbI1Bjjt/msv0tadQ1wUs +N+gDS63pYaACbvXy8MWy7Vu33PqUXHeeE6V/Uq2V8viTO96LXFvKWlJbYK8U90vv +o/ufQJVtMVT8QtPHRh8jrdkPSHCa2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU +5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2xJNDd2ZhwLnoQdeXeGADbkpy +rqXRfboQnoZsG4q5WTP468SQvvG5 +-----END CERTIFICATE----- diff --git a/dev/start.sh b/dev/start.sh index 70f6ef63..240a5572 100755 --- a/dev/start.sh +++ b/dev/start.sh @@ -28,6 +28,7 @@ EOF while true ; do case "$1" in -e ) ENTERPRISE="true" ; shift ;; + -c ) CLOUD="true" ; shift ;; -h | --help ) help && exit 0 ;; -p ) PYTHON_VERSION="$2" ; shift ; shift ;; -v ) ANSIBLE_VERSION="$2" ; shift ; shift ;; @@ -113,12 +114,61 @@ function deploy_conjur_enterprise { cp ../policy/root.yml . && setup_conjur_resources popd } +function test_ConjurCloud(){ + + export CONJUR_APPLIANCE_URL='https://conjur-proxy-nginx' + export CONJUR_ACCOUNT='cucumber' + DOCKER_NETWORK='default' + docker compose up -d --build conjur conjur-proxy-nginx + set_conjur_cid "$(docker compose ps -q conjur)" + wait_for_conjur + + # get admin credentials + fetch_conjur_cert "$(docker compose ps -q conjur-proxy-nginx)" "cert.crt" + ADMIN_API_KEY="$(user_api_key "$CONJUR_ACCOUNT" admin)" + + # start conjur cli and configure conjur + docker compose up --no-deps -d conjur_cli + set_cli_cid "$(docker compose ps -q conjur_cli)" + setup_conjur_resources + set_network "$DOCKER_NETWORK" + + # get conjur credentials for ansible + ANSIBLE_API_KEY="$(host_api_key 'ansible/ansible-master')" + refresh_access_token "host/ansible/ansible-master" "$ANSIBLE_API_KEY" + + docker compose up -d --build ansible + set_ansible_cid "$(docker compose ps -q ansible)" + + +DOCKER_COMMANDS=$(cat <