From afec24acbf21d19b91b5cb3b56440c7fefa7852c Mon Sep 17 00:00:00 2001 From: william Date: Thu, 3 Oct 2024 17:19:02 +0200 Subject: [PATCH] fix: add backward compatibility with env variable ENG-4819 --- grpc/config/credentials.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/grpc/config/credentials.go b/grpc/config/credentials.go index 413832a8..4ff94b85 100644 --- a/grpc/config/credentials.go +++ b/grpc/config/credentials.go @@ -55,6 +55,15 @@ func DefaultEnvironmentLoaderConfig(_ context.Context) (*CredentialsConfig, erro return UnmarshalCredentialConfig(data) } +// EntityMatchingEnvironmentLoader for backward compatibility with old environment variables. +func EntityMatchingEnvironmentLoader(_ context.Context) (*CredentialsConfig, error) { + data, err := lookupEnvCredentialVariables("INDYKITE_ENTITY_MATCHING_APPLICATION_CREDENTIALS") + if err != nil { + return nil, err + } + return UnmarshalCredentialConfig(data) +} + func StaticCredentialsJSON(credentialsJSON []byte) CredentialsLoader { return func(_ context.Context) (*CredentialsConfig, error) { return UnmarshalCredentialConfig(credentialsJSON)