feat: [hca dcp] implement authorization code flow with azul for hca dcp dev (#4805)#4819
Merged
Merged
Conversation
…cp dev (#4805) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the HCA DCP managed-access dev site configuration to use Azul’s OAuth 2.0 authorization code flow (via /user/authorize), aligning with the existing AnVIL dev implementation and keeping other HCA environments on implicit flow.
Changes:
- Overrides
hca-dcp/ma-devauthentication to useOAUTH_FLOW.AUTHORIZATION_CODEand an Azul-derivedauthorizeURL. - Introduces
site-config/hca-dcp/ma-dev/authentication/{constants,authentication}.tsto encapsulate the auth override (providers/services) while inheriting the rest of the managed-access auth UI config.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| site-config/hca-dcp/ma-dev/config.ts | Applies an auth override for ma-dev after makeManagedAccessConfig, using config.dataSource.url as the single source of truth for the Azul base URL. |
| site-config/hca-dcp/ma-dev/authentication/constants.ts | Adds Google provider configuration for authorization-code flow and derives the Azul /user/authorize URL from dataSourceUrl; defines Terra service endpoints for dev. |
| site-config/hca-dcp/ma-dev/authentication/authentication.ts | Adds a helper to override inherited authentication config’s providers and services while preserving other inherited auth settings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…4805) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
NoopDog
approved these changes
May 11, 2026
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
Closes #4805.
hca-dcp/ma-devto the OAuth 2.0 authorization code flow against Azul's/user/authorizeendpoint, mirroring what was done for AnVIL in feat: implement authorization code flow with azul and data browser (#4793) #4796.site-config/hca-dcp/ma-dev/authentication/{constants,authentication}.ts.getAuthenticationConfigtakes the inherited auth config plusdataSourceUrland overridesproviders+services— same override pattern ashca-dcp/ma-prod.ma-dev'sconfig.tscalls the override aftermakeManagedAccessConfig, passingconfig.dataSource.urlso theauthorizeURL has a single source of truth (no hardcoded duplicate ofDATA_URL).authorizeURL is built withnew URL("/user/authorize", dataSourceUrl).hrefso it handlesdataSource.urlcarrying a trailing slash (which it currently does via${dataUrl}/inhca-dcp/dev/config.ts).CLIENT_IDis713613812354-aelk662bncv14d319dk8juce9p11um00.apps.googleusercontent.comper Hannes's comment on #4793 (confirmed by NoopDog here).dev/anvildevshould adopt this for now" guidance, other HCA envs (cc-ma-dev,dev,prod,ma-prod) stay onOAUTH_FLOW.IMPLICIT.Note for review:
cc-ma-devis also backed by the Azuldevinstance and could technically adopt the same flow, but per the ticket scope it's intentionally left on implicit for this PR. Happy to follow up ifcc-ma-devshould also be switched — needs confirmation that the new client ID hashttps://ma-pilot.explore.data.humancellatlas.dev.clevercanary.comon its allowed-origins list in Google Cloud Console.Test plan
Verified against HCA DCP dev (
ma-devbuild, locally againsthttps://service.dev.singlecell.gi.ucsc.edu):/user/authorizereturns{access_token, expires_in, id_token, scope, token_type}; profile loads (network trace confirmeduserinfo, profilev1,termsOfServiceDetailsall 200)npm run build-ma-dev:hca-dcpsucceeds