Create tokens
Creates one or more tokens which can be used to bootstrap host identity. Responds with a JSON document containing the tokens and their restrictions.
If the tokens are created with a CIDR restriction, Conjur will only accept them from the allowlisted IP ranges.
Permissions required
execute
privilege on the Host Factory.
URI
|
Example with curl
Suppose your account is myorg
, your host factory is called hf-db
and you want to create two tokens, each of which which are usable only by local addresses 192.0.2.1
and 192.0.2.2
, expiring at “2017-08-04T22:27:20+00:00”.
|
|
Request Body Parameters
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
expiration |
ISO 8601 datetime string |
Yes |
Expiration date of the token Example: |
host_factory |
String |
Yes |
Fully qualified Host Factory id Example: |
count |
Integer |
No |
Number of tokens to create Example: Default: |
cidr |
Array |
no |
CIDR restriction(s) on token usage Example: |
Response
Code |
Description |
---|---|
200 |
Zero or more tokens were created and delivered in the response body |
403 |
The authenticated user lacks the necessary privilege |
404 |
Conjur did not find the specified Host Factory |
422 |
A request parameter was missing or invalid |
Example URI
|
Response 200
Headers
|
Body
|