Skip to main content

GoogleServiceAccountStrategy

Home > @backstage/plugin-kubernetes-backend > GoogleServiceAccountStrategy

GoogleServiceAccountStrategy provides authentication using Google Service Account credentials.

Credentials can be provided via configuration:

kubernetes:
googleServiceAccountCredentials: |
{
"type": "service_account",
"project_id": "your-project-id",
"private_key_id": "key-id",
"private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n",
"client_email": "your-service-account@your-project.iam.gserviceaccount.com",
"client_id": "client-id",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/..."
}

If no credentials are provided in config, falls back to GOOGLE_APPLICATION_CREDENTIALS or ADC.

Signature:

class GoogleServiceAccountStrategy implements AuthenticationStrategy 

Implements: AuthenticationStrategy

Constructors

Constructor

Modifiers

Description

(constructor)(opts)

Constructs a new instance of the GoogleServiceAccountStrategy class

Methods

Method

Modifiers

Description

getCredential()

presentAuthMetadata(_authMetadata)

validateCluster()