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

Grant access for 2i2c members only via admin_users #3233

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions config/clusters/2i2c-aws-us/dask-staging.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,3 @@ basehub:
authenticator_class: "github"
GitHubOAuthenticator:
oauth_callback_url: "https://dask-staging.aws.2i2c.cloud/hub/oauth_callback"
allowed_organizations:
- 2i2c-org
scope:
- read:org
1 change: 0 additions & 1 deletion config/clusters/2i2c-aws-us/go-bgc.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jupyterhub:
GitHubOAuthenticator:
oauth_callback_url: https://go-bgc.2i2c.cloud/hub/oauth_callback
allowed_organizations:
- 2i2c-org:hub-access-for-2i2c-staff
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing ourselves from allowed_organization is fine, because we are added to admin_users.

Doing this also isn't influencing the filtering of profile_list entries using our basehub injected allowed_teams config.

- go-bgc
scope:
- read:org
Expand Down
1 change: 0 additions & 1 deletion config/clusters/2i2c-aws-us/itcoocean.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jupyterhub:
GitHubOAuthenticator:
oauth_callback_url: https://itcoocean.2i2c.cloud/hub/oauth_callback
allowed_organizations:
- 2i2c-org:hub-access-for-2i2c-staff
- Hackweek-ITCOocean:itcoocean-hackweek-2023
scope:
- read:org
Expand Down
1 change: 0 additions & 1 deletion config/clusters/2i2c-aws-us/ncar-cisl.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ basehub:
GitHubOAuthenticator:
oauth_callback_url: https://ncar-cisl.2i2c.cloud/hub/oauth_callback
allowed_organizations:
- 2i2c-org
- NCAR:2i2c-cloud-users
scope:
- read:org
Expand Down
1 change: 0 additions & 1 deletion config/clusters/2i2c-aws-us/researchdelight.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ basehub:
GitHubOAuthenticator:
populate_teams_in_auth_state: true
allowed_organizations:
- 2i2c-org:hub-access-for-2i2c-staff
- 2i2c-org:research-delight-team
scope:
- read:org
Expand Down
4 changes: 0 additions & 4 deletions config/clusters/2i2c-aws-us/staging.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,3 @@ jupyterhub:
authenticator_class: "github"
GitHubOAuthenticator:
oauth_callback_url: "https://staging.aws.2i2c.cloud/hub/oauth_callback"
allowed_organizations:
- 2i2c-org
scope:
- read:org
1 change: 0 additions & 1 deletion config/clusters/2i2c-uk/lis.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ jupyterhub:
GitHubOAuthenticator:
oauth_callback_url: "https://ds.lis.2i2c.cloud/hub/oauth_callback"
allowed_organizations:
- 2i2c-org
- lisacuk
scope:
- read:org
Expand Down
2 changes: 0 additions & 2 deletions config/clusters/2i2c-uk/staging.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,3 @@ jupyterhub:
http://google.com/accounts/o8/id:
username_derivation:
username_claim: "email"
allowed_domains:
- "2i2c.org"
Comment on lines -46 to -47
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing ourselves from a CILogonOAuthenticator allowed_domains is also fine, we are allowed by being added to admin_users.

5 changes: 1 addition & 4 deletions config/clusters/2i2c/binder-staging.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,14 @@ binderhub:
http://google.com/accounts/o8/id:
username_derivation:
username_claim: "email"
allowed_domains:
- "2i2c.org"
Authenticator:
admin_users:
- choldgraf@2i2c.org
- colliand@2i2c.org
- erik@2i2c.org
- damianavila@2i2c.org
- erik@2i2c.org
- georgianaelena@2i2c.org
- jmunroe@2i2c.org
- pnasrat@2i2c.org
- sgibson@2i2c.org
- yuvipanda@2i2c.org
singleuser:
Expand Down
1 change: 0 additions & 1 deletion config/clusters/2i2c/climatematch.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ jupyterhub:
GitHubOAuthenticator:
oauth_callback_url: https://climatematch.2i2c.cloud/hub/oauth_callback
allowed_organizations:
- 2i2c-org
- ClimateMatchAcademy:2023students
scope:
- read:org
Expand Down
2 changes: 0 additions & 2 deletions config/clusters/2i2c/dask-staging.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,3 @@ basehub:
http://google.com/accounts/o8/id:
username_derivation:
username_claim: "email"
allowed_domains:
- "2i2c.org"
3 changes: 1 addition & 2 deletions config/clusters/2i2c/demo.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,4 @@ jupyterhub:
username_derivation:
username_claim: "email"
allowed_domains:
- "2i2c.org"
- "rmbl.org"
- rmbl.org
2 changes: 0 additions & 2 deletions config/clusters/2i2c/imagebuilding-demo.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,9 @@ jupyterhub:
GitHubOAuthenticator:
oauth_callback_url: https://imagebuilding-demo.2i2c.cloud/hub/oauth_callback
allowed_organizations:
- 2i2c-org:hub-access-for-2i2c-staff
- 2i2c-imagebuilding-hub-access
- veda-analytics-access:all-users
- veda-analytics-access:collaborator-access
- 2i2c-org:hub-access-for-2i2c-staff
- CYGNSS-VEDA:cygnss-iwg
scope:
- read:org
Expand Down
10 changes: 4 additions & 6 deletions config/clusters/2i2c/mtu.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,16 @@ jupyterhub:
CILogonOAuthenticator:
oauth_callback_url: "https://mtu.2i2c.cloud/hub/oauth_callback"
allowed_idps:
# Allow 2i2c staff to login with Google
http://google.com/accounts/o8/id:
username_derivation:
username_claim: "email"
allowed_domains:
- "2i2c.org"
# Allow MTU to login via Shibboleth
https://sso.mtu.edu/idp/shibboleth:
username_derivation:
username_claim: "email"
allowed_domains:
- "mtu.edu"
# Allow 2i2c staff to login with Google accounts
http://google.com/accounts/o8/id:
username_derivation:
username_claim: "email"
Comment on lines -39 to +48
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was a re-ordering of config entries. I want us to put the user-facing idp's first as a way to prepare for letting that lead to presenting that option by default in favor of presenting the option only relevant to us admin first.

For more details about this, see jupyterhub/oauthenticator#690

Authenticator:
admin_users:
- "dbkc@mtu.edu"
Expand Down
1 change: 0 additions & 1 deletion config/clusters/2i2c/ohw.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ basehub:
GitHubOAuthenticator:
oauth_callback_url: https://oceanhackweek.2i2c.cloud/hub/oauth_callback
allowed_organizations:
- 2i2c-org:hub-access-for-2i2c-staff
- oceanhackweek:ohw23-organizers
- oceanhackweek:ohw23-participants-australia
- oceanhackweek:ohw23-participants-seattle
Expand Down
2 changes: 0 additions & 2 deletions config/clusters/2i2c/staging.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,3 @@ jupyterhub:
http://google.com/accounts/o8/id:
username_derivation:
username_claim: "email"
allowed_domains:
- "2i2c.org"
2 changes: 0 additions & 2 deletions config/clusters/2i2c/temple.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ jupyterhub:
http://google.com/accounts/o8/id:
username_derivation:
username_claim: "email"
allowed_domains:
- "2i2c.org"
Authenticator:
admin_users:
- jmsmith1@temple.edu
2 changes: 0 additions & 2 deletions config/clusters/2i2c/ucmerced-common.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ jupyterhub:
http://google.com/accounts/o8/id:
username_derivation:
username_claim: "email"
allowed_domains:
- "2i2c.org"
Authenticator:
admin_users:
- schadalapaka@ucmerced.edu
1 change: 0 additions & 1 deletion config/clusters/awi-ciroh/common.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ basehub:
authenticator_class: github
GitHubOAuthenticator:
allowed_organizations:
- 2i2c-org
- alabamawaterinstitute
- NOAA-OWP
scope:
Expand Down
3 changes: 3 additions & 0 deletions config/clusters/callysto/common.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jupyterhub:
enabled: true
custom:
2i2c:
# add_staff_user_ids_to_admin_users is disabled because the usernames
# aren't github id or email based, individual 2i2c members have added
# their user to admin_users manually instead.
add_staff_user_ids_to_admin_users: false
# add_staff_user_ids_of_type: "google"
Comment on lines +22 to 26
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this hub where we aren't added to admin_users, it remains important to not remove allowing us via allowed_domains.

homepage:
Expand Down
1 change: 0 additions & 1 deletion config/clusters/catalystproject-africa/staging.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jupyterhub:
GitHubOAuthenticator:
oauth_callback_url: https://staging.af.catalystproject.2i2c.cloud/hub/oauth_callback
allowed_organizations:
- 2i2c-org:hub-access-for-2i2c-staff
- czi-catalystproject
scope:
- read:org
Expand Down
1 change: 0 additions & 1 deletion config/clusters/catalystproject-latam/staging.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jupyterhub:
GitHubOAuthenticator:
oauth_callback_url: https://staging.latam.catalystproject.2i2c.cloud/hub/oauth_callback
allowed_organizations:
- 2i2c-org:hub-access-for-2i2c-staff
- czi-catalystproject
scope:
- read:org
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@ jupyterhub:
username_derivation:
username_claim: "email"
allowed_domains:
- "2i2c.org"
- "unc.edu.ar"
- "mi.unc.edu.ar"
- "famaf.unc.edu.ar"
- unc.edu.ar
- mi.unc.edu.ar
- famaf.unc.edu.ar
Authenticator:
admin_users:
- aquevedo@unc.edu.ar
Expand Down
1 change: 0 additions & 1 deletion config/clusters/leap/common.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ basehub:
allowed_organizations:
- leap-stc:leap-pangeo-base-access
- leap-stc:leap-pangeo-full-access
- 2i2c-org:hub-access-for-2i2c-staff
scope:
- read:org
Authenticator:
Expand Down
1 change: 0 additions & 1 deletion config/clusters/linked-earth/common.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ basehub:
authenticator_class: github
GitHubOAuthenticator:
allowed_organizations:
- 2i2c-org
- LinkedEarth
scope:
- read:org
Expand Down
1 change: 0 additions & 1 deletion config/clusters/m2lines/common.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ basehub:
GitHubOAuthenticator:
allowed_organizations:
- m2lines
- 2i2c-org:hub-access-for-2i2c-staff
scope:
- read:org
Authenticator:
Expand Down
1 change: 0 additions & 1 deletion config/clusters/meom-ige/common.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ basehub:
GitHubOAuthenticator:
populate_teams_in_auth_state: true
allowed_organizations:
- 2i2c-org:hub-access-for-2i2c-staff
- meom-group:hub-users # long term users
- demo-dask-grenoble2023:demo # temporary users for event
scope:
Expand Down
1 change: 0 additions & 1 deletion config/clusters/nasa-cryo/common.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ basehub:
# so need to populate the teams in the auth state
populate_teams_in_auth_state: true
allowed_organizations:
- 2i2c-org:hub-access-for-2i2c-staff
- CryoInTheCloud:cryoclouduser
- CryoInTheCloud:cryocloudadvanced
scope:
Expand Down
1 change: 0 additions & 1 deletion config/clusters/nasa-ghg/common.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ basehub:
authenticator_class: github
GitHubOAuthenticator:
allowed_organizations:
- 2i2c-org:hub-access-for-2i2c-staff
- US-GHG-Center:ghgc-hub-access
scope:
- read:org
Expand Down
1 change: 0 additions & 1 deletion config/clusters/nasa-veda/common.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ basehub:
allowed_organizations:
- veda-analytics-access:all-users
- veda-analytics-access:collaborator-access
- 2i2c-org:hub-access-for-2i2c-staff
- CYGNSS-VEDA:cygnss-iwg
scope:
- read:org
Expand Down
1 change: 0 additions & 1 deletion config/clusters/pangeo-hubs/common.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ basehub:
GitHubOAuthenticator:
allowed_organizations:
- pangeo-data:us-central1-b-gcp
- 2i2c-org:hub-access-for-2i2c-staff
scope:
- read:org
Authenticator:
Expand Down
1 change: 0 additions & 1 deletion config/clusters/qcl/common.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ jupyterhub:
authenticator_class: github
GitHubOAuthenticator:
allowed_organizations:
- 2i2c-org:hub-access-for-2i2c-staff
- QuantifiedCarbon:jupyterhub
scope:
- read:org
Expand Down
4 changes: 1 addition & 3 deletions config/clusters/smithsonian/common.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ basehub:
authenticator_class: github
GitHubOAuthenticator:
populate_teams_in_auth_state: true
allowed_organizations: &allowed_github_orgs
- 2i2c-org
allowed_organizations:
- smithsonian
- sidatasciencelab
- Smithsonian-SDCH
Expand Down Expand Up @@ -76,7 +75,6 @@ basehub:
description: &profile_list_description "Start a container with at least a chosen share of capacity on a node of this type"
slug: small
default: true
allowed_teams: *allowed_github_orgs
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Its better if we just allow all users by default instead, because otherwise we need to make a few extra API calls to check for membership etc for no real reason.

Since #3234 (comment), removing allowed_teams makes all users logged in to the hub be able to see this like we want.

profile_options:
image: &profile_options_image
display_name: Image
Expand Down
2 changes: 0 additions & 2 deletions config/clusters/ubc-eoas/common.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ jupyterhub:
http://google.com/accounts/o8/id:
username_derivation:
username_claim: email
allowed_domains:
- 2i2c.org
Authenticator:
admin_users:
- ckrzysik # Technical representative, Charles Krzysik
Expand Down
1 change: 0 additions & 1 deletion config/clusters/victor/common.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ basehub:
authenticator_class: github
GitHubOAuthenticator:
allowed_organizations:
- 2i2c-org:hub-access-for-2i2c-staff
- VICTOR-Community:victoraccess
scope:
- read:org
Expand Down
27 changes: 15 additions & 12 deletions docs/hub-deployment-guide/configure-auth/cilogon.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,27 +60,30 @@ To get the value of the key that must go in the `allowed_idp` dict for a specifi

```yaml
jupyterhub:
custom:
2i2c:
add_staff_user_ids_to_admin_users: true
add_staff_user_ids_of_type: google
hub:
config:
JupyterHub:
authenticator_class: cilogon
CILogonOAuthenticator:
oauth_callback_url: https://{{ HUB_DOMAIN }}/hub/oauth_callback
# Google and ANU's are configured as the hubs identity providers (idps)
allowed_idps:
http://google.com/accounts/o8/id:
username_derivation:
# Use the email as the hub username
username_claim: "email"
# Authorize any user with a @2i2c.org email in this idp
allowed_domains:
- "2i2c.org"
# Community specific idp - enables community members to authenticate.
# In this example, all authenticated users are authorized via the idp
# specific allow_all config.
https://idp2.anu.edu.au/idp/shibboleth:
username_derivation:
# Use the email as the hub username
username_claim: "email"
# Authorize all users in this idp
allow_all: true
username_claim: email
allow_all: true # authorize all users authenticated by the idp
# Google (or GitHub) idp - enables 2i2c admin users to authenticate.
# The basehub chart config "custom.2i2c.add_staff_user_ids..." expands
# admin_users to authorize specific 2i2c staff members.
http://google.com/accounts/o8/id:
username_derivation:
username_claim: email
Authenticator:
admin_users:
- admin@anu.edu.au
Expand Down
Loading