HCVA0-003 practice question 31 of 35
Mike’s Cereal Shack uses Vault to encrypt customer data to ensure it is always stored securely. They are developing a new application integration to…
Full set: 285 questionsThe API endpoint /v1/transit/encrypt/customer-data is used to encrypt data with the Transit secrets engine using a named key, in this case, customer-data. The HTTP POST method is used to send data to the server for processing. The --data @data.json flag in the curl command specifies that the content of the data.json file is the request's payload. For this specific encryption endpoint, the required payload is a JSON object containing the plaintext (cleartext) data that needs to be encrypted. Vault receives this plaintext, encrypts it using the key stored securely within Vault, and returns the resulting ciphertext.
A. Transit secrets engine configuration is managed via different API endpoints (e.g., /sys/mounts/ or /transit/keys/), not the /encrypt endpoint.
B. Ciphertext is sent as a payload to the /transit/decrypt/{keyname} endpoint for decryption, not the /encrypt endpoint.
C. The encryption key (customer-data) is specified in the URL. The core principle of the Transit engine is that the key never leaves Vault and is not sent by the client.
1. HashiCorp Vault Official Documentation, "Encrypt Data (POST /transit/encrypt/:name)" API Reference. This document specifies the required payload for the encryption endpoint. The plaintext parameter is listed as a required string, which is the "plaintext data to be encrypted." The data must be base64-encoded.
Source: HashiCorp Vault API Documentation, Secret: Transit, Section: "Encrypt Data".
Reference: developer.hashicorp.com/vault/api-docs/secret/transit#encrypt-data
2. HashiCorp Learn, "Encryption as a Service: The Transit Secrets Engine" Tutorial. This official tutorial provides a practical example of using the encrypt endpoint. In "Step 4: Encrypt some data," it demonstrates a curl command where the payload is a JSON object containing a plaintext key with base64-encoded secret data.
Source: HashiCorp Learn, Vault Tutorials.
Reference: developer.hashicorp.com/vault/tutorials/encryption-as-a-service/eaas-transit, Section: "Step 4: Encrypt some data".
Keep practicing
Take the free HCVA0-003 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other HCVA0-003 practice questions
- Question 1Which two characters can be used when writing a policy to reflect a wildcard or path segm…
- Question 2You have multiple Vault clusters in your environment, one for test and one for production…
- Question 3Short-lived, dynamically generated secrets provide organizations with many benefits. Sele…
- Question 4When Vault is sealed, which are the only two operations available to a Vault administrato…
- Question 6What is the default method of authentication after first initializing Vault?
- Question 7Which two interfaces automatically assume the token for subsequent requests after success…
