Commit Graph

5190 Commits

Author SHA1 Message Date
Bryan Frimin
bb2f55574f Rename shared packages for portal
Move helpers, emails, and coredata exports to
Compliance Portal names so frontend apps and
workers share one vocabulary.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:25 +02:00
Bryan Frimin
263ea61aba Rename CLI trust-center commands
Replace the trust-center command tree with
compliance-portal so the CLI matches the
product and GraphQL rename.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:25 +02:00
Bryan Frimin
8773a54396 Rename GraphQL APIs to compliance portal
Update console, visitor, MCP, and Slack API
surfaces so schemas and resolvers use the
Compliance Portal naming consistently.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:24 +02:00
Bryan Frimin
0f0f6643ad Rename backend services for portal
Point domain services, bootstrap, and related
packages at Compliance Portal types so callers
stop depending on the old Trust Center names.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:24 +02:00
Bryan Frimin
4bf3d4df79 Rename trust center coredata types
Align entity types, order fields, and visibility
enums with the Compliance Portal product name so
the data layer matches the rest of the rename.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:23 +02:00
Bryan Frimin
69a7c5fca7 Port data-request feature after main rebase
Main's new compliance-portal data-request pages (rights request
submission and listing) still referenced the sign-in dialog and
package names the earlier rebase's OAuth /initiate migration and
compliancepage -> complianceportal rename had already replaced.
Gate the "New Request" button behind OAuth like the rest of the
portal and point resolvers at the flattened visitor.Service methods.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:23 +02:00
Bryan Frimin
4b4e7ea1f8 Fix OAuth code exchange and go lint
Authorization-code exchange used ExternalClientID, which
is empty for registered clients and broke e2e token
grants. Pass the authenticated client's GID instead.

Also satisfy wsl_v5 blank-line rules, wire the delete
reference dialog through its mutation hook, and name the
filemanager logger.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:23 +02:00
Bryan Frimin
43ce3a7c53 Harden compliance portal auth and TLS
Align console references and OAuth branding with the
compliance-page model, and fix certificate cache eviction,
portal OAuth handlers, and magic-link edge cases left after
the trust-center rename.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:22 +02:00
Bryan Frimin
b03acbd029 Fix step-ca root CA access on Linux CI
Host chmod cannot open 0700 dirs owned by UID 1000, so
`-f` never sees root_ca.crt. Chmod from inside the
container as root while waiting for the cert.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:22 +02:00
Bryan Frimin
cb1d7c274b Unblock CI generate, test, and e2e
Generate MCP types before complianceportal, stub apps/trust
dist for embed, fix domains section indent, and start the
compose stack only after bin/probod is built.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:22 +02:00
Bryan Frimin
17d877a8bd Fix CI for compliance portal rename
Workflows still stubbed apps/trust/dist after the rename, so
go:embed and frontend builds failed. Also make step-ca writable
on Linux CI and fix domains section indent lint.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:22 +02:00
Bryan Frimin
caeb6d9225 Resolve custom domain SSL via certificate
Replace flattened SSL fields with a certificate
relation loaded through certmanager, and resolve
domain slots from IDs already on the trust center
instead of reloading the compliance page.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:21 +02:00
Bryan Frimin
bc128ec516 Port trust center features after main rebase
Move Emile's commitment CRUD into complianceportal management,
wire console and visitor GraphQL, and drop portal magic-link
sign-in in favor of OAuth /initiate while keeping documents,
NDA/full-name gates, and access-request resume markers.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:21 +02:00
Bryan Frimin
b221b17d1e Remove unused visitor portal helpers
Brand and public file serving replaced the old org/portal
logo and report URL generators, leaving dead methods and
unused Service fields behind.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:20 +02:00
Bryan Frimin
7e0d187dcf Flatten compliance portal package layout
Remove the root complianceportal package and the resolver
facade that existed only to break an IAM import cycle. Admin
policies, domain URL helpers, and actions live under
management; visitor OAuth metadata, brand URLs, and public
read paths live under visitor. Drop the duplicate trust API
magic-link mutations now that Connect handles portal auth, and
stop IAM from owning compliance page email branding.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:20 +02:00
Bryan Frimin
4cec74c1a1 Limit TLS cache warming to live domains
After the certificates split, WarmCache loaded every ACTIVE
certificate. Org deletes cascade-remove custom_domains but leave
certificates behind, so orphans could regain a usable SNI cache
entry on rebuild. Warm and serve only certs still referenced by a
domain, and purge unreferenced cache rows.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:20 +02:00
Bryan Frimin
e7df6f6b2a Restrict OAuth client branding URLs to http(s)
CIMD and registration accepted any URI scheme for client_uri and
logo_uri, so allowlisted metadata could surface javascript: links on
sign-in. Validate absolute http/https at ingest and only expose those
schemes in branding.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:19 +02:00
Bryan Frimin
6da00604ed Address remaining compliance portal review nits
Fill in certificate renewal processing, preserve OAuth and JWKS
edge cases, embed the compliance-portal app in production builds,
and close the smaller portal routing and n8n update gaps.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:19 +02:00
Bryan Frimin
bc78f08334 Harden compliance portal data migrations
Mint certificate and domain GIDs with generate_gid, preserve
org profile and domain rows that lack a trust center, and skip
managed default-domain backfill when no base domain is set.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:19 +02:00
Bryan Frimin
89f999d55c Restore TrustCenter reference hooks in console
Keep GraphQL-aligned TrustCenterReferenceGraph naming, drop the
unused domain redirect route, and tighten related compliance
page UI review nits around magic-link navigation and links.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:18 +02:00
Bryan Frimin
802a36bbf4 Rename visitor import and management wiring
Drop the misleading trust alias for complianceportal/visitor
and rename the CustomDomain config field to Management so
service wiring matches the package it points at.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:18 +02:00
Bryan Frimin
36bc636a08 Unify console sign-in for connect authorize
Remove the separate portal login page, show OAuth client branding on
sign-in, and preserve authorize continue URLs across auth methods.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:18 +02:00
Bryan Frimin
5133b5feeb Route connect OAuth through unified sign-in
Drop the portal-login redirect, accept continue URLs for magic links,
brand emails from the OAuth client when present, and update e2e coverage.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:17 +02:00
Bryan Frimin
d447fa295f Add OAuth client branding for trust centers
Serve CIMD logos from dedicated endpoints, expose client metadata
branding through GraphQL, and resolve branding from OAuth clients.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:17 +02:00
Bryan Frimin
01acda1d84 Extract public file serving into filemanager
Move range, ETag, and cache handling out of the files API handler
so brand logos and other public assets can reuse the same code path.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:17 +02:00
Bryan Frimin
48dba254ca Verify OAuth2 ID tokens before trusting claims
The compliance portal OAuth callback accepted ID tokens after only
parsing claims, without checking the signature, issuer, audience, or
expiry. Add RS256 verification helpers to the JOSE package, enforce
those checks in ParseIDTokenIdentity, and thread JWKS, issuer, and
client ID through the token response and callback handler.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:16 +02:00
Bryan Frimin
4e73bd6a97 Allow loopback fetches in portal OAuth initiate
Compliance portal OAuth must call the configured Probo base URL
during connect flows; in local dev that endpoint is loopback and
was blocked by default SSRF protection on the initiate HTTP client.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:16 +02:00
Bryan Frimin
9f57310ceb Point e2e and CI at step-ca trust center
Update generated test config, loopback HTTPS client, and workflow
root CA wiring for the step-ca ACME directory and port-443 trust
center listener introduced by the new compose stack.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:16 +02:00
Bryan Frimin
14604a3176 Replace Pebble with step-ca for local ACME
Pebble skipped real HTTP-01 validation, which hid integration gaps
for compliance-page custom domains. step-ca with a Caddy port-80
proxy exercises the same path production uses while keeping issued
certs persistent across compose restarts.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:15 +02:00
Bryan Frimin
e83f9e3a2e Update build targets for compliance portal app
Add the complianceportal Go embed target, wire it into CI and
release workflows, and document the new build entry point.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:15 +02:00
Bryan Frimin
de203325d2 Add trust center OAuth connect e2e coverage
Extend test helpers for portal OAuth flows and cover connect,
callback, and NDA signing against the compliance portal API.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:15 +02:00
Bryan Frimin
27e012e47a Point compliance portal frontend at portal OAuth API
Update Relay schema paths and HTTP endpoints so the portal app
talks to the compliance portal GraphQL and OAuth routes.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:14 +02:00
Bryan Frimin
ee3ce94a73 Add console portal login and magic-link error pages
Surface dedicated routes when a portal magic link is expired or
already used, and add the portal login entry point in console.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:14 +02:00
Bryan Frimin
2fd0fbe3d7 Replace trust magic-link flow with OAuth connect
Redirect visitors through the compliance portal OAuth initiate
endpoint and remove the verify-magic-link page and routes.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:14 +02:00
Bryan Frimin
b73780f818 Rewire server and probod for compliance portal API
Mount the compliance portal mux on trust center hosts, drop the
legacy trust web server, and share response header helpers.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:13 +02:00
Bryan Frimin
c4a30e3b95 Update auth service for portal OAuth logins
Create IAM sessions from OAuth callbacks with the portal hostname
and consent data needed by the compliance portal API.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:13 +02:00
Bryan Frimin
33fa473411 Add connect OAuth metadata and update OIDC handlers
Expose per-portal OAuth client metadata from connect and route OIDC
authorization through compliance portal session state.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:13 +02:00
Bryan Frimin
31157ff2e3 Move trust GraphQL API under complianceportal v1
Relocate the public trust center GraphQL surface, OAuth handlers,
and SPA serving into the compliance portal API package and remove
the legacy trust v1 server tree.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:12 +02:00
Bryan Frimin
5b3c33831f Remove session transfer authentication
Drop the one-time session handoff flow now that trust center
visitors authenticate through OAuth against the compliance portal.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:12 +02:00
Bryan Frimin
27dc61ef82 Add compliance portal visitor OAuth service
Handle OAuth initiation, callback exchange, and session creation
for anonymous trust center visitors through the portal package.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:12 +02:00
Bryan Frimin
fa0ae32232 Store OAuth consent data on IAM sessions
Persist portal hostname and OAuth state on session records so the
callback can bind an authorization code to the correct trust center.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:11 +02:00
Bryan Frimin
b836c6fde8 Add compliance portal CIMD metadata helpers
Build and validate client metadata documents for trust center
hostnames so OAuth initiation can publish the correct redirect URIs.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:11 +02:00
Bryan Frimin
6d5217ae6e Extend OAuth2 CIMD for compliance portal clients
Teach CIMD registration and discovery about per-portal client
metadata, and carry portal context through token and ID token
issuance for downstream session creation.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:11 +02:00
Bryan Frimin
ec91106063 Add COMPLIANCE_PORTAL OIDC provider type
Register the new provider enum value so compliance portal OAuth
clients can be stored and resolved like other IAM OIDC providers.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:10 +02:00
Bryan Frimin
ba53c94bdc Move trust center profile onto the page
Store website, email, and headquarters on the trust center so
public and admin surfaces read branding from one place. Drop the
trust API organization type and wire console, MCP, CLI, and apps
through the updated schema.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:10 +02:00
Bryan Frimin
ec80798243 Update public apps for dedicated host routing
Stop relying on the /trust/{id} path prefix in the public trust app and
serve it from the host root, reading contact and profile data from the
trust center instead of the organization. Mirror the same fragment
ownership change in the compliance portal hero.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:10 +02:00
Bryan Frimin
de367f032f Restructure console brand and overview pages
Decompose the brand page into profile, domains, visual identity, and
custom link sections, and move frameworks and the NDA card onto the
overview page as dedicated fragment components. Remove the standalone
domain page and redirect its route to brand, where domains now live.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:09 +02:00
Bryan Frimin
db24d17455 Add console useMutation and rename compliance graphs
Introduce the app-bound useMutation primitive and rename the trust center
graph and reference hooks to compliance page, moving the shared reference
dialogs alongside them. Sweep the compliance page subpages onto the new
mutation hook and the compliance-portal permission strings, and strip the
profile fields from the organization settings form.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:09 +02:00
Bryan Frimin
ebe6192a0c Update e2e tests and n8n node for the portal
Follow the new domain model in tests: drop organization profile
assertions, add a trust center profile test, and hit the dedicated HTTPS
listener with SNI for the visitor API. Mirror the custom link rename and
profile field moves in the n8n node operations.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:09 +02:00
Bryan Frimin
ce1b64b529 Update GraphQL, MCP, and CLI for the portal
Rewire the console and visitor resolvers onto the management and visitor
services with compliance-portal authorization. Rename the GraphQL and MCP
ComplianceExternalURL type to ComplianceCustomLink, expose trust center
profile fields, default and custom domains, public URL, and the managed
flag, and drop the profile fields from the organization surface.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:08 +02:00