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

Add Google Bearer Token Flow #378

Closed
wants to merge 2 commits into from
Closed

Conversation

glitch003
Copy link
Collaborator

@glitch003 glitch003 commented Feb 21, 2024

Update: AuthMethod 5 - "Google" is broken on the nodes too. so, this PR is kind of pointless.

Original description:
Ok so apologies since this is kind of confusing.

We support 2 google auth methods:
5 - "Google" - Traditional Bearer Token Oauth. The nodes resolve and verify the access token by sending it to google and using the response from Google
6 - "GoogleJwt" - JWT token auth. The nodes resolve the data in the token by parsing the JWT. The nodes verify the access token by retrieving the google certificates and checking against them.

Right now on Habanero and Manzano, 6 - "GoogleJwt" is broken, because the folder that should hold the google certificates doesn't exist and the node wasn't programmed to create it. This is already fixed in the node, but those changes haven't been deployed yet.

5 - "Google" should still work though! So, we can either deploy a whole network upgrade to fix auth method 6 - "GoogleJwt", or we can try and get users to use auth method 5 - "Google"

This PR is an attempt at adding support for auth method 5 - "Google". We've only ever implemented auth method 6 - "GoogleJwt" in the SDK since it's more efficient and better for the nodes to use this auth method. So therefore, when the user asks for an auth provider of type "google" it actually uses auth method 6 - "GoogleJwt".

I don't want to break this for existing users, so instead I added two new ProviderTypes: "googleJwt" which uses auth method 6 - "GoogleJwt" and"googleBearer" which uses auth method 5 - "Google". ProviderType "google" still maps to 6 - "GoogleJwt" which retains backward compatibility, but is indeed confusing.

@Ansonhkg Ansonhkg changed the base branch from master to staging/3.2.1 February 21, 2024 03:06
@Ansonhkg Ansonhkg mentioned this pull request Feb 21, 2024
5 tasks
@Ansonhkg Ansonhkg requested a review from DashKash54 February 21, 2024 03:56
@Ansonhkg Ansonhkg changed the base branch from staging/3.2.1 to staging/x February 22, 2024 01:39
@Ansonhkg Ansonhkg changed the base branch from staging/x to staging/3.2.2 February 22, 2024 05:23
@zach-is-my-name
Copy link
Contributor

zach-is-my-name commented Feb 24, 2024

Not sure if what you mentioned above is the cause of this (cayenne) or will block me from implementing the advised remedy when I transition to Manzano: https://discord.com/channels/896185694857343026/1197596414541303848

Base automatically changed from staging/3.2.2 to master February 28, 2024 06:04
@Ansonhkg
Copy link
Collaborator

do we still need this @glitch003 ?

@Ansonhkg
Copy link
Collaborator

Closing for now due to inactivity. cc @glitch003

@Ansonhkg Ansonhkg closed this Jul 15, 2024
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.

3 participants