Use a customer-managed key (Enterprise)
curl --request PUT \
--url https://app.trustivan.com/api/v1/settings/encryption/customer-key \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"key_ref": "<string>"
}
'import requests
url = "https://app.trustivan.com/api/v1/settings/encryption/customer-key"
payload = { "key_ref": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({key_ref: '<string>'})
};
fetch('https://app.trustivan.com/api/v1/settings/encryption/customer-key', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/settings/encryption/customer-key"
payload := strings.NewReader("{\n \"key_ref\": \"<string>\"\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(string(body))
}{
"kms_provider": "local",
"customer_key": {
"provider": "aws",
"key_ref": "<string>"
},
"data_key_version": 123,
"customer_providers": [
"aws"
],
"entitled": true
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Use a customer-managed key (Enterprise)
Owner-only. The key is probed with a wrap and unwrap first; then every data key version of the organization is rewrapped under it. No secret is re-encrypted. Disabling the key in the KMS makes the organization’s secrets unreadable within five minutes (the unwrapped-key cache).
PUT
/
settings
/
encryption
/
customer-key
Use a customer-managed key (Enterprise)
curl --request PUT \
--url https://app.trustivan.com/api/v1/settings/encryption/customer-key \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"key_ref": "<string>"
}
'import requests
url = "https://app.trustivan.com/api/v1/settings/encryption/customer-key"
payload = { "key_ref": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({key_ref: '<string>'})
};
fetch('https://app.trustivan.com/api/v1/settings/encryption/customer-key', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/settings/encryption/customer-key"
payload := strings.NewReader("{\n \"key_ref\": \"<string>\"\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(string(body))
}{
"kms_provider": "local",
"customer_key": {
"provider": "aws",
"key_ref": "<string>"
},
"data_key_version": 123,
"customer_providers": [
"aws"
],
"entitled": true
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Authorizations
Body
application/json
Response
Adopted.