Skip to main content
PUT
/
vault-forward
/
configs
/
{config_id}
/
authentications
/
{authentication_id}
Update Vault Forward authentication method
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.sandbox.{id}.gr4vy.app/vault-forward/configs/{config_id}/authentications/{authentication_id}"

	payload := strings.NewReader("{\n  \"display_name\": \"My Message Level Encryption\",\n  \"fields\": [\n    {\n      \"key\": \"private_key\",\n      \"value\": \"sk_test_26PHem9AhJZvU623DfE1x4sd\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
{
  "type": "vault-forward-config-authentication",
  "id": "faaad066-30b4-4997-a438-242b0752d7e1",
  "created_at": "2012-12-12T10:53:43+00:00",
  "updated_at": "2012-12-12T10:53:43+00:00",
  "kind": "mle",
  "label": "My MLE",
  "display_name": "My MLE",
  "fields": [
    {
      "key": "secret_key",
      "value": "sk_test_26PHem9AhJZvU623DfE1x4sd"
    }
  ],
  "creator": {
    "id": "77a76f7e-d2de-4bbc-ada9-d6a0015e6bd5",
    "name": "John L",
    "email_address": "[email protected]"
  }
}
This endpoint requires the vault-forward-authentications.write scope.

Authorizations

Authorization
string
header
required

Path Parameters

config_id
string<uuid>
required
Example:
authentication_id
string<uuid>
required
Example:

Body

application/json
display_name
string
Required string length: 1 - 50
Example:
fields
object[]

Response

type
string
default:vault-forward-config-authentication
Example:
id
string<uuid>
Example:
created_at
string<date-time>
Example:
updated_at
string<date-time>
Example:
kind
enum<string>
Available options:
mle,
mtls,
signature
Example:
label
string
Example:
display_name
string
Example:
fields
object[]
creator
object | null