2017-08-09 00:20:37 +00:00
---
2020-01-18 00:18:09 +00:00
layout: api
page_title: /sys/mfa/method/duo - HTTP API
sidebar_title: <code>/sys/mfa/method/duo</code>
description: >-
The '/sys/mfa/method/duo' endpoint focuses on managing Duo MFA behaviors in
Vault Enterprise.
2017-08-09 00:20:37 +00:00
---
## Configure Duo MFA Method
This endpoint defines a MFA method of type Duo.
2020-01-18 00:18:09 +00:00
| Method | Path |
| :----- | :-------------------------- |
| `POST` | `/sys/mfa/method/duo/:name` |
2017-08-09 00:20:37 +00:00
### Parameters
- `name` `(string: <required>)` – Name of the MFA method.
2017-11-03 15:17:59 +00:00
- `mount_accessor` `(string: <required>)` - The mount to tie this method to for use in automatic mappings. The mapping will use the Name field of Aliases associated with this mount as the username in the mapping.
2017-08-09 00:20:37 +00:00
2017-11-03 15:17:59 +00:00
- `username_format` `(string)` - A format string for mapping Identity names to MFA method names. Values to substitute should be placed in `{{}}`. For example, `"{{alias.name}}@example.com"`. If blank, the Alias's Name field will be used as-is. Currently-supported mappings:
2020-01-18 00:18:09 +00:00
2017-11-03 15:17:59 +00:00
- alias.name: The name returned by the mount configured via the `mount_accessor` parameter
2017-09-15 04:27:45 +00:00
- entity.name: The name configured for the Entity
2017-11-03 15:17:59 +00:00
- alias.metadata.`<key>`: The value of the Alias's metadata parameter
2018-03-20 18:54:10 +00:00
- entity.metadata.`<key>`: The value of the Entity's metadata parameter
2017-08-09 00:20:37 +00:00
- `secret_key` `(string)` - Secret key for Duo.
- `integration_key` `(string)` - Integration key for Duo.
- `api_hostname` `(string)` - API hostname for Duo.
- `push_info` `(string)` - Push information for Duo.
### Sample Payload
```json
{
"mount_accessor": "auth_userpass_1793464a",
"secret_key": "BIACEUEAXI20BNWTEYXT",
2020-01-18 00:18:09 +00:00
"integration_key": "8C7THtrIigh2rPZQMbguugt8IUftWhMRCOBzbuyz",
"api_hostname": "api-2b5c39f5.duosecurity.com"
2017-08-09 00:20:37 +00:00
}
```
### Sample Request
2020-05-21 17:18:17 +00:00
```shell-session
2017-08-09 00:20:37 +00:00
$ curl \
--header "X-Vault-Token: ..." \
--request POST \
--data @payload.json \
2018-03-23 15:41:51 +00:00
http://127.0.0.1:8200/v1/sys/mfa/method/duo/my_duo
2017-08-09 00:20:37 +00:00
```
## Read Duo MFA Method
This endpoint queries the MFA configuration of Duo type for a given method
name.
2020-01-18 00:18:09 +00:00
| Method | Path |
| :----- | :-------------------------- |
| `GET` | `/sys/mfa/method/duo/:name` |
2017-08-09 00:20:37 +00:00
### Parameters
- `name` `(string: <required>)` – Name of the MFA method.
### Sample Request
2020-05-21 17:18:17 +00:00
```shell-session
2017-08-09 00:20:37 +00:00
$ curl \
--header "X-Vault-Token: ..." \
--request GET \
2018-03-23 15:41:51 +00:00
http://127.0.0.1:8200/v1/sys/mfa/method/duo/my_duo
2017-08-09 00:20:37 +00:00
```
### Sample Response
```json
{
2020-01-18 00:18:09 +00:00
"data": {
"api_hostname": "api-2b5c39f5.duosecurity.com",
"id": "0ad21b78-e9bb-64fa-88b8-1e38db217bde",
"integration_key": "BIACEUEAXI20BNWTEYXT",
"mount_accessor": "auth_userpass_1793464a",
"name": "my_duo",
"pushinfo": "",
"secret_key": "8C7THtrIigh2rPZQMbguugt8IUftWhMRCOBzbuyz",
"type": "duo",
"username_format": ""
}
2017-08-09 00:20:37 +00:00
}
```
2020-01-18 00:18:09 +00:00
2017-08-09 00:20:37 +00:00
## Delete Duo MFA Method
This endpoint deletes a Duo MFA method.
2020-01-18 00:18:09 +00:00
| Method | Path |
| :------- | :-------------------------- |
| `DELETE` | `/sys/mfa/method/duo/:name` |
2017-08-09 00:20:37 +00:00
### Parameters
- `name` `(string: <required>)` - Name of the MFA method.
### Sample Request
2020-05-21 17:18:17 +00:00
```shell-session
2017-08-09 00:20:37 +00:00
$ curl \
--header "X-Vault-Token: ..." \
--request DELETE \
2018-03-23 15:41:51 +00:00
http://127.0.0.1:8200/v1/sys/mfa/method/duo/my_duo
2017-08-09 00:20:37 +00:00
```