Package cloud.pangeacyber.pangea.vault
Class VaultClient
java.lang.Object
cloud.pangeacyber.pangea.Client
cloud.pangeacyber.pangea.vault.VaultClient
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGenerate an asymmetric keyasymmetricStore(AsymmetricStoreRequest request) Store an asymmetric keyDecryptDecryptDeleteEncryptEncryptget(GetRequest request) GetGet JWKGet JWKSign with JWTVerify a JWT signaturekeyRotate(KeyRotateRequest request) Rotate a keylist(ListRequest request) ListpangeaTokenRotate(PangeaTokenStoreRequest request) Rotate a Pangea TokenpangeaTokenStore(PangeaTokenStoreRequest request) Store a Pangea TokensecretRotate(SecretRotateRequest request) Rotate a secretsecretStore(SecretStoreRequest request) Store a secretSignSignstateChange(String id, int version, ItemVersionState state) State changeGenerate a symmetric keysymmetricStore(SymmetricStoreRequest request) Store a symmetric keyupdate(ListRequest request) UpdateVerifyVerifyMethods inherited from class cloud.pangeacyber.pangea.Client
buildClient, buildPostRequest, doPost, fillPostHeaders, setCustomHeaders, setCustomUserAgent
-
Field Details
-
serviceName
-
-
Constructor Details
-
VaultClient
-
-
Method Details
-
stateChange
public StateChangeResponse stateChange(String id, int version, ItemVersionState state) throws PangeaException, PangeaAPIException State change- Parameters:
id- - item id to changeversion- - item version to changestate- - state to set to item version- Returns:
- StateChangeResponse
- Throws:
PangeaExceptionPangeaAPIException- Description:
- change an item version state
- Example:
// TODO:
-
delete
Delete- Parameters:
id- - item id to delete- Returns:
- DeleteResponse
- Throws:
PangeaExceptionPangeaAPIException- Description:
- Delete an item
- Example:
// TODO:
-
get
Get- Parameters:
request- - request to /get endpoint- Returns:
- GetResponse
- Throws:
PangeaExceptionPangeaAPIException- Description:
- Get an item of any type
- Example:
// TODO:
-
list
List- Parameters:
request- - request parameters to send to list endpoint- Returns:
- ListResponse
- Throws:
PangeaExceptionPangeaAPIException- Description:
- Retrieve a list of items
- Example:
// TODO:
-
update
Update- Parameters:
request- - request parameters to send to update endpoint- Returns:
- UpdateResponse
- Throws:
PangeaExceptionPangeaAPIException- Description:
- Update the metadata of an item
- Example:
// TODO:
-
secretStore
public SecretStoreResponse secretStore(SecretStoreRequest request) throws PangeaException, PangeaAPIException Store a secret- Parameters:
request- - request parameters to send to /secret/store endpoint- Returns:
- SecretStoreResponse
- Throws:
PangeaExceptionPangeaAPIException- Description:
- Store a secret in vault service
- Example:
// TODO:
-
pangeaTokenStore
public SecretStoreResponse pangeaTokenStore(PangeaTokenStoreRequest request) throws PangeaException, PangeaAPIException Store a Pangea Token- Parameters:
request- - request parameters to send to /secret/store endpoint- Returns:
- SecretStoreResponse
- Throws:
PangeaExceptionPangeaAPIException- Description:
- Store a pangea token in vault service
- Example:
// TODO:
-
secretRotate
public SecretRotateResponse secretRotate(SecretRotateRequest request) throws PangeaException, PangeaAPIException Rotate a secret- Parameters:
request- - secret rotate request- Returns:
- SecretRotateResponse
- Throws:
PangeaExceptionPangeaAPIException- Description:
- Rotate a secret in vault service
- Example:
// TODO:
-
pangeaTokenRotate
public SecretRotateResponse pangeaTokenRotate(PangeaTokenStoreRequest request) throws PangeaException, PangeaAPIException Rotate a Pangea Token- Parameters:
request- - pangea token store request- Returns:
- SecretRotateResponse
- Throws:
PangeaExceptionPangeaAPIException- Description:
- Rotate a Pangea Token in vault service
- Example:
// TODO:
-
symmetricGenerate
public SymmetricGenerateResponse symmetricGenerate(SymmetricGenerateRequest request) throws PangeaException, PangeaAPIException Generate a symmetric key- Parameters:
request- - request parameters to send to /key/generate endpoint- Returns:
- SymmetricGenerateResponse
- Throws:
PangeaExceptionPangeaAPIException- Description:
- Generate a symmetric key in vault service
- Example:
// TODO:
-
asymmetricGenerate
public AsymmetricGenerateResponse asymmetricGenerate(AsymmetricGenerateRequest request) throws PangeaException, PangeaAPIException Generate an asymmetric key- Parameters:
request- - request parameters to send to /key/generate endpoint- Returns:
- AsymmetricGenerateResponse
- Throws:
PangeaExceptionPangeaAPIException- Description:
- Generate an asymmetric key in vault service
- Example:
// TODO:
-
asymmetricStore
public AsymmetricStoreResponse asymmetricStore(AsymmetricStoreRequest request) throws PangeaException, PangeaAPIException Store an asymmetric key- Parameters:
request- - request parameters to send to /key/store endpoint- Returns:
- AsymmetricStoreResponse
- Throws:
PangeaExceptionPangeaAPIException- Description:
- Store an asymmetric key in vault service
- Example:
// TODO:
-
symmetricStore
public SymmetricStoreResponse symmetricStore(SymmetricStoreRequest request) throws PangeaException, PangeaAPIException Store a symmetric key- Parameters:
request- - request parameters to send to /key/store endpoint- Returns:
- SymmetricStoreResponse
- Throws:
PangeaExceptionPangeaAPIException- Description:
- Store a symmetric key in vault service
- Example:
// TODO:
-
keyRotate
public KeyRotateResponse keyRotate(KeyRotateRequest request) throws PangeaException, PangeaAPIException Rotate a key- Parameters:
request- - request parameters to send to /key/rotate endpoint- Returns:
- KeyRotateResponse
- Throws:
PangeaExceptionPangeaAPIException- Description:
- Rotate a key
- Example:
// TODO:
-
encrypt
public EncryptResponse encrypt(String id, String plainText) throws PangeaException, PangeaAPIException Encrypt- Parameters:
id- - key id to encrypt messageplainText- - message to encrypt- Returns:
- EncryptResponse
- Throws:
PangeaExceptionPangeaAPIException- Description:
- Encrypt a message
- Example:
// TODO:
-
encrypt
public EncryptResponse encrypt(String id, String plainText, int version) throws PangeaException, PangeaAPIException Encrypt- Parameters:
id- - key id to encrypt messageplainText- - message to encryptversion- - key version to encrypt message- Returns:
- EncryptResponse
- Throws:
PangeaExceptionPangeaAPIException- Description:
- Encrypt a message
- Example:
// TODO:
-
decrypt
public DecryptResponse decrypt(String id, String cipherText) throws PangeaException, PangeaAPIException Decrypt- Parameters:
id- - key id to encrypt messagecipherText- - message to decrypt- Returns:
- DecryptResponse
- Throws:
PangeaExceptionPangeaAPIException- Description:
- Decrypt a message
- Example:
// TODO:
-
decrypt
public DecryptResponse decrypt(String id, String cipherText, Integer version) throws PangeaException, PangeaAPIException Decrypt- Parameters:
id- - key id to encrypt messagecipherText- - message to decryptversion- - key version to use on decryption- Returns:
- DecryptResponse
- Throws:
PangeaExceptionPangeaAPIException- Description:
- Decrypt a message
- Example:
// TODO:
-
sign
Sign- Parameters:
id- - key id to sign messagemessage- - message to sign- Returns:
- SignResponse
- Throws:
PangeaExceptionPangeaAPIException- Description:
- sign a message
- Example:
// TODO:
-
sign
public SignResponse sign(String id, String message, int version) throws PangeaException, PangeaAPIException Sign- Parameters:
id- - key id to sign messagemessage- - message to signversion- - key version to sign message- Returns:
- SignResponse
- Throws:
PangeaExceptionPangeaAPIException- Description:
- sign a message
- Example:
// TODO:
-
jwtSign
public JWTSignResponse jwtSign(String id, String payload) throws PangeaException, PangeaAPIException Sign with JWT- Parameters:
id- - key id to sign payloadpayload- - message to sign- Returns:
- JWTSignResponse
- Throws:
PangeaExceptionPangeaAPIException- Description:
- sign a payload with a JWT
- Example:
// TODO:
-
verify
public VerifyResponse verify(String id, String message, String signature) throws PangeaException, PangeaAPIException Verify- Parameters:
id- - key id to verify message/signaturemessage- - message to verifysignature- - signature to verify- Returns:
- VerifyResponse
- Throws:
PangeaExceptionPangeaAPIException- Description:
- Verify a message/signature pair
- Example:
// TODO:
-
verify
public VerifyResponse verify(String id, String message, String signature, Integer version) throws PangeaException, PangeaAPIException Verify- Parameters:
id- - key id to verify message/signaturemessage- - message to verifysignature- - signature to verifyversion- - key version to use on verification- Returns:
- VerifyResponse
- Throws:
PangeaExceptionPangeaAPIException- Description:
- Verify a message/signature pair
- Example:
// TODO:
-
jwtVerify
Verify a JWT signature- Parameters:
jws- - signature to verify- Returns:
- JWTVerifyResponse
- Throws:
PangeaExceptionPangeaAPIException- Description:
- Verify a JWS
- Example:
// TODO:
-
jwkGet
Get JWK- Parameters:
id- - item id to get- Returns:
- GetResponse
- Throws:
PangeaExceptionPangeaAPIException- Description:
- Get a JWK
- Example:
// TODO:
-
jwkGet
Get JWK- Parameters:
id- - item id to getversion- - item version/versions to get- Returns:
- GetResponse
- Throws:
PangeaExceptionPangeaAPIException- Description:
- Get a JWK
- Example:
// TODO:
-