Encrypts a secret
For connections, the secrets are encrypted in json form. When creating connections in an automated fashion, secrets have to be first converted into the proper representation. To obtain the representation of a secret of an existing connection, use the decrypt endpoint. The secret encryption method depends on your vault setup. Without any vault user and passphrase, the secret will be encrypted with a generic vault key. If you have a vault user and custom passphrase set up, the secret will be encrypted with your passphrase key.
Authorization
bearerAuth The bearer token used is the session token that you receive from the handshake exchange.
In: header
Request Body
application/json
The raw string value to encrypt
Response Body
application/json
application/json
application/json
curl -X POST "http://localhost:21721/secret/encrypt" \ -H "Content-Type: application/json" \ -d '{ "value": "123" }'{
"encrypted": {
"encryptedToken": {
"token": "lX6JOtL-mKbuUBR4nYdhJsv3RzrXm+f+JLLKpkSAfg=="
},
"secret": {
"encryptedValue": "VR1brTq1-i3p5fLcz5O58tmbnmDjRKL5IOmSkFaQag==",
"type": "locked"
}
}
}{
"message": "string"
}{
"error": {
"cause": {},
"stackTrace": [],
"suppressed": [],
"localizedMessage": "string",
"message": "string"
}
}Decrypts a secret POST
For connections, the secrets are encrypted in json form. When creating connections in an automated fashion, secrets have to be first converted into the proper representation. This endpoint can be used to obtain the representation of a secret of an existing connection.
Run command in shell session POST
Runs a command in an active shell session and waits for it to finish. The exit code and output will be returned in the response. Note that a variety of different errors can occur when executing the command. If the command finishes, even with an error code, a normal HTTP 200 response will be returned. However, if any other error occurs like the shell not responding or exiting unexpectedly, an HTTP 500 response will be returned.