Skip to content

Commit 1be6293

Browse files
committed
feat(cli/pam-types): Embed existing PAM types
Signed-off-by: spbsoluble <1661003+spbsoluble@users.noreply.github.com>
1 parent b6066f1 commit 1be6293

2 files changed

Lines changed: 336 additions & 0 deletions

File tree

cmd/pam.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ package cmd
1616

1717
import (
1818
"context"
19+
_ "embed"
1920
"encoding/json"
2021
"fmt"
2122
"io"
@@ -29,6 +30,9 @@ import (
2930
"github.com/spf13/cobra"
3031
)
3132

33+
//go:embed pam_types.json
34+
var EmbeddedPAMTypesJSON []byte
35+
3236
type JSONImportableObject interface {
3337
keyfactor.Provider |
3438
keyfactor.ProviderType |

cmd/pam_types.json

Lines changed: 332 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,332 @@
1+
[
2+
{
3+
"Name": "1Password-CLI",
4+
"Parameters": [
5+
{
6+
"Name": "Vault",
7+
"DisplayName": "1Password Secret Vault",
8+
"DataType": 1,
9+
"InstanceLevel": false,
10+
"Description": "The name of the Vault in 1Password."
11+
},
12+
{
13+
"Name": "Token",
14+
"DisplayName": "1Password Service Account Token",
15+
"DataType": 2,
16+
"InstanceLevel": false,
17+
"Description": "The Service Account Token that is configured to access the specified Vault."
18+
},
19+
{
20+
"Name": "Item",
21+
"DisplayName": "1Password Item Name",
22+
"DataType": 1,
23+
"InstanceLevel": true,
24+
"Description": "The name of the credential item in 1Password. This could be the name of a Login object or a Password object."
25+
},
26+
{
27+
"Name": "Field",
28+
"DisplayName": "Field Name on Item",
29+
"DataType": 1,
30+
"InstanceLevel": true,
31+
"Description": "The name of the Field to retrieve from the specified Item. For a Login, this would be 'username' or 'password'. For an API Credential this would be 'credential'."
32+
}
33+
]
34+
},
35+
{
36+
"Name": "Azure-KeyVault",
37+
"Parameters": [
38+
{
39+
"Name": "KeyVaultUri",
40+
"DisplayName": "Key Vault URI",
41+
"DataType": 1,
42+
"InstanceLevel": false,
43+
"Description": "URI for your Azure Key Vault"
44+
},
45+
{
46+
"Name": "AuthorityHost",
47+
"DisplayName": "Authority Host",
48+
"DataType": 1,
49+
"InstanceLevel": false,
50+
"Description": "Authority host of your Azure infrastructure"
51+
},
52+
{
53+
"Name": "SecretId",
54+
"DisplayName": "Secret ID",
55+
"DataType": 1,
56+
"InstanceLevel": true,
57+
"Description": "Name of your secret in Azure Key Vault"
58+
}
59+
]
60+
},
61+
{
62+
"Name": "Azure-KeyVault-ServicePrincipal",
63+
"Parameters": [
64+
{
65+
"Name": "KeyVaultUri",
66+
"DisplayName": "Key Vault URI",
67+
"DataType": 1,
68+
"InstanceLevel": false,
69+
"Description": "URI for your Azure Key Vault"
70+
},
71+
{
72+
"Name": "AuthorityHost",
73+
"DisplayName": "Authority Host",
74+
"DataType": 1,
75+
"InstanceLevel": false,
76+
"Description": "Authority host of your Azure infrastructure"
77+
},
78+
{
79+
"Name": "TenantId",
80+
"DisplayName": "Tenant ID",
81+
"DataType": 1,
82+
"InstanceLevel": false,
83+
"Description": "Tenant or directory ID in Azure"
84+
},
85+
{
86+
"Name": "ClientId",
87+
"DisplayName": "Client ID",
88+
"DataType": 1,
89+
"InstanceLevel": false,
90+
"Description": "Application ID in Entra AD"
91+
},
92+
{
93+
"Name": "ClientSecret",
94+
"DisplayName": "ClientSecret",
95+
"DataType": 2,
96+
"InstanceLevel": false,
97+
"Description": "Client secret for your application ID"
98+
},
99+
{
100+
"Name": "SecretId",
101+
"DisplayName": "Secret ID",
102+
"DataType": 1,
103+
"InstanceLevel": true,
104+
"Description": "Name of your secret in Azure Key Vault"
105+
}
106+
]
107+
},
108+
{
109+
"Name": "BeyondTrust-PasswordSafe",
110+
"Parameters": [
111+
{
112+
"Name": "Host",
113+
"DisplayName": "BeyondTrust Host",
114+
"DataType": 1,
115+
"InstanceLevel": false
116+
},
117+
{
118+
"Name": "APIKey",
119+
"DisplayName": "BeyondTrust API Key",
120+
"DataType": 2,
121+
"InstanceLevel": false
122+
},
123+
{
124+
"Name": "Username",
125+
"DisplayName": "BeyondTrust Username",
126+
"DataType": 1,
127+
"InstanceLevel": false
128+
},
129+
{
130+
"Name": "ClientCertificate",
131+
"DisplayName": "BeyondTrust Client Certificate Thumbprint",
132+
"DataType": 1,
133+
"InstanceLevel": false
134+
},
135+
{
136+
"Name": "SystemId",
137+
"DisplayName": "BeyondTrust System ID",
138+
"DataType": 1,
139+
"InstanceLevel": true
140+
},
141+
{
142+
"Name": "AccountId",
143+
"DisplayName": "BeyondTrust Account ID",
144+
"DataType": 1,
145+
"InstanceLevel": true
146+
}
147+
]
148+
},
149+
{
150+
"Name": "CyberArk-CentralCredentialProvider",
151+
"Parameters": [
152+
{
153+
"Name": "AppId",
154+
"DisplayName": "Application ID",
155+
"DataType": 1,
156+
"InstanceLevel": false
157+
},
158+
{
159+
"Name": "Host",
160+
"DisplayName": "CyberArk Host and Port",
161+
"DataType": 1,
162+
"InstanceLevel": false
163+
},
164+
{
165+
"Name": "Site",
166+
"DisplayName": "CyberArk API Site",
167+
"DataType": 1,
168+
"InstanceLevel": false
169+
},
170+
{
171+
"Name": "Safe",
172+
"DisplayName": "Safe",
173+
"DataType": 1,
174+
"InstanceLevel": true
175+
},
176+
{
177+
"Name": "Folder",
178+
"DisplayName": "Folder",
179+
"DataType": 1,
180+
"InstanceLevel": true
181+
},
182+
{
183+
"Name": "Object",
184+
"DisplayName": "Object",
185+
"DataType": 1,
186+
"InstanceLevel": true
187+
}
188+
]
189+
},
190+
{
191+
"Name": "CyberArk-SdkCredentialProvider",
192+
"Parameters": [
193+
{
194+
"Name": "AppId",
195+
"DisplayName": "Application ID",
196+
"DataType": 1,
197+
"InstanceLevel": false
198+
},
199+
{
200+
"Name": "Safe",
201+
"DisplayName": "Safe",
202+
"DataType": 1,
203+
"InstanceLevel": true
204+
},
205+
{
206+
"Name": "Folder",
207+
"DisplayName": "Folder",
208+
"DataType": 1,
209+
"InstanceLevel": true
210+
},
211+
{
212+
"Name": "Object",
213+
"DisplayName": "Object",
214+
"DataType": 1,
215+
"InstanceLevel": true
216+
}
217+
]
218+
},
219+
{
220+
"Name": "Delinea-SecretServer",
221+
"Parameters": [
222+
{
223+
"Name": "Host",
224+
"DisplayName": "Secret Server URL",
225+
"Description": "The URL to the Secret Server instance. Example: https://example.secretservercloud.com/SecretServer",
226+
"DataType": 1,
227+
"InstanceLevel": false
228+
},
229+
{
230+
"Name": "Username",
231+
"DisplayName": "Secret Server Username",
232+
"Description": "The username used to authenticate to the Secret Server instance. NOTE: only applicable if using the `password` grant type.",
233+
"DataType": 2,
234+
"InstanceLevel": false
235+
},
236+
{
237+
"Name": "Password",
238+
"DisplayName": "Secret Server Password",
239+
"Description": "The password used to authenticate to the Secret Server instance. NOTE: only applicable if using the `password` grant type.",
240+
"DataType": 2,
241+
"InstanceLevel": false
242+
},
243+
{
244+
"Name": "ClientId",
245+
"DisplayName": "Secret Server Client ID",
246+
"Description": "The client ID used to authenticate to the Secret Server instance. NOTE: only applicable if using the `client_credentials` grant type.",
247+
"DataType": 2,
248+
"InstanceLevel": false
249+
},
250+
{
251+
"Name": "ClientSecret",
252+
"DisplayName": "Secret Server Client Secret",
253+
"Description": "The client secret used to authenticate to the Secret Server instance. NOTE: only applicable if using the `client_credentials` grant type.",
254+
"DataType": 2,
255+
"InstanceLevel": false
256+
},
257+
{
258+
"Name": "GrantType",
259+
"DisplayName": "Grant Type",
260+
"Description": "The grant type used to authenticate to the Secret Server instance. Valid values are `password` or `client_credentials`. Default is `password`. If not provided the default value `password` will be used to maintain backwards compatability.",
261+
"DataType": 1,
262+
"InstanceLevel": false
263+
},
264+
{
265+
"Name": "SecretId",
266+
"DisplayName": "Secret ID",
267+
"Description": "The ID of the secret in Secret Server. This is the integer ID that is used to retrieve the secret from Secret Server.",
268+
"DataType": 1,
269+
"InstanceLevel": true
270+
},
271+
{
272+
"Name": "SecretFieldName",
273+
"DisplayName": "Secret Field Name",
274+
"Description": "The name of the field in the secret that contains the credential value. NOTE: The field must exist.",
275+
"DataType": 1,
276+
"InstanceLevel": true
277+
}
278+
]
279+
},
280+
{
281+
"Name": "GCP-SecretManager",
282+
"Parameters": [
283+
{
284+
"Name": "projectId",
285+
"DisplayName": "Unique Google Cloud Project ID",
286+
"DataType": 1,
287+
"InstanceLevel": false
288+
},
289+
{
290+
"Name": "secretId",
291+
"DisplayName": "Secret Name",
292+
"DataType": 1,
293+
"InstanceLevel": true
294+
}
295+
]
296+
},
297+
{
298+
"Name": "Hashicorp-Vault",
299+
"Parameters": [
300+
{
301+
"Name": "Host",
302+
"DisplayName": "Vault Host",
303+
"DataType": 1,
304+
"InstanceLevel": false
305+
},
306+
{
307+
"Name": "Token",
308+
"DisplayName": "Vault Token",
309+
"DataType": 2,
310+
"InstanceLevel": false
311+
},
312+
{
313+
"Name": "Path",
314+
"DisplayName": "KV Engine Path",
315+
"DataType": 1,
316+
"InstanceLevel": false
317+
},
318+
{
319+
"Name": "Secret",
320+
"DisplayName": "KV Secret Name",
321+
"DataType": 1,
322+
"InstanceLevel": true
323+
},
324+
{
325+
"Name": "Key",
326+
"DisplayName": "KV Secret Key",
327+
"DataType": 1,
328+
"InstanceLevel": true
329+
}
330+
]
331+
}
332+
]

0 commit comments

Comments
 (0)