Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datastore authentication for workload identity #378

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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