IS-11630 DevOps Dashboard 2: Backstage app shell with Curity sign-in (M1) - #277
Open
aleixsuau wants to merge 6 commits into
Open
Conversation
aleixsuau
changed the base branch from
dev
to
feature/dev/IS-11630-backstage-app-scaffold
August 4, 2026 11:58
aleixsuau
requested review from
luisgoncalves,
urre and
vahag-curity
and
a lite review from Copilot
August 5, 2026 10:49
aleixsuau
marked this pull request as ready for review
August 5, 2026 10:50
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Curity (OIDC) authentication to the DevOps Dashboard 2 Backstage host app, including a shared provider-id constant for consistent wiring between frontend, backend, and config.
Changes:
- Introduces a
packages/commonworkspace package to shareCURITY_AUTH_PROVIDER_IDacross app/backend. - Adds a frontend auth module that registers an OAuth2-based
curityAuthApiRefand replaces the app root sign-in page. - Adds a backend OIDC auth provider module with a custom
sub-based sign-in resolver, plus corresponding config/dev-start wiring.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/devops-dashboard-backstage-app/packages/common/src/index.ts | Adds shared Curity auth provider id constant. |
| src/devops-dashboard-backstage-app/packages/common/package.json | Defines the new common workspace package. |
| src/devops-dashboard-backstage-app/packages/backend/src/modules/curityOidcAuthProvider.ts | Registers OIDC provider and custom sub-based sign-in resolver. |
| src/devops-dashboard-backstage-app/packages/backend/src/index.ts | Wires the new Curity OIDC backend module into the backend. |
| src/devops-dashboard-backstage-app/packages/backend/package.json | Adds OIDC backend module dependency and workspace dependency on common. |
| src/devops-dashboard-backstage-app/packages/app/src/modules/auth/signInPage.tsx | Adds Curity-gated sign-in page extension. |
| src/devops-dashboard-backstage-app/packages/app/src/modules/auth/curityAuthApi.ts | Adds curityAuthApiRef and registers OAuth2 client implementation. |
| src/devops-dashboard-backstage-app/packages/app/src/modules/auth/authModule.ts | Bundles auth extensions into a frontend module mounted on app. |
| src/devops-dashboard-backstage-app/packages/app/src/modules/auth/index.ts | Barrels exports for the auth module/APIs. |
| src/devops-dashboard-backstage-app/packages/app/src/App.tsx | Mounts the auth module as an app feature. |
| src/devops-dashboard-backstage-app/packages/app/package.json | Adds workspace dependency on common. |
| src/devops-dashboard-backstage-app/package.json | Adjusts start script to run with insecure TLS (dev convenience). |
| src/devops-dashboard-backstage-app/dev-secrets.patch | Adds a patch to generate gitignored local dev secrets config. |
| src/devops-dashboard-backstage-app/app-config.yaml | Adds auth session + OIDC provider configuration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
8
to
12
| "scripts": { | ||
| "start": "backstage-cli repo start", | ||
| "start": "NODE_TLS_REJECT_UNAUTHORIZED=0 backstage-cli repo start", | ||
| "build:backend": "yarn workspace backend build", | ||
| "build:all": "backstage-cli repo build --all", | ||
| "build-image": "yarn workspace backend build-image", |
Comment on lines
+6
to
+7
| "main": "src/index.ts", | ||
| "types": "src/index.ts", |
| clientId: devops_dashboard_backstage | ||
| # Dev value comes from the gitignored app-config.local.yaml (see dev-secrets.patch) | ||
| clientSecret: ${CURITY_BACKSTAGE_CLIENT_SECRET} | ||
| # openid/profile/email are requested by default; add the admin API scope |
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.
Jira: https://curity.atlassian.net/browse/IS-11630
DevOps Dashboard 2 — Curity sign-in for the Backstage app (M1)
Adds Curity authentication to the Backstage host app: users sign in through the local Curity Identity Server, and plugins can obtain an admin-api access token via
curityAuthApiRef. This is the seam the DB-clients plugin (M2–M4) builds on.📚 Backstage concepts used here
packages/app(React SPA) +packages/backend(Node); they communicate only over HTTP. Shared code needs a third, environment-neutral package (packages/common).ApiRef(a DI token — here,curityAuthApiRef). Consumers calluseApi(ref); other factories can depend on it viadeps. Registration happens through extensions bundled in a module (createFrontendModule) and mounted viacreateApp({ features })./api/auth/<providerId>/*. The frontend uses Backstage's stockOAuth2client to drive them; the provider id (oidc) links frontend, backend, and theauth.providers.<id>config key — kept in one constant (packages/common).SignInPageBlueprint).🧭 What each side does
Frontend —
packages/app/src/modules/auth/curityAuthApi.ts— declarescurityAuthApiRef(the DI token plugins use to inject the auth service and callgetAccessToken(['urn:se:curity:scopes:admin:api'])) and registers Backstage'sOAuth2client as its implementation, bound to theoidcprovider.signInPage.tsx— sign-in gate (auto: silent sign-in when a session exists, button otherwise).authModule.ts/index.ts— module assembly + barrel.Backend —
packages/backend/src/modules/curityOidcAuthProvider.tsoidcprovider using Backstage's stock OIDC authenticator (configured fromauth.providers.oidc.development: Curity issuer, client, scopes).sub, without requiring an email claim or a catalog User entity. ThetestAuth-janedoeauthenticator just asserts the username, it needs no password, which makes dev sign-in (and any future automated test) zero-interaction.Shared —
packages/common/CURITY_AUTH_PROVIDER_ID— the provider id used by both sides; app/backend packages must not import each other.Also:
app-config.yaml(provider config + requiredauth.session.secret), one-line wiring inApp.tsx/ backendindex.ts, and the rootstartscript (see shortcuts below).🧪 How to test
1. Curity dev server (identity-server repo; runs in the foreground and streams the server/request logs to this terminal — keep it open):
2. Register the Backstage OAuth client:
3. Create the local dev config (from the ui-kit repo root):
4. Run the app (
ui-kit/src/devops-dashboard-backstage-app):yarn install && yarn startFrontend
http://localhost:3000, backend:7007.5. Verify:
testAuth-janedoeauthenticator completes it without a login form.janedoe.GET /api/auth/oidc/refresh?...(devtools → Network) returns the session with the admin-api scope granted.NODE_TLS_REJECT_UNAUTHORIZED=0in the rootstartscript — the backend fetches the dev server's self-signed OIDC metadata.app-config.local.yaml, created bydev-secrets.patch; the committed config holds only${VAR}references.🔭 Next (epic milestones)
M2 Apollo GraphQL foundation → M3 DB-clients list → M4 detail view.