Skip to content

Commit 4ef80c1

Browse files
authored
Merge pull request #25 from nzlosh/tls_fixes
pack update
2 parents b9b4507 + aea76b2 commit 4ef80c1

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

+1085
-339
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88

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

0 commit comments

Comments
 (0)