Skip to content

Commit 3473d9a

Browse files
committed
Update pack v2.0 with documentation, new actions and profile support.
1 parent b9b4507 commit 3473d9a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1098
-341
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# This is base configuration. These owners could review the
1010
# changes in all files in this repository.
1111
* @cognifloyd
12+
* @nzlosh
1213

1314
# CI configuration files should be reviewed by specific owners
1415
# who are more responsible for ensuring the quality of this pack

.github/workflows/build_and_test.yaml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ jobs:
1212
# StackStorm-Exchange/ci/.github/workflows/pack-build_and_test.yaml@master
1313

1414
build_and_test:
15-
runs-on: ubuntu-latest
15+
runs-on: ubuntu-20.04
1616
name: 'Build and Test / Python ${{ matrix.python-version-short }}'
1717
strategy:
1818
matrix:
1919
include:
20-
- python-version-short: "3.6"
21-
python-version: 3.6.13
22-
vault-version: 1.5.9
20+
- python-version-short: "3.8"
21+
python-version: 3.8.17
22+
vault-version: "1.12.5-1"
23+
hvac-gh-tag: "v1.1.1"
2324
steps:
2425
- name: Checkout Pack Repo and CI Repos
2526
uses: StackStorm-Exchange/ci/.github/actions/checkout@master
@@ -30,7 +31,7 @@ jobs:
3031
path: hvac
3132
repository: hvac/hvac
3233
# main = the release branch; devel = the active development branch
33-
ref: main
34+
ref: ${{ matrix.hvac-gh-tag }}
3435
fetch-depth: 0
3536

3637
- name: Install APT Dependencies
@@ -50,7 +51,7 @@ jobs:
5051
working-directory: pack
5152
shell: bash
5253
run: |
53-
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
54+
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/hashicorp.gpg
5455
echo "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" \
5556
| sudo tee /etc/apt/sources.list.d/hashicorp.list
5657
@@ -59,10 +60,7 @@ jobs:
5960
-o APT::Get::List-Cleanup="0" \
6061
-o Dir::Etc::sourcelist="sources.list.d/hashicorp.list"
6162
62-
sudo apt install \
63-
consul \
64-
vault=${{ matrix.vault-version }} \
65-
;
63+
sudo apt install consul vault=${{ matrix.vault-version }}
6664
6765
# We disble cap_ipc_lock here as its generally incompatabile with GitHub
6866
# Actions' runtime environments.
@@ -99,7 +97,7 @@ jobs:
9997

10098
services:
10199
mongo:
102-
image: mongo:3.4
100+
image: mongo:4.4
103101
ports:
104102
- 27017:27017
105103
rabbitmq:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,6 @@ ENV/
9494

9595
# Rope project settings
9696
.ropeproject
97+
98+
# pack2md backup file
99+
README.md.bak

CHANGES.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
# Change Log
22

3+
## 2.0.0
4+
5+
- Add action to generate secrets.
6+
- Add profile support to pack to define multiple Vault end-points.
7+
- Updated README with full list of available actions.
8+
- Fixes TLS support for server and client certificates.
9+
- Updated HVAC python module dependency v1.1.0
10+
- Added token revoke action.
11+
- Updated all actions to use profile name.
12+
- Moved from Python 3.6 to 3.8 to support newer version of Vault.
13+
314
## 1.0.0
415

5-
* Drop Python 2.7 support
16+
- Drop Python 2.7 support
617

718
## 0.6.0
819

README.jinja

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
# {{ pack["pack.yaml"].name | capitalize }} Integration Pack
2+
_{{ pack["pack.yaml"].description }}_
3+
4+
*Author:* {{ pack["pack.yaml"].author }} <{{ pack["pack.yaml"].email }}>
5+
6+
## Maintainers
7+
Active pack maintainers with review & write repository access and expertise with vault:
8+
* Jacob Floyd ([@cognifloyd](https://github.com/cognifloyd)) <cognifloyd@gmail.com> Copart
9+
* Carlos ([@nzlosh](https://github.com/nzlosh))
10+
11+
### Contributors
12+
{% for contributor in pack["pack.yaml"].contributors -%}
13+
- {{ contributor }}
14+
{% endfor %}
15+
16+
{% if pack and pack["config.schema.yaml"] -%}
17+
## Configuration
18+
19+
The following options are required to be configured for the pack to work correctly.
20+
21+
| Option | Type | Required | Secret | Description |
22+
|---|---|---|---|---|
23+
{% for key, value in pack["config.schema.yaml"].items() -%}
24+
| `{{ key }}` | {{ value.type }} | {{ value.required }} | {{ value.secret | default("default") }} | _{{ value.description | default("Unavailable") }}_ |
25+
{% if "array" == value.type -%}
26+
{% if "object" == value.get("items").type -%}
27+
{% for ik, iv in value.get("items").properties.items() -%}
28+
| - `{{ ik }}` | {{ iv.type }} | {{ iv.required }} | {{ iv.secret | default("default") }} | _{{ iv.description | default("Unavailable") }}_ |
29+
{% endfor -%}
30+
{% else -%}
31+
| | {{ value.get("items").type }} | | | list of items |
32+
{% endif -%}
33+
{% endif -%}
34+
{% endfor -%}
35+
36+
{% endif %}
37+
38+
## Actions
39+
40+
{% if actions | length > 0 %}
41+
The pack provides the following actions:
42+
43+
{% for key, value in actions.items() -%}
44+
### {{ value.name }}
45+
_{{ value.description }}_
46+
{% if "parameters" in value -%}
47+
| Parameter | Type | Required | Secret | Description |
48+
|---|---|---|---|---|
49+
{% for p_key, p_value in value.parameters.items() -%}
50+
{% if "array" == p_value.type -%}
51+
{% if p_value.get("items").type == "object" -%}
52+
{% for a_k, a_v in p_value.get("items").properties.items() -%}
53+
| - `{{ a_k }}` | {{ a_v.type | default("n/a") }} | {{ a_v.required | default("default") }} | {{ a_v.secret | default("default") }} | _{{ a_v.description | default("Unavailable") }}_ |
54+
{% endfor %}
55+
{% else -%}
56+
| Items are of type | {{ p_value.items.type }} ||||
57+
{% endif -%}
58+
{% endif -%}
59+
| `{{ p_key }}` | {{ p_value.type | default("n/a") }} | {{ p_value.required | default("default") }} | {{ p_value.secret | default("default") }} | _{{ p_value.description | default("Unavailable") }}_ |
60+
{% endfor -%}
61+
{% endif %}
62+
63+
{% endfor %}
64+
{% else %}
65+
There are no actions available for this pack.
66+
{% endif %}
67+
68+
### generate secret
69+
70+
This action is written to pre-populate keys with a random secret.
71+
72+
The following string sets are available
73+
74+
- ascii_letters
75+
```abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ```
76+
- ascii_lowercase
77+
```abcdefghijklmnopqrstuvwxyz```
78+
- ascii_uppercase
79+
```ABCDEFGHIJKLMNOPQRSTUVWXYZ```
80+
- digits
81+
```0123456789```
82+
- punctuation
83+
```!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~```
84+
- printable
85+
```0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~ \t\n\r\x0b\x0c```
86+
- alphanumeric
87+
```abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789```
88+
89+
### Update tactic
90+
91+
The update tactic controls how the action will update existing secrets. It's intended to ensure idempotence on multiple runs of the secret generation action. The currently supported tactics are:
92+
- `overwrite`: Overwrite an existing secret.
93+
- `refrain`: Do not overwrite an existing secret.
94+
95+
## Sensors
96+
{% if sensors | length > 0 %}
97+
The following sensors and triggers are provided:
98+
{% for key, value in sensors.items() %}
99+
### Class {{ value.class_name }}
100+
_{{ value.description }}_
101+
102+
{% for trigger in value.trigger_types -%}
103+
| Trigger Name | Description |
104+
|---|---|
105+
| `{{ trigger.name }}` | _{{ trigger.description | default("Unavailable") }}_ |
106+
{% endfor %}
107+
108+
109+
{% endfor %}
110+
{% else %}
111+
There are no sensors available for this pack.
112+
{% endif %}
113+
114+
## Authentication methods
115+
116+
Authentication methods are defined per profile and are mutally exclusive. Only configure the
117+
method that should be used.
118+
119+
### Supported
120+
- approle
121+
- token
122+
123+
### Unsupported
124+
- app-id
125+
- ali-cloud
126+
- aws-iam # aka aws
127+
- aws-ec2
128+
- azure
129+
- cert # aka tls
130+
- gcp
131+
- github
132+
- jwt
133+
- kubernetes
134+
- ldap
135+
- mfa
136+
- oidc
137+
- okta
138+
- radius
139+
- userpass
140+
141+
<sub>Documentation generated using [pack2md](https://github.com/nzlosh/pack2md)</sub>

0 commit comments

Comments
 (0)