Package codes.grow.packages.vault
Class Wrapping
java.lang.Object
codes.grow.packages.vault.Wrapping
Response wrapping:
client.wrapping().
WrapInfo w = client.wrapping().wrap(Map.of("password", "s3cret"), Duration.ofMinutes(1));
UnwrapResult r = other.wrapping().unwrap(w.token());
-
Method Summary
Modifier and TypeMethodDescriptionlookupWrapping(Secret token) Properties of a wrapping token without using it:POST sys/wrapping/lookup.lookupWrapping(String token) Properties of a wrapping token given as text.lookupWrappingAsync(Secret token) AsynchronouslookupWrapping(Secret).Unwraps a token:POST sys/wrapping/unwrapauthenticated with the wrapping token itself.Unwraps a token given as text.unwrapAsync(Secret token) Asynchronousunwrap(Secret).Wraps data in a single-use token:POST sys/wrapping/wrapwithX-Vault-Wrap-TTL.Asynchronouswrap(Map, Duration).
-
Method Details
-
wrap
Wraps data in a single-use token:POST sys/wrapping/wrapwithX-Vault-Wrap-TTL.- Parameters:
data- data to wrapttl- validity of the token- Returns:
- the wrapping token
-
wrapAsync
Asynchronouswrap(Map, Duration).- Parameters:
data- data to wrapttl- validity- Returns:
- a future with the wrapping token
-
unwrap
Unwraps a token:POST sys/wrapping/unwrapauthenticated with the wrapping token itself. A used or invalid token raisesValidationException; never retried.- Parameters:
token- wrapping token- Returns:
- the original response
-
unwrap
Unwraps a token given as text.- Parameters:
token- wrapping token- Returns:
- the original response
-
unwrapAsync
Asynchronousunwrap(Secret).- Parameters:
token- wrapping token- Returns:
- a future with the original response
-
lookupWrapping
Properties of a wrapping token without using it:POST sys/wrapping/lookup.- Parameters:
token- wrapping token- Returns:
- the properties
-
lookupWrapping
Properties of a wrapping token given as text.- Parameters:
token- wrapping token- Returns:
- the properties
-
lookupWrappingAsync
AsynchronouslookupWrapping(Secret).- Parameters:
token- wrapping token- Returns:
- a future with the properties
-