Class GcpHsmGeneratedSecret
java.lang.Object
org.apache.beam.sdk.util.Secret
org.apache.beam.sdk.extensions.gcp.util.GcpHsmGeneratedSecret
- All Implemented Interfaces:
Serializable
public class GcpHsmGeneratedSecret
extends org.apache.beam.sdk.util.Secret
A
Secret manager implementation that generates a secret using entropy from a GCP HSM key
and stores it in Google Cloud Secret Manager. If the secret already exists, it will be retrieved.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetKeyId()Returns the key ID of the secret.Returns the key ring ID of the secret.Returns the location ID of the secret.Returns the project ID of the secret.byte[]Returns the secret as a byte array.Returns the secret ID of the secret.inthashCode()Methods inherited from class org.apache.beam.sdk.util.Secret
fromJson, fromJson, getBytes, getBytes, getString, getString, parseSecretOption
-
Constructor Details
-
GcpHsmGeneratedSecret
-
-
Method Details
-
getSecretBytes
public byte[] getSecretBytes()Returns the secret as a byte array. Assumes that the current active service account has permissions to read the secret.- Specified by:
getSecretBytesin classorg.apache.beam.sdk.util.Secret- Returns:
- The secret as a byte array.
-
getProjectId
Returns the project ID of the secret.- Returns:
- The project ID as a String.
-
getLocationId
Returns the location ID of the secret.- Returns:
- The location ID as a String.
-
getKeyRingId
Returns the key ring ID of the secret.- Returns:
- The key ring ID as a String.
-
getKeyId
Returns the key ID of the secret.- Returns:
- The key ID as a String.
-
getSecretId
Returns the secret ID of the secret.- Returns:
- The secret ID as a String.
-
equals
-
hashCode
public int hashCode()
-