Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Support Google OAuth2 and other OIdC providers #147

Merged
merged 27 commits into from
Mar 2, 2021
Merged

Conversation

EngHabu
Copy link
Contributor

@EngHabu EngHabu commented Jan 5, 2021

TL;DR

A few changes to make sure OIdC with other providers (besides Okta) also work:

  • Move OAuth scopes to a config. This allows flyte admins to choose which additional scopes to request. E.g. request offline_access in Okta case but not in Google Auth
  • Rely on id_token instead of access_token for authentication
  • Persist/restore id_token to cookies

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Tracking Issue

flyteorg/flyte#657

katrogan
katrogan previously approved these changes Jan 8, 2021
pkg/auth/handlers.go Outdated Show resolved Hide resolved
@katrogan
Copy link
Contributor

looks like github.com/lyft/flyteadmin/pkg/auth compilation failed?

@EngHabu EngHabu requested a review from kumare3 as a code owner February 22, 2021 18:19
@EngHabu EngHabu changed the title Move scopes to config Support Google OAuth2 and other OIdC providers Feb 23, 2021
flyteadmin_config.yaml Outdated Show resolved Hide resolved
@katrogan
Copy link
Contributor

LGTM but will let @wild-endeavor review & approve

wild-endeavor
wild-endeavor previously approved these changes Feb 24, 2021
Copy link
Contributor

@wild-endeavor wild-endeavor left a comment

Choose a reason for hiding this comment

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

reminder to @anandswaminathan that when this goes out you will need to add scopes

@EngHabu
Copy link
Contributor Author

EngHabu commented Feb 24, 2021

I added them as default values: https://github.com/flyteorg/flyteadmin/pull/147/files#diff-a3d824da3c42420cd5cbb0a4a2c0e7b5bfddd819652788a0596d195dc6e31fa5R55-R60

so we don't have to break existing behavior... Is that enough?

EngHabu and others added 12 commits February 26, 2021 16:51
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
* Update propeller

* cleanup

Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
wild-endeavor
wild-endeavor previously approved these changes Feb 27, 2021
wild-endeavor
wild-endeavor previously approved these changes Mar 1, 2021
@EngHabu EngHabu force-pushed the offline_access branch 2 times, most recently from c8cf001 to 28ff50d Compare March 2, 2021 00:27
EngHabu added 5 commits March 1, 2021 16:30
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
@EngHabu EngHabu merged commit 1948047 into master Mar 2, 2021
eapolinario pushed a commit that referenced this pull request Sep 6, 2023
* Move scopes to config

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* missed

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* wip

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* Update handlers.go

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* go get propeller at v0.5.12 (#146)

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* Update to using latest flytepropeller v0.5.13 (#148)

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* Update propeller to 0.5.14 (#149)

* Update propeller

* cleanup

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* Filter executions by user (#150)

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* Update CI post migration

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* Update codecov link

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* Publish raw events (#151)

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* fix test

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* wip

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* Fix token retrieval from cookies

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* Fix unit tests and lint

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* Move to const

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* Revert Auth config

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* Revert kube config path

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* Use access token when posting to IdP

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* Ignore refresh token error

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* Fix tests

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* Expose openId metadata endpoint and expose scopes in /config endpoint

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* mod tidy

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* rename

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* lint

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* unit tests

Signed-off-by: Haytham Abuelfutuh <[email protected]>

Co-authored-by: Yee Hing Tong <[email protected]>
Co-authored-by: Katrina Rogan <[email protected]>
Co-authored-by: tnsetting <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants