Skip to content

Commit 8505388

Browse files
author
Joachim Jablon
authored
Merge pull request #192 from peopledoc/hvac
2 parents 3904eb1 + 33e0770 commit 8505388

File tree

7 files changed

+26
-51
lines changed

7 files changed

+26
-51
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: CI
33
on:
44
pull_request:
55
push:
6-
branches:
6+
branches:
77
- 'master'
88
tags:
99
- '*'
@@ -40,12 +40,21 @@ jobs:
4040
include:
4141
- python-version: 3.6
4242
tox-env: py36-tests
43+
auth-method: token
4344
- python-version: 3.7
4445
tox-env: py37-tests
46+
auth-method: token
4547
- python-version: 3.8
4648
tox-env: py38-tests
49+
auth-method: token
50+
- python-version: 3.8
51+
tox-env: py38-tests
52+
auth-method: userpass
53+
- python-version: 3.8
54+
tox-env: py38-tests
55+
auth-method: cert
4756

48-
name: Test (python ${{ matrix.python-version }})
57+
name: Test (python ${{ matrix.python-version }} / ${{ matrix.auth-method }})
4958
runs-on: ubuntu-latest
5059

5160
services:
@@ -66,7 +75,7 @@ jobs:
6675
set -xeu
6776
pwd
6877
python -VV
69-
./dev-env auth token
78+
./dev-env auth ${{ matrix.auth-method }}
7079
pip install tox
7180
- name: Run tox targets for ${{ matrix.python-version }}
7281
run: tox -e ${{ matrix.tox-env }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ dist/
1010
docs/_build
1111
htmlcov/
1212
vault.yml
13+
server-chain.crt
14+
client.crt
15+
client.key

dev-env

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
case ${1-default} in
44
auth)
5+
curl -o server-chain.crt https://raw.githubusercontent.com/ewjoachim/vault-cli-dev/master/conf/certs/server-chain.crt
6+
if [ "${2}" = "cert" ]; then
7+
curl -o client.crt https://raw.githubusercontent.com/ewjoachim/vault-cli-dev/master/conf/certs/client.crt
8+
curl -o client.key https://raw.githubusercontent.com/ewjoachim/vault-cli-dev/master/conf/certs/client.key
9+
fi
510
ln -fs vault.${2}.yml vault.yml
611
;;
712
*)

server-chain.crt

Lines changed: 0 additions & 42 deletions
This file was deleted.

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ install_requires =
2424
Click>=7.0
2525
pyyaml>=5.3.1
2626
jinja2
27-
hvac
27+
hvac<0.10.12 # Temporary fix for #191
2828

2929
[options.entry_points]
3030
console_scripts =

vault.cert.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
url: https://localhost:8443
33
base_path: secretkvv1/
4-
ca_bundle: dev_docker_config/certs/server-chain.crt
5-
login_cert: dev_docker_config/certs/client.crt
6-
login_cert_key: dev_docker_config/certs/client.key
4+
ca_bundle: server-chain.crt
5+
login_cert: client.crt
6+
login_cert_key: client.key

vault.userpass.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
base_path: secretkvv1/
3-
ca_bundle: dev_docker_config/certs/server-chain.crt
42
url: https://localhost:8443
3+
base_path: secretkvv1/
4+
ca_bundle: server-chain.crt
55
username: userpass-login
66
password: userpass-pass

0 commit comments

Comments
 (0)