diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a9f70d..52bc5d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ name: CI on: pull_request: push: - branches: + branches: - 'master' tags: - '*' @@ -40,12 +40,21 @@ jobs: include: - python-version: 3.6 tox-env: py36-tests + auth-method: token - python-version: 3.7 tox-env: py37-tests + auth-method: token - python-version: 3.8 tox-env: py38-tests + auth-method: token + - python-version: 3.8 + tox-env: py38-tests + auth-method: userpass + - python-version: 3.8 + tox-env: py38-tests + auth-method: cert - name: Test (python ${{ matrix.python-version }}) + name: Test (python ${{ matrix.python-version }} / ${{ matrix.auth-method }}) runs-on: ubuntu-latest services: @@ -66,7 +75,7 @@ jobs: set -xeu pwd python -VV - ./dev-env auth token + ./dev-env auth ${{ matrix.auth-method }} pip install tox - name: Run tox targets for ${{ matrix.python-version }} run: tox -e ${{ matrix.tox-env }} diff --git a/.gitignore b/.gitignore index 87d35d4..04b71cb 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,6 @@ dist/ docs/_build htmlcov/ vault.yml +server-chain.crt +client.crt +client.key diff --git a/dev-env b/dev-env index a48df0e..5949361 100755 --- a/dev-env +++ b/dev-env @@ -2,6 +2,11 @@ case ${1-default} in auth) + curl -o server-chain.crt https://raw.githubusercontent.com/ewjoachim/vault-cli-dev/master/conf/certs/server-chain.crt + if [ "${2}" = "cert" ]; then + curl -o client.crt https://raw.githubusercontent.com/ewjoachim/vault-cli-dev/master/conf/certs/client.crt + curl -o client.key https://raw.githubusercontent.com/ewjoachim/vault-cli-dev/master/conf/certs/client.key + fi ln -fs vault.${2}.yml vault.yml ;; *) diff --git a/server-chain.crt b/server-chain.crt deleted file mode 100644 index 3ec7ee8..0000000 --- a/server-chain.crt +++ /dev/null @@ -1,42 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDSDCCAjACFD8JjJiWiavXJRdu8tNpf6WaSSALMA0GCSqGSIb3DQEBCwUAMG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u90qhNI150ql6lxjk0pTdNenJsN9CbreEf/ -I8ASlULl8WvlZ6bIIdStsuz2Zt86SZtTtTjMmqQAwogtzC5opwhfkQRCoufMEvDf -QRrguZIsrfjrn/O3FYRcqqOL52i2x9sERuurw0XMy2DBFRWfao+ImLoBsaddkojp -geKZHBCIUfYQFfsnjMNqSyd2PtM4bS7fqErDFX+NLkOpPHkfNRe8j1dnQtE4nJc/ -a4JXj+Nn55pbX+n/jvIqDj3nT6quJbnIFWfcOJ3o/6d+32I= ------END CERTIFICATE----- diff --git a/setup.cfg b/setup.cfg index fb5ae93..0d78dd6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,7 +24,7 @@ install_requires = Click>=7.0 pyyaml>=5.3.1 jinja2 - hvac + hvac<0.10.12 # Temporary fix for #191 [options.entry_points] console_scripts = diff --git a/vault.cert.yml b/vault.cert.yml index e1e8ddb..6144bad 100644 --- a/vault.cert.yml +++ b/vault.cert.yml @@ -1,6 +1,6 @@ --- url: https://localhost:8443 base_path: secretkvv1/ -ca_bundle: dev_docker_config/certs/server-chain.crt -login_cert: dev_docker_config/certs/client.crt -login_cert_key: dev_docker_config/certs/client.key +ca_bundle: server-chain.crt +login_cert: client.crt +login_cert_key: client.key diff --git a/vault.userpass.yml b/vault.userpass.yml index 09d99b9..726185d 100644 --- a/vault.userpass.yml +++ b/vault.userpass.yml @@ -1,6 +1,6 @@ --- -base_path: secretkvv1/ -ca_bundle: dev_docker_config/certs/server-chain.crt url: https://localhost:8443 +base_path: secretkvv1/ +ca_bundle: server-chain.crt username: userpass-login password: userpass-pass