Class SpannerCredentials

java.lang.Object
io.github.flink.gcp.connector.spanner.SpannerCredentials

@Internal public final class SpannerCredentials extends Object
Loads credentials shared by every direction of this connector: the sink writer, the bounded source's planner and readers, the Change Streams coordinator and query clients, and the table lookup path.
  • Method Details

    • load

      @Nullable public static com.google.auth.oauth2.GoogleCredentials load(@Nullable String serviceAccountKeyFile) throws IOException
      Loads a service-account key file, or returns null to preserve application-default credentials.

      The path and parser failure are deliberately absent from the exception. A path can expose a mounted secret's name, and parser exceptions can echo credential material.

      Parameters:
      serviceAccountKeyFile - the configured key-file path, or null for ADC
      Returns:
      scoped service-account credentials, or null for ADC
      Throws:
      IOException - if the configured file cannot be read as a service-account key