Skip to content

Commit d04c5c3

Browse files
Add new processor vault_key
Retrieves Keys from Vault. Supports Role auth currently.
1 parent 6a8353e commit d04c5c3

File tree

7 files changed

+555
-0
lines changed

7 files changed

+555
-0
lines changed
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
= vault_key
2+
:type: processor
3+
:status: beta
4+
5+
6+
7+
////
8+
THIS FILE IS AUTOGENERATED!
9+
10+
To make changes, edit the corresponding source file under:
11+
12+
https://github.com/redpanda-data/connect/tree/main/internal/impl/<provider>.
13+
14+
And:
15+
16+
https://github.com/redpanda-data/connect/tree/main/cmd/tools/docs_gen/templates/plugin.adoc.tmpl
17+
////
18+
19+
// © 2024 Redpanda Data Inc.
20+
21+
22+
component_type_dropdown::[]
23+
24+
25+
Fetches a Value for a Key from Hashicorp Vault
26+
27+
```yml
28+
# Config fields, showing default values
29+
label: ""
30+
vault_key:
31+
url: "" # No default (required)
32+
auth:
33+
mount_path: "" # No default (optional)
34+
app_role:
35+
role_id: "" # No default (required)
36+
secret_id: "" # No default (required)
37+
mount_path: "" # No default (optional)
38+
path: "" # No default (required)
39+
version: "" # No default (optional)
40+
```
41+
42+
The fields `mount_path`, `path` and `version` support
43+
xref:configuration:interpolation.adoc#bloblang-queries[interpolation functions], allowing
44+
you to create a unique `mount_path`, `path` and/or `version` for each message.
45+
46+
47+
48+
== Fields
49+
50+
=== `url`
51+
52+
The base URL of the Vault server.
53+
54+
55+
*Type*: `string`
56+
57+
58+
=== `auth`
59+
60+
Sorry! This field is missing documentation.
61+
62+
63+
*Type*: `object`
64+
65+
66+
=== `auth.mount_path`
67+
68+
Sorry! This field is missing documentation.
69+
70+
71+
*Type*: `string`
72+
73+
74+
=== `auth.app_role`
75+
76+
Sorry! This field is missing documentation.
77+
78+
79+
*Type*: `object`
80+
81+
82+
=== `auth.app_role.role_id`
83+
84+
Unique identifier of the Role
85+
[CAUTION]
86+
====
87+
This field contains sensitive information that usually shouldn't be added to a config directly, read our xref:configuration:secrets.adoc[secrets page for more info].
88+
====
89+
90+
91+
92+
*Type*: `string`
93+
94+
95+
=== `auth.app_role.secret_id`
96+
97+
SecretID belong to the App role
98+
[CAUTION]
99+
====
100+
This field contains sensitive information that usually shouldn't be added to a config directly, read our xref:configuration:secrets.adoc[secrets page for more info].
101+
====
102+
103+
104+
105+
*Type*: `string`
106+
107+
108+
=== `mount_path`
109+
110+
Supports xref:configuration:interpolation.adoc#bloblang-queries[interpolation functions].
111+
112+
113+
*Type*: `string`
114+
115+
116+
=== `path`
117+
118+
The key path to fetch from Vault.
119+
Supports xref:configuration:interpolation.adoc#bloblang-queries[interpolation functions].
120+
If root gets deleted no message gets produced.
121+
122+
123+
*Type*: `string`
124+
125+
126+
=== `version`
127+
128+
The specific key version to fetch from Vault.
129+
Supports xref:configuration:interpolation.adoc#bloblang-queries[interpolation functions].
130+
This field supports xref:configuration:interpolation.adoc#bloblang-queries[interpolation functions].
131+
132+
133+
*Type*: `string`
134+
135+
136+

go.mod

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ require (
6464
github.com/gofrs/uuid v4.4.0+incompatible
6565
github.com/golang-jwt/jwt/v5 v5.2.1
6666
github.com/gosimple/slug v1.14.0
67+
github.com/hashicorp/vault-client-go v0.4.3
6768
github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c
6869
github.com/jackc/pgx/v4 v4.18.3
6970
github.com/jhump/protoreflect v1.16.0
@@ -140,10 +141,16 @@ require (
140141
cloud.google.com/go/aiplatform v1.68.0 // indirect
141142
cloud.google.com/go/longrunning v0.5.9 // indirect
142143
github.com/hamba/avro/v2 v2.22.2-0.20240625062549-66aad10411d9 // indirect
144+
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
145+
github.com/hashicorp/go-retryablehttp v0.7.1 // indirect
146+
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
147+
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect
143148
github.com/json-iterator/go v1.1.12 // indirect
149+
github.com/mitchellh/go-homedir v1.1.0 // indirect
144150
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
145151
github.com/modern-go/reflect2 v1.0.2 // indirect
146152
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
153+
github.com/ryanuber/go-glob v1.0.0 // indirect
147154
)
148155

149156
require (

go.sum

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,11 @@ github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv
635635
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
636636
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
637637
github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
638+
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
639+
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
640+
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
638641
github.com/hashicorp/go-hclog v0.9.1/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
642+
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
639643
github.com/hashicorp/go-hclog v1.1.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
640644
github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k=
641645
github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
@@ -650,6 +654,12 @@ github.com/hashicorp/go-msgpack/v2 v2.1.2/go.mod h1:upybraOAblm4S7rx0+jeNy+CWWhz
650654
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
651655
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
652656
github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=
657+
github.com/hashicorp/go-retryablehttp v0.7.1 h1:sUiuQAnLlbvmExtFQs72iFW/HXeUn8Z1aJLQ4LJJbTQ=
658+
github.com/hashicorp/go-retryablehttp v0.7.1/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY=
659+
github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc=
660+
github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8=
661+
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 h1:kes8mmyCpxJsI7FTwtzRqEy9CdjCtrXrXGuOpxEA7Ts=
662+
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2/go.mod h1:Gou2R9+il93BqX25LAKCLuM+y9U2T4hlwvT1yprcna4=
653663
github.com/hashicorp/go-uuid v0.0.0-20180228145832-27454136f036/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
654664
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
655665
github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
@@ -666,6 +676,8 @@ github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyf
666676
github.com/hashicorp/raft v1.3.9/go.mod h1:4Ak7FSPnuvmb0GV6vgIAJ4vYT4bek9bb6Q+7HVbyzqM=
667677
github.com/hashicorp/raft v1.6.1 h1:v/jm5fcYHvVkL0akByAp+IDdDSzCNCGhdO6VdB56HIM=
668678
github.com/hashicorp/raft v1.6.1/go.mod h1:N1sKh6Vn47mrWvEArQgILTyng8GoDRNYlgKyK7PMjs0=
679+
github.com/hashicorp/vault-client-go v0.4.3 h1:zG7STGVgn/VK6rnZc0k8PGbfv2x/sJExRKHSUg3ljWc=
680+
github.com/hashicorp/vault-client-go v0.4.3/go.mod h1:4tDw7Uhq5XOxS1fO+oMtotHL7j4sB9cp0T7U6m4FzDY=
669681
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
670682
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
671683
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
@@ -851,6 +863,8 @@ github.com/microsoft/gocosmos v1.1.1 h1:zJUelhWCm9yvHxiHRuPSY+9loQcGi+tYS7gcOIt8
851863
github.com/microsoft/gocosmos v1.1.1/go.mod h1:M1dL6uI65ocCJYWvA8eKaTdy9URTYdpkaF+LPhjqd7I=
852864
github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g=
853865
github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY=
866+
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
867+
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
854868
github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0=
855869
github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0=
856870
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
@@ -1052,6 +1066,8 @@ github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThC
10521066
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
10531067
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
10541068
github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w=
1069+
github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk=
1070+
github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc=
10551071
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
10561072
github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys=
10571073
github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs=

0 commit comments

Comments
 (0)