From 30427b64f99ae32891e4554fce041d8ecb143dc2 Mon Sep 17 00:00:00 2001 From: Vault Automation Date: Fri, 15 May 2026 23:24:44 -0600 Subject: [PATCH] MFA Methods and Login Enforcement List Response Schema Updates (#14837) (#14846) * Adds FieldSchema for MFA methods and login enforcements * Update description Co-authored-by: Kianna <30884335+kiannaquach@users.noreply.github.com> --- vault/identity_store.go | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/vault/identity_store.go b/vault/identity_store.go index 3a7d039f82..a87c9b4e30 100644 --- a/vault/identity_store.go +++ b/vault/identity_store.go @@ -6,6 +6,7 @@ package vault import ( "context" "fmt" + "net/http" "reflect" "strings" "time" @@ -217,6 +218,23 @@ func mfaCommonPaths(i *IdentityStore) []*framework.Path { logical.ListOperation: &framework.PathOperation{ Callback: i.handleMFAMethodListGlobal, Summary: "List MFA method configurations for all MFA methods", + Responses: map[int][]framework.Response{ + http.StatusOK: {{ + Description: "OK", + Fields: map[string]*framework.FieldSchema{ + "keys": { + Type: framework.TypeStringSlice, + Description: `A list of mfa method configurations keys`, + Required: true, + }, + "key_info": { + Type: framework.TypeMap, + Description: `MFA method configurations details keyed by the id`, + Required: false, + }, + }, + }}, + }, }, }, }, @@ -600,6 +618,23 @@ func mfaLoginEnforcementPaths(i *IdentityStore) []*framework.Path { logical.ListOperation: &framework.PathOperation{ Callback: i.handleMFALoginEnforcementList, Summary: "List login enforcements", + Responses: map[int][]framework.Response{ + http.StatusOK: {{ + Description: "OK", + Fields: map[string]*framework.FieldSchema{ + "keys": { + Type: framework.TypeStringSlice, + Description: `A list of login enforcement keys`, + Required: true, + }, + "key_info": { + Type: framework.TypeMap, + Description: `Login enforcement details keyed by the id`, + Required: false, + }, + }, + }}, + }, }, }, },