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

[GMail] Validate Google Directory auth #1565

Merged
merged 4 commits into from
Sep 4, 2023

Conversation

timgrein
Copy link
Contributor

@timgrein timgrein commented Sep 4, 2023

Related to https://github.com/elastic/enterprise-search-team/issues/5592

This PR adds validation logic to check, whether the provided service_account_credentials, customer_id, subject values and the OAuth2 scopes are correctly setup, so the GMail connector can authenticate against the Google Directory API.

Checklists

Pre-Review Checklist

  • this PR has a meaningful title
  • this PR links to all relevant github issues that it fixes or partially addresses
  • if there is no GH issue, please create it. Each PR should have a link to an issue
  • this PR has a thorough description
  • Covered the changes with automated tests
  • Tested the changes locally
  • Added a label for each target release version (example: v7.13.2, v7.14.0, v8.0.0)

Copy link
Member

@artem-shelkovnikov artem-shelkovnikov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious - is there a way to make this error message more specific? E.g. "You're missing scope X" or similar?

@timgrein
Copy link
Contributor Author

timgrein commented Sep 4, 2023

Curious - is there a way to make this error message more specific? E.g. "You're missing scope X" or similar?

There's no "official" recommended way AFAIK. This API can probably return the scopes, I'll look into it and create a follow-up, if it's successful.

@timgrein timgrein merged commit 9663e22 into main Sep 4, 2023
1 check passed
@timgrein timgrein deleted the tim/gmail-validate-google-dir-auth branch September 4, 2023 14:06
@github-actions
Copy link

github-actions bot commented Sep 4, 2023

💔 Failed to create backport PR(s)

The backport operation could not be completed due to the following error:
There are no branches to backport to. Aborting.

The backport PRs will be merged automatically after passing CI.

To backport manually run:
backport --pr 1565 --autoMerge --autoMergeMethod squash

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

Successfully merging this pull request may close these issues.

2 participants