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

public abstract class GCPSecretSessionServiceFactory extends SessionServiceFactory
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:
  • Constructor Details

    • GCPSecretSessionServiceFactory

      public GCPSecretSessionServiceFactory()
  • Method Details