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

No more auth0 #2277

Merged
merged 33 commits into from
Mar 21, 2023
Merged

No more auth0 #2277

merged 33 commits into from
Mar 21, 2023

Conversation

GeorgianaElena
Copy link
Member

@GeorgianaElena GeorgianaElena commented Feb 28, 2023

Closes #1304

Straightforward changes:

Worth some more 👀 on it:

  • Updated the cilogon_app.py to:

    • no more classes as unnecessarily
    • don't assume that the encrypted configuration file of a hub (enc-{hub_name}.secret.values.yaml) can only contain cilogon specific configuration
    • allow deleting from and adding to an enc-{hub_name}.secret.values.yaml file that's either empty or has prior existing config.
  • Turned existing auth0 client management into a deployer subcommand in case we want to use it still in exceptional cases [Question] Should we turn the existing Auth0 OAuth client management code into a deployer subcommand #2328

Todo:

@github-actions

This comment was marked as resolved.

@GeorgianaElena
Copy link
Member Author

GeorgianaElena commented Mar 10, 2023

Looks like I've hit a max number of OAuth apps that ca be created, which is 50.
Need to check with CILogon folks if this number can be increased 🤔
✅ Solved https://2i2c.freshdesk.com/a/tickets/536. We can now create up to 100 max clients

@damianavila
Copy link
Contributor

We can now create up to 100 max clients

Do you foresee needing more in the short future? Btw, the request was fulfilled pretty quickly, IIRC, so it should not be a problem to ask for more, WDYT?

@GeorgianaElena
Copy link
Member Author

Do you foresee needing more in the short future?
I think we should be fine with this number in the short future

Btw, the request was fulfilled pretty quickly, IIRC, so it should not be a problem to ask for more, WDYT?
Yes, they were quick

@GeorgianaElena GeorgianaElena marked this pull request as ready for review March 14, 2023 11:52
@GeorgianaElena
Copy link
Member Author

This should be ready for review now. Sorry for the PR size :/
I've updated the top comment to reflect the changes.

Note, that merging this PR, will redeploy most of the hubs. This shouldn't be disruptive, as the hub usernames would remain the same, and the same providers will be used.

The only notable difference for the users would be that instead of choosing their authorization provider from an Auth0 login screen, they will be presented with the CILogon one.

Things will break only if there are OAuthenticator miscofigurations (hopefully I didn't miss anything 🤞🏼 )

@damianavila
Copy link
Contributor

Note, that merging this PR, will redeploy most of the hubs. This shouldn't be disruptive, as the hub usernames would remain the same, and the same providers will be used.

Let's discuss quickly in the sprint planning how/when we operationally deploy this one!

Copy link
Contributor

@consideRatio consideRatio left a comment

Choose a reason for hiding this comment

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

Wieee thanks for your thorough work on this!

This PR now switches from Auth0 to CILogon consistently, also when GitHubOAuthenticator could have been used. Do you suggest new hubs should go for CILogonOAuthenticator -> GitHub Auth, and/or migrating existing setups etc?

I think for now, this is a step in the right direction no matter what - so let's not think of that question as a blocker!

This LGTM but I made some comments that could be relevant to consider.

config/clusters/2i2c/dask-staging.values.yaml Show resolved Hide resolved
config/clusters/carbonplan/prod.values.yaml Outdated Show resolved Hide resolved
config/clusters/meom-ige/prod.values.yaml Outdated Show resolved Hide resolved
config/clusters/openscapes/prod.values.yaml Outdated Show resolved Hide resolved
deployer/hub.py Show resolved Hide resolved
docs/hub-deployment-guide/configure-auth/auth0.md Outdated Show resolved Hide resolved
@GeorgianaElena
Copy link
Member Author

Thank you very much for reviewing and approving this @consideRatio ❤️

This PR now switches from Auth0 to CILogon consistently, also when GitHubOAuthenticator could have been used. Do you suggest new hubs should go for CILogonOAuthenticator -> GitHub Auth, and/or migrating existing setups etc?

@consideRatio, I believe we should go for CILogonOAuthenticator by default, as it was the case for Auth0.
It is my understanding that existing setups that use the GitHubOAuthenticator direclty are the ones that needed GitHub team/org membership authorization.

And one of the strong points in favour of CILogon vs using OAuth specific authenticators (apart from being able to support loging in with multiple providers on the same hub) is that we can create and manage the oidc client apps programatically. This is not the case with GitHub for example, where we create the OAuth apps from the UI :/

Let's discuss quickly in the sprint planning how/when we operationally deploy this one!

@damianavila, I agree 👍🏼 I'll also share what I have in mind async to help me have the ideas in line:

Because our health check only checks spawning and not authentication, testing must happen manually I believe.
I was thinking that tomorrow, my morning I manually deploy the changes here, one cluster at a time, and manually check logging in on the hubs.

If everything works, I go for a merge.

@consideRatio
Copy link
Contributor

@GeorgianaElena
Copy link
Member Author

@GeorgianaElena I've opened a PR that needs to be merged before this one to avoid putting it in a inconsistent state, where the node pools doesn't match the profileList.

Thanks for the heads up @consideRatio! Now that the PRs you linked are merged, I believe this should be good to go, right?

I was thinking that tomorrow, my morning I manually deploy the changes here, one cluster at a time, and manually check logging in on the hubs.

This actually got posed to investigate #2302, but I'll start the manual deploy and testing today.

@consideRatio
Copy link
Contributor

Absolutely!

@GeorgianaElena
Copy link
Member Author

Manually deployed all hubs that had transitioned from auth0 to cilogon and verified that I can login and that I am an admin. Everything was fine 🎉

Will go for a merge.

@GeorgianaElena GeorgianaElena merged commit 20d389d into 2i2c-org:master Mar 21, 2023
@github-actions
Copy link

🎉🎉🎉🎉

Monitor the deployment of the hubs here 👉 https://github.com/2i2c-org/infrastructure/actions/runs/4479186946

@consideRatio
Copy link
Contributor

@GeorgianaElena wieeee nice work!!!!!!

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

Successfully merging this pull request may close these issues.

Simplify our authentication workflow by migrating all communities to CILogon authenticator and away from Auth0
3 participants