public class LogicalUtilities
extends java.lang.Object
| Constructor and Description |
|---|
LogicalUtilities() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
addQualifierToPath(java.util.List<java.lang.String> segments,
java.lang.String qualifier)
Injects the supplied qualifier (either "data" or "metadata") into the second-from-the-root segment position, for a Vault
path to be converted for use with a Version 2 secret engine.
|
static java.lang.String |
adjustPathForDelete(java.lang.String path,
Logical.logicalOperations operation)
In version 1 style secret engines, the same path is used for all CRUD operations on a secret.
|
static java.lang.String |
adjustPathForList(java.lang.String path,
Logical.logicalOperations operation)
In version 1 style secret engines, the same path is used for all CRUD operations on a secret.
|
static java.lang.String |
adjustPathForReadOrWrite(java.lang.String path,
Logical.logicalOperations operation)
In version 1 style secret engines, the same path is used for all CRUD operations on a secret.
|
static java.lang.String |
adjustPathForVersionDelete(java.lang.String path)
When deleting secret versions, you must inject the path segment "delete" right after the lowest-level path segment.
|
static java.lang.String |
adjustPathForVersionDestroy(java.lang.String path)
When destroying secret versions, you must inject the path segment "destroy" right after the lowest-level path segment.
|
static java.lang.String |
adjustPathForVersionUnDelete(java.lang.String path)
When undeleting secret versions, you must inject the path segment "undelete" right after the lowest-level path segment.
|
static JsonObject |
jsonObjectToWriteFromEngineVersion(Logical.logicalOperations operation,
JsonObject jsonObject)
In version two, when writing a secret, the JSONObject must be nested with "data" as the key.
|
public static java.lang.String addQualifierToPath(java.util.List<java.lang.String> segments,
java.lang.String qualifier)
segments - The Vault path split into segments.qualifier - The String to add to the path, based on the operation.public static java.lang.String adjustPathForReadOrWrite(java.lang.String path,
Logical.logicalOperations operation)
path - The Vault path to check or mutate, based on the operation.operation - The operation being performed, e.g. readV2 or writeV1.public static java.lang.String adjustPathForList(java.lang.String path,
Logical.logicalOperations operation)
path - The Vault path to check or mutate, based on the operation.operation - The operation being performed, e.g. readV2 or writeV1.public static java.lang.String adjustPathForDelete(java.lang.String path,
Logical.logicalOperations operation)
path - The Vault path to check or mutate, based on the operation.operation - The operation being performed, e.g. readV2 or writeV1.public static java.lang.String adjustPathForVersionDelete(java.lang.String path)
path - The Vault path to check or mutate, based on the operation.public static java.lang.String adjustPathForVersionUnDelete(java.lang.String path)
path - The Vault path to check or mutate, based on the operation.public static java.lang.String adjustPathForVersionDestroy(java.lang.String path)
path - The Vault path to check or mutate, based on the operation.public static JsonObject jsonObjectToWriteFromEngineVersion(Logical.logicalOperations operation, JsonObject jsonObject)
operation - The operation being performed, e.g. writeV1, or writeV2.jsonObject - The jsonObject that is going to be written.