Skip to content

Commit

Permalink
fix: add backward compatibility with env variable
Browse files Browse the repository at this point in the history
ENG-4819
  • Loading branch information
Septimus4 committed Oct 3, 2024
1 parent 3127f38 commit afec24a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions grpc/config/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit afec24a

Please sign in to comment.