-
Notifications
You must be signed in to change notification settings - Fork 4.4k
PKI SCEP documentation updates #30753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
800439b
16b2722
854705d
310da0c
d46983d
7d2ae2b
291eba8
332b8fc
7c4a493
7fc2636
eb73ef8
6471c1c
e358061
5e36d1f
d324f4c
4ceb4df
77b5126
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,211 @@ | ||
--- | ||
layout: api | ||
page_title: SCEP - Auth Methods - HTTP API | ||
description: |- | ||
This is the API documentation for the Vault SCEP authentication | ||
method. | ||
--- | ||
|
||
# SCEP auth method (API) | ||
|
||
This is the API documentation for the Vault SCEP authentication | ||
method. For general information about the usage and operation of the | ||
SCEP method, please see the [Vault SCEP method documentation](/vault/docs/auth/scep). | ||
|
||
This documentation assumes the SCEP method is mounted at the | ||
`/auth/scep` path in Vault. Since it is possible to enable auth methods at any | ||
location, please update your API calls accordingly. | ||
stevendpclark marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Create SCEP role | ||
|
||
Creates or updates a named SCEP role. | ||
|
||
| Method | Path | | ||
|:-------|:------------------------| | ||
| `POST` | `/auth/scep/role/:name` | | ||
stevendpclark marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Parameters | ||
|
||
- `name` `(string: <required>)` - The name of the SCEP role. | ||
- `display_name` `(string: "")` - The `display_name` to set on tokens issued | ||
when authenticating against this role. If not set, defaults to the | ||
name of the role. | ||
stevendpclark marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- `auth_type` `(string: <required>)` - The authentication type to use for this role. | ||
Valid values are `static-challenge` and `intune`. | ||
stevendpclark marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- `challenge` `(string: "")` - The challenge to use for this role. This is only | ||
used when `auth_type` is set to `static-challenge`. If not set, defaults to | ||
the empty string. | ||
stevendpclark marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
@include 'tokenfields.mdx' | ||
|
||
### Sample payload | ||
|
||
```json | ||
{ | ||
"auth_type": "static-challenge", | ||
"challenge": "super-secret-challenge", | ||
"display_name": "test", | ||
"token_policies": ["access-scep"], | ||
"token_type": "batch" | ||
} | ||
``` | ||
|
||
### Sample request | ||
|
||
```shell-session | ||
$ curl \ | ||
--header "X-Vault-Token: ..." \ | ||
--request POST \ | ||
--data @payload.json | ||
http://127.0.0.1:8200/v1/auth/scep/role/static-challenge-1 | ||
``` | ||
|
||
### Sample response | ||
|
||
```json | ||
{ | ||
"request_id": "c22d68ec-ac3d-ea24-d5d0-efe07dcc0ef6", | ||
"lease_id": "", | ||
"renewable": false, | ||
"lease_duration": 0, | ||
"data": { | ||
"auth_type": "static-challenge", | ||
"display_name": "test", | ||
"name": "static-challenge-1", | ||
"token_bound_cidrs": [], | ||
"token_explicit_max_ttl": 0, | ||
"token_max_ttl": 0, | ||
"token_no_default_policy": false, | ||
"token_num_uses": 0, | ||
"token_period": 0, | ||
"token_policies": [ | ||
"access-scep" | ||
], | ||
"token_ttl": 0, | ||
"token_type": "batch" | ||
}, | ||
"wrap_info": null, | ||
"warnings": null, | ||
"auth": null, | ||
"mount_type": "scep" | ||
} | ||
``` | ||
|
||
## Read SCEP role | ||
|
||
Gets information associated with the named role. | ||
stevendpclark marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
| Method | Path | | ||
|:-------|:------------------------| | ||
| `GET` | `/auth/scep/role/:name` | | ||
stevendpclark marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Parameters | ||
|
||
- `name` `(string: <required>)` - The name of the SCEP role. | ||
|
||
### Sample request | ||
|
||
```shell-session | ||
$ curl \ | ||
--header "X-Vault-Token: ..." \ | ||
http://127.0.0.1:8200/v1/auth/scep/role/static-challenge-1 | ||
``` | ||
|
||
### Sample response | ||
|
||
```json | ||
{ | ||
"request_id": "07c9bfcc-ee30-6ba9-fce8-07bae5033989", | ||
"lease_id": "", | ||
"renewable": false, | ||
"lease_duration": 0, | ||
"data": { | ||
"auth_type": "static-challenge", | ||
"display_name": "static-challenge-1", | ||
"name": "static-challenge-1", | ||
"token_bound_cidrs": [], | ||
"token_explicit_max_ttl": 0, | ||
"token_max_ttl": 0, | ||
"token_no_default_policy": false, | ||
"token_num_uses": 0, | ||
"token_period": 0, | ||
"token_policies": [ | ||
"access-scep" | ||
], | ||
"token_ttl": 0, | ||
"token_type": "batch" | ||
}, | ||
"wrap_info": null, | ||
"warnings": null, | ||
"auth": null, | ||
"mount_type": "scep" | ||
} | ||
``` | ||
|
||
## List SCEP roles | ||
|
||
Lists configured SCEP role names. | ||
stevendpclark marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
| Method | Path | | ||
| :----- | :----------------- | | ||
| `LIST` | `/auth/scep/role` | | ||
stevendpclark marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Sample request | ||
|
||
```shell-session | ||
$ curl \ | ||
--header "X-Vault-Token: ..." \ | ||
--request LIST \ | ||
http://127.0.0.1:8200/v1/auth/scep/role | ||
``` | ||
|
||
### Sample response | ||
|
||
```json | ||
{ | ||
"auth": null, | ||
"warnings": null, | ||
"wrap_info": null, | ||
"data": { | ||
"keys": ["static-challenge-1", "intune-1"] | ||
}, | ||
"lease_duration": 0, | ||
"renewable": false, | ||
"lease_id": "" | ||
} | ||
``` | ||
|
||
## Delete SCEP role | ||
|
||
Deletes the named role. | ||
stevendpclark marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
| Method | Path | | ||
|:---------|:------------------------| | ||
| `DELETE` | `/auth/scep/role/:name` | | ||
stevendpclark marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Parameters | ||
|
||
- `name` `(string: <required>)` - The name of the SCEP role. | ||
|
||
### Sample request | ||
|
||
```shell-session | ||
$ curl \ | ||
--header "X-Vault-Token: ..." \ | ||
--request DELETE \ | ||
http://127.0.0.1:8200/v1/auth/scep/role/static-challenge-1 | ||
``` | ||
|
||
## Login | ||
|
||
This endpoint is used to authenticate against the SCEP auth method, but shouldn't be used directly, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Double but sentance construction here is a little confusing, maybe: "This endpoint is used to authenticate against the SCEP auth method. It shouldn't be used directly, rather through delegated authentication from a PKI mount." There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. |
||
but only through delegated authentication from a PKI mount. | ||
|
||
| Method | Path | | ||
|:-------|:-------------------| | ||
| `POST` | `/auth/scep/login` | | ||
stevendpclark marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Parameters | ||
|
||
- `name` `(string: "")` - Authenticate against only the named SCEP role. | ||
victorr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
If not set, defaults to trying all SCEP roles and returning any one that matches. |
Uh oh!
There was an error while loading. Please reload this page.