-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathopenapi.yml
310 lines (239 loc) · 9.01 KB
/
openapi.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
openapi: "3.0.0"
info:
description: "This is an API definition for CyberArk Conjur Open Source. You can find out more at [Conjur.org](https://www.conjur.org/)."
version: 5.3.1
title: "Conjur"
contact:
email: "conj_maintainers@cyberark.com"
license:
name: "Apache 2.0"
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
servers:
- url: /
tags:
- name: "authentication"
description: "Authentication"
- name: "secrets"
description: "Secrets"
- name: "policies"
description: "Policies"
- name: "roles"
description: "RBAC"
- name: "host factory"
description: "Host factories"
- name: "public keys"
description: "SSH keys"
- name: "resources"
description: "Resources"
- name: "status"
description: "Server status"
- name: "certificate authority"
description: "Certificate authority"
components:
schemas:
AccountName:
description: "Conjur account name"
type: string
minLength: 1
example: "default"
Count:
description: "Return only the count of results"
type: boolean
example: true
Kind:
type: string
minLength: 1
example: "variable"
Limit:
description: "Return no more than this number of results"
type: integer
example: 10
Offset:
description: "Skips this many items before returning the rest"
type: integer
example: 20
ResourceID:
type: string
minLength: 1
example: "prod%2Faws%2Fdb-password"
description: |
Resource identifier. Requires to be encoded when in path.
##### Examples:
- `myapp-01` -> `myapp-01` (unchanged)
- `alice@devops` -> `alice%40devops`
- `prod/aws/db-password` -> `prod%2Faws%2Fdb-password`
- `research+development` -> `research%2Bdevelopment`
- `sales&marketing` -> `sales%26marketing`
ResourceVersion:
description: "Version of the resource (Conjur keeps the last 20 versions of a secret)"
type: integer
example: 1
RoleType:
type: string
minLength: 1
description: |
##### Kinds of roles:
- User: one unique wonderful human
- Host: a single logical machine (in the broad sense, not just physical)
- Layer: a collection of hosts that have the same privileges
- Group: a collection of users and groups that have the same privileges
- Policy: a role which owns of a set of related object
Any identifier included in the URL must be URL-encoded to be recognized by the Conjur API.
##### Resource Identifiers:
- `myapp-01` -> `myapp-01` (unchanged)
- `alice@devops` -> `alice%40devops`
- `prod/aws/db-password` -> `prod%2Faws%2Fdb-password`
- `research+development` -> `research%2Bdevelopment`
- `sales&marketing` -> `sales%26marketing`
parameters:
ServiceID:
name: service_id
in: path
required: true
description: "URL-Encoded authenticator service ID"
example: prod%2fgke
schema:
type: string
RequestID:
name: X-Request-Id
in: header
required: false
description: |
Add an ID to the request being made so it can be tracked in Conjur.
If not provided the server will automatically generate one.
example: "test-id"
schema:
type: string
pattern: '^[a-zA-Z\d-]{1,255}$'
responses:
BadRequest:
description: "The server cannot process the request due to malformed request syntax"
Busy:
description: "Similar operation already in progress, retry after a delay"
InadequatePrivileges:
description: "The authenticated user lacks the necessary privileges"
InternalServerError:
description: "Malfromed request, rejected by the server"
ResourceNotFound:
description: "The requested resource does not exist, the authenticated user lacks the required privileges to enumerate this resource, or its value has not been set"
ResourcesNotFound:
description: "At least one resource was unable to be found"
UnauthorizedError:
description: "Authentication information is missing or invalid"
UnprocessableEntity:
description: "A request parameter was either missing or invalid."
securitySchemes:
basicAuth:
description: |
Basic authentication with Conjur username and password (users only)
or API key (hosts and users).
type: http
scheme: basic
conjurAuth:
description: "Conjur access token in `Token token=<base64_encoded_token>` format."
type: apiKey
in: header
name: Authorization
conjurKubernetesMutualTls:
description: |
Conjur Kubernetes authenticator mutual TLS authentication.
To authenticate using this method, you must provide a trusted client
certificate
type: http
scheme: mutual
security:
- basicAuth: []
- conjurAuth: []
- conjurKubernetesMutualTls: []
paths:
# ========== AUTHENTICATION ===========
'/authn/{account}/login':
$ref: 'authentication.yml#/components/paths/DefaultLogin'
'/authn-k8s/{service_id}/inject_client_cert':
$ref: 'authentication.yml#/components/paths/K8sInjectClientCert'
'/authn-ldap/{service_id}/{account}/login':
$ref: 'authentication.yml#/components/paths/LDAPLogin'
'/authn/{account}/{login}/authenticate':
$ref: 'authentication.yml#/components/paths/DefaultAuthenticate'
'/authn-iam/{service_id}/{account}/{login}/authenticate':
$ref: 'authentication.yml#/components/paths/AWSAuthenticate'
'/authn-azure/{service_id}/{account}/{login}/authenticate':
$ref: 'authentication.yml#/components/paths/AzureAuthenticate'
'/authn-gcp/{account}/authenticate':
$ref: 'authentication.yml#/components/paths/GCPAuthenticate'
'/authn-k8s/{service_id}/{account}/{login}/authenticate':
$ref: 'authentication.yml#/components/paths/KubernetesAuthenticate'
'/authn-ldap/{service_id}/{account}/{login}/authenticate':
$ref: 'authentication.yml#/components/paths/LDAPAuthenticate'
'/authn-oidc/{service_id}/{account}/authenticate':
$ref: 'authentication.yml#/components/paths/OIDCAuthenticate'
'/authn-jwt/{service_id}/{account}/authenticate':
$ref: 'authentication.yml#/components/paths/JWTAuthenticate'
'/authn-jwt/{service_id}/{account}/{id}/authenticate':
$ref: 'authentication.yml#/components/paths/JWTAuthenticateWithId'
'/authn/{account}/password':
$ref: 'authentication.yml#/components/paths/ChangePassword'
'/authn/{account}/api_key':
$ref: 'authentication.yml#/components/paths/RotateApiKey'
'/{authenticator}/{account}':
$ref: 'authentication.yml#/components/paths/EnableAuthenticator'
'/{authenticator}/{service_id}/{account}':
$ref: 'authentication.yml#/components/paths/EnableAuthenticatorInstance'
# ========== STATUS ===========
'/whoami':
$ref: 'status.yml#/components/paths/WhoAmI'
'/{authenticator}/{service_id}/{account}/status':
$ref: 'status.yml#/components/paths/ServiceAuthenticatorStatus'
'/authn-gcp/{account}/status':
$ref: 'status.yml#/components/paths/AuthenticatorStatus'
'/authenticators':
$ref: 'status.yml#/components/paths/AuthenticatorsIndex'
'/health':
x-conjur-settings:
enterprise-only: true
$ref: 'status.yml#/components/paths/Health'
'/remote_health/{remote}':
x-conjur-settings:
enterprise-only: true
$ref: 'status.yml#/components/paths/RemoteHealth'
'/info':
x-conjur-settings:
enterprise-only: true
$ref: 'status.yml#/components/paths/Info'
# ========== SECRETS ==================
'/secrets/{account}/{kind}/{identifier}':
$ref: 'secrets.yml#/components/paths/Secret'
'/secrets':
$ref: 'secrets.yml#/components/paths/BatchSecrets'
# ========== POLICIES =================
'/policies/{account}/policy/{identifier}':
$ref: 'policies.yml#/components/paths/Policies'
# ========== ROLES ====================
'/roles/{account}/{kind}/{identifier}':
$ref: 'roles.yml#/components/paths/Roles'
# ========== RESOURCES ================
'/resources':
$ref: 'resources.yml#/components/paths/ListResources'
'/resources/{account}':
$ref: 'resources.yml#/components/paths/ListResourcesOnAccount'
'/resources/{account}/{kind}':
$ref: 'resources.yml#/components/paths/ListSimilarResourcesOnAccount'
'/resources/{account}/{kind}/{identifier}':
$ref: 'resources.yml#/components/paths/SingleResource'
# ========== HOST FACTORY =============
'/host_factory_tokens':
$ref: 'host-factory.yml#/components/paths/CreateHostToken'
'/host_factory_tokens/{token}':
$ref: 'host-factory.yml#/components/paths/RevokeHostToken'
'/host_factories/hosts':
$ref: 'host-factory.yml#/components/paths/CreateHost'
# ========== PUBLIC KEYS ==============
'/public_keys/{account}/{kind}/{identifier}':
$ref: 'public-keys.yml#/components/paths/PublicKeys'
# ========== CERTIFICATE AUTHORITY ====
'/ca/{account}/{service_id}/sign':
$ref: 'cert-auth.yml#/components/paths/Sign'
# TODO: Seed Service
externalDocs:
description: "Find out more about Conjur"
url: "https://conjur.org"