Class GCPSecretSessionServiceFactory
java.lang.Object
org.apache.beam.sdk.io.solace.broker.SessionServiceFactory
org.apache.beam.sdk.io.solace.broker.GCPSecretSessionServiceFactory
- All Implemented Interfaces:
Serializable
This class implements a
SessionServiceFactory
that retrieve the basic authentication
credentials from a Google Cloud Secret Manager secret.
It can be used to avoid having to pass the password as an option of your pipeline. For this
provider to work, the worker where the job runs needs to have the necessary credentials to access
the secret. In Dataflow, this implies adding the necessary permissions to the worker service
account. For other runners, set the credentials in the pipeline options using GcpOptions
.
It also shows how to implement a SessionServiceFactory
that depends on using external
resources to retrieve the Solace session properties. In this case, using the Google Cloud Secrete
Manager client.
Example of how to create the provider object:
GCPSecretSessionServiceFactory factory =
GCPSecretSessionServiceFactory.builder()
.username("user")
.host("host:port")
.passwordSecretName("secret-name")
.build();
SessionService serviceUsingGCPSecret = factory.create();
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.beam.sdk.io.solace.broker.SessionServiceFactory
equals, getQueue, getSubmissionMode, hashCode, setQueue, setSubmissionMode
-
Constructor Details
-
GCPSecretSessionServiceFactory
public GCPSecretSessionServiceFactory()
-
-
Method Details
-
username
-
host
-
passwordSecretName
-
vpnName
-
secretManagerProjectId
-
passwordSecretVersion
-
builder
-
create
Description copied from class:SessionServiceFactory
This is the core method that subclasses must implement. It defines how to construct and return a SessionService object.- Specified by:
create
in classSessionServiceFactory
-