feat(authenticate): add approle auth method (#10)

* feat(authenticate): add approle auth method

* docs(readme): update readme

* fix: update index.js

* fix: update got to 10.2.2 to fix ncc

* chore: clean up code slightly

* chore: update tests to use got correctly

* chore(test): fix integration tests

* chore: streamline method logic

* chore: make role and secret required in approle

Co-authored-by: Sébastien FAUVART <sebastien.fauvart@gmail.com>
Co-authored-by: Richard Simpson <richardsimpson@outlook.com>
This commit is contained in:
Antoine Méausoone 2020-01-29 02:10:19 +01:00 committed by GitHub
parent 7a9634236c
commit 3b9239de79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 2981 additions and 2159 deletions

View file

@ -22,6 +22,26 @@ jobs:
# ...
```
## Authentication method
The `method` parameter can have these value :
- **token**: (by default) you must provide a token parameter
```yaml
...
with:
url: https://vault.mycompany.com:8200
token: ${{ secrets.VaultToken }}
```
- **approle**: you must provide a roleId & secretId parameter
```yaml
...
with:
url: https://vault.mycompany.com:8200
method: approle
roleId: ${{ secrets.roleId }}
secretId : ${{ secrets.secretId }}
```
## Key Syntax
The `secrets` parameter is a set of multiple secret requests separated by the `;` character.
@ -84,6 +104,7 @@ steps:
uses: RichiCoder1/vault-action
with:
url: https://vault-enterprise.mycompany.com:8200
method: token
token: ${{ secrets.VaultToken }}
namespace: ns1
secrets: |