Signup fixes, Lakehouse sidebar link, and CI login fix - #258
Merged
Merged
Conversation
The frontend availability check compared availablename to username.toLowerCase(), so a username like "John" passed validation but was then rejected by auth2 for the uppercase letter. Inputs with characters auth2 strips (dots, hyphens, etc.) failed with a misleading "Username is not available" message. Mirror the kbase/auth2 NewUserName rules on the form: must start with a lowercase letter, only [a-z0-9_], no repeating or trailing underscores, at most 100 chars. Show a specific error for format violations and only treat availability mismatches as collisions.
The CDM nav item was gated on CDM_JUPYTERHUB_ADMIN, so only admins saw the link. Per the BERDL platform docs, BERDL_USER is the role that gates access to the lakehouse; CDM_JUPYTERHUB_ADMIN is a separate admin role for approving access requests.
ORCID's provider-supplied username is the numeric ORCID iD (e.g. 0000-0002-1825-0097). auth2's NewUserName.sanitizeName strips all of that to empty and getAvailableUserName falls back to user<N>, so every ORCID signup landed on the form with user1 (or user2, ...) already in the username field. Leave the username blank when the provider is OrcID so the user picks their own. Display name and email pre-fill are unchanged.
The link goes to hub.berdl.kbase.us, the BERDL JupyterHub. Rename the nav label, route, component, deploy config key, and build env var to match. The CI hub's login page (kbase/cdm-jupyterhub) still links to /cdm/redirect, so that path redirects to the new route.
kbase/.github#70 (2026-04-10) removed the kbase-bot GHCR_TOKEN from the org and moved the shared build-push workflow to github.token. This repo's local copy of that workflow still used the secret, so every build since has failed at the login step before lint, tests, or the image build ran.
Lakehouse is the user-facing name for hub.berdl.kbase.us. Rename the nav label, route, component, deploy config key, and build env var to match; /cdm/redirect still redirects to the new route.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three small fixes around signup, the Lakehouse sidebar link, and a CI fix.
kbase/auth2NewUserNamerules on the signup form: must start with a lowercase letter, only[a-z0-9_], no repeating or trailing underscores, ≤100 chars. The availability check previously comparedavailablenametousername.toLowerCase(), so inputs likeJohnpassed the frontend check and were then rejected by the backend. Special-character inputs (John.Doe,bad-user, …) reported "Username is not available — Suggested: X" which was actually a format problem, not a collision. Now the form shows a specific format error and submit stays blocked until the input matches the backend rules.user<N>pre-fill on ORCID signup: ORCID's provider-supplied username is the numeric ORCID iD (e.g.0000-0002-1825-0097). auth2'sNewUserName.sanitizeNamestrips all of that to empty andgetAvailableUserNamefalls back to the literaluser<N>(seeAuthentication.java:1185-1196andDEFAULT_SUGGESTED_USER_NAME). The signup form was pre-populating the username field withuser1/user2/etc. for every ORCID signup. Leave the field blank when the provider isOrcIDso the user picks their own. Display name and email pre-fill from ORCID are unchanged.CDM_JUPYTERHUB_ADMIN(admin only). The hub gates login on itsAPPROVED_ROLESlist, which every BERDL repo and the spark_notebook user guide set toBERDL_USER;CDM_JUPYTERHUB_ADMINremains the separate approver role. Switch the gate so users withBERDL_USERsee the link. The KIND*AI routing roles (KBASE_STAFF,BERDL_KIND_USER) only pick the post-login landing page and are not used here./lakehouse/redirect), component (LakehouseRedirect), deploy config key (lakehouse_domain), and build env var (REACT_APP_KBASE_LAKEHOUSE_DOMAIN). The CI hub's login page (kbase/cdm-jupyterhubtemplates/login.html) still links to/cdm/redirect, so that path redirects to the new route.GHCR_TOKENfrom the org and moved the shared build-push workflow togithub.token. This repo's local copy of that workflow still used the secret, so every PR build since then failed at "Login to GHCR" before lint, tests, or the image build ran. Switch togithub.actor/github.tokenwithpackages: write, matching the org workflow.Test plan
Signup username validation
John) — submit stays blocked, format error shown.bad-user,bad__user,baduser_,1baduser— submit stays blocked with format error.testuser) — submit proceeds to step 3.>100 chars shows the "must be at most 100 characters" error.ORCID signup pre-fill
user1).availablename.Lakehouse sidebar link
BERDL_USERbut no admin role — Lakehouse link visible in sidebar.BERDL_USER— Lakehouse link not visible./lakehouse/redirectand then the hub./cdm/redirectlands on/lakehouse/redirect.CI
Unit tests
npm run lint:strict,CI=true npm test .(302 tests),npm run build— all exit 0 under Node 20.11.1.