Skip to content

Conversation

RohanM
Copy link

@RohanM RohanM commented Aug 16, 2024

Description of Change

Fix authentication compatibility for datastore when using workload identity rather than manual credentials.

Related Issue

N/A

Motivation and Context

When using workload identity, getAuth() will return an object without email or key fields. If we provide null values when initialising the datastore client, this breaks authentication:

error: Serving an error page for /reading-history/teams.json?limit=5
message: 'The incoming JSON object does not contain a client_email field',

If instead we leave out any authentication details, the client will default to using the workload identity and successfully connect.

Checklist

  • Ran npm run lint and updated code style accordingly
  • npm run test passes
  • PR has a description and all contributors/stakeholder are noted/cc'ed
  • tests are updated and/or added to cover new code
  • relevant documentation is changed and/or added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant