Documentation ¶
Overview ¶
Package appcredentials provides utilities for the application credentials used to access GCP services.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustExistOrUnsetEnv ¶
func MustExistOrUnsetEnv()
MustExistOrUnsetEnv checks if the credential file pointed by the `GOOGLE_APPLICATION_CREDENTIALS` env var exists. If not, it unsets the env var so that application can continue to attempt using fallback mechanisms for authentication. We use this trick to support both secret and workload identity. See https://github.com/google/knative-gcp/issues/792. - When using secret, credential file is mounted under `GOOGLE_APPLICATION_CREDENTIALS` via secret volume mount. - When using workload identity, credential file doesn't exist as the volume mount is optional.
Types ¶
This section is empty.