Commit Graph

74 Commits

Author SHA1 Message Date
Ludovic Vielle
e767dd8377 Add device enrollment API and agent protocol
Expose ITAM REST endpoints for agents, console GraphQL for device
management, and wire probod bootstrap with enrollment e2e coverage.

Signed-off-by: Ludovic Vielle <ludovic@probo.com>
2026-07-24 15:08:23 +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
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
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
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
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
a9a126899e Rewire IAM, mailman, and probod for the portal
Wire the certificate manager and trust center base domain into IAM so
organization creation provisions a managed default domain and certificate
atomically. Email presenters in IAM and mailman resolve public URLs
through the compliance portal resolver and read profile fields from the
trust center. probod initializes the certmanager service and injects the
new management and visitor services.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:44:08 +02:00
Sacha Al Himdani
4c57d201a4 Make license declarations consistently MIT
The source headers, LICENSE files, and license metadata had drifted
apart. Align the entire project to MIT:

- Convert every source-file header to the MIT text across all comment
  styles (Go, TS, TSX, JS, MJS, SQL, CSS, GraphQL, shell), including
  SPDX-License-Identifier tags
- Set the root and cookie-banner LICENSE files to the MIT text with a
  "MIT License" title line
- Switch the package.json license fields, Docker image label, and
  cookie-banner README to MIT
- Update docs and the genmodels header generator accordingly
- Normalize copyright lines to a single format
  (Copyright (c) <year(s)> Probo Inc <hello@probo.com>.): unify the
  hello@getprobo.com and hello@probo.inc emails to hello@probo.com and
  the comma-separated years to a hyphenated range

Genuine third-party references are intentionally left untouched: the
Lucide icon attributions (Lucide is ISC) and the trivy dependency
license allowlist.

Signed-off-by: Sacha Al Himdani <sacha@probo.com>
2026-07-13 16:21:14 +02:00
Bryan Frimin
bf255b198c Bound GraphQL request cost to prevent alias-flooding DoS
The GraphQL endpoint built its gqlgen server with bare handler.New and
no limits, so a single request with thousands of aliased resolver calls
was parsed, validated, executed, and marshalled in full. Under load this
let an unauthenticated client drive excessive CPU and memory use against
POST /api/connect/v1/graphql and the console and trust endpoints, which
share the same constructor (GHSA-prh2-g8pv-m7p9).

Add configurable guards in the shared gqlutils.NewHandler: a parser
token limit rejects oversized queries at lex time before any execution,
a fixed complexity limit caps field-selection count, an LRU query cache
avoids repeated parsing, and field suggestions are disabled. The limits
flow from a new APIConfig.GraphQL section through server and api config
into all three GraphQL handlers, with PROBOD_API_GRAPHQL_* env vars and
Helm values exposed for per-environment tuning.

Defaults are sized with generous headroom over real traffic: the parser
token limit (15000) and complexity limit (2000) sit far above the
largest legitimate frontend query yet well below the proof-of-concept
flood, so normal usage is unaffected while floods are rejected cheaply.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-06-30 14:10:41 +02:00
Bryan Frimin
9b0a5745a0 Add resourcealias application service
Introduce a standalone resourcealias package with its own service,
IAM policies, and OAuth2 scopes so alias management no longer lives
inside the trust center services. Remove the trust-center-specific
alias services from probo and trust, and wire the new service into
probod, the server, and the API layer.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-06-22 11:40:09 +02:00
Ludovic Vielle
3ebb221a9b Add OAuth2 API scope registration and enforcement
Register v1 API scopes in coredata, advertise them in OIDC discovery
and protected-resource metadata, show them on the consent screen, and
enforce scope-to-action mapping in the IAM Authorizer before policy
evaluation.

Signed-off-by: Ludovic Vielle <ludovic@probo.com>
2026-06-18 19:07:25 +02:00
Ludovic Vielle
b679107fa5 Migrate all callers to unified filemanager.Service
Signed-off-by: Ludovic Vielle <ludovic@probo.com>
2026-06-10 15:53:32 +02:00
Ludovic Vielle
c6c35a542e Wire file.Service into api.Config, delete pkg/filesign
Replace the FileSign field in api.Config and server.Config with File
(*file.Service). Pass the new file.Service and other required deps to
files_v1.NewMux. Remove the now-redundant filesign package. Update
the favicon URL path to /api/files/v1/public/ in server.go.

Signed-off-by: Ludovic Vielle <ludovic@probo.com>
2026-06-09 17:42:17 +02:00
Sacha Al Himdani
9ac71f948f Update contact email to hello@probo.com
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-06-09 16:45:23 +02:00
Bryan Frimin
3dfc833671 Replace supervisor with agentrun worker service
Move agent-run orchestration from the legacy supervisor path into the new
agentrun worker/service package and wire it through coredata, server,
policies, and GraphQL resolvers.

This consolidates run lifecycle handling around lease-aware workers and
aligns API surface with the new agent-run domain model so reviewers can
follow one coherent execution path.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-06-08 15:27:50 +02:00
Ludovic Vielle
9ea9769873 Fix lint issues from previous commit
Signed-off-by: Ludovic Vielle <ludovic@probo.com>
2026-06-03 10:51:35 +02:00
Ludovic Vielle
6c072a2f7b Use stable files API URLs for vendor logo fields
CommonThirdParty.logoUrl and TrustCenterReference.logoUrl were
returning expiring S3 presigned URLs, which break if cached or
shared past their TTL.

Replace with stable /api/files/v1/{id} application URLs.
file.Service now generates these via baseurl; a new filesign
package owns presigning for the files/v1 HTTP handler that
does the internal redirect.

Signed-off-by: Ludovic Vielle <ludovic@probo.com>
2026-06-03 10:30:29 +02:00
Aurélien Sibiril
e18ecdda8b Consolidate connector provider dispatch behind a typed *Registry
The console previously dispatched per-provider logic through a fan of
init()-side-effect maps (driver names, OAuth2 metadata, probe URLs,
display names, settings switches), spread across pkg/connector,
pkg/accessreview/drivers and the console v1 resolvers. Adding a new
provider required edits in every one of those places and a corresponding
switch arm in CreateConnectorRequest. The same per-provider knowledge
also leaked into Helm templates as hand-rolled environment-variable
blocks per connector.

This commit collapses the dispatch surface into a single typed
*provider.Registry. The registry is constructed once by
NewBuiltinRegistry at probod startup and threaded as an explicit
dependency into every consumer (accessreview service, console v1
resolver, OAuth2 wiring). There is no package-level state. Each
provider lives in one file under pkg/connector/provider/ that exposes
a private xxxRegistration() *Registration constructor; NewBuiltinRegistry
enumerates them.

CreateConnectorRequest loses its per-provider settings fields and
takes a single RawSettings json.RawMessage produced by the
per-provider MarshalSettings closure. The 1Password SCIM bridge URL
is validated at create time (http(s) scheme + non-empty host) so a
malformed value fails fast at the resolver boundary. The Helm chart
gains probo.connectorEnv and probo.connectorSecretEntries templates
so adding a connector requires zero Helm changes. Access-review name
resolution moves into the same Registration value to keep one
authoritative dispatch table.

Tests cover every Registration (DisplayName, NewDriver wired),
Register error paths (nil, empty Provider, empty DisplayName,
duplicate), All / ProviderDisplayName / ProviderOAuth2Scopes /
ProbeURL hit and miss paths, the ApplyOAuth2Defaults templating and
PKCE branches, and ConnectorSettings[T] round-trip plus malformed-JSON
error path. The pre-refactor ApplyProviderDefaults test in
pkg/connector is replaced by the equivalent in
pkg/connector/provider.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-05-27 00:34:39 +02:00
Émile Ré
9156d6a16a Add wsl linter and fix
Signed-off-by: Émile Ré <emile@probo.com>
2026-05-20 09:27:28 +04:00
Sacha Al Himdani
b9262b5150 Add risk assessment system
Introduce a hierarchical risk assessment model with six entity types:

- Risk Assessment: top-level container scoped to an organization
- Risk Assessment Scope: sub-container for scoping threat modeling
  exercises within an assessment
- Risk Assessment Node: DFD elements typed as ENTITY, BOUNDARY,
  ASSET, or DATA within a scope
- Risk Assessment Process: directed data flows between two nodes
- Risk Assessment Threat: descriptive threats attached to a process
  with a free-text category (e.g. Confidentiality, Integrity)
- Risk Scenario: thin join linking a threat to a risk from the
  register, carrying only a name and description

Risk scoring (likelihood, impact, treatment) remains on the existing
Risk entity. Threats are purely descriptive. Risk Scenarios connect
the threat model to the risk register without duplicating scores.

Backend: migration with PG enum for node types, coredata structs,
service layer with full CRUD and validation, GraphQL schema with
18 mutations and paginated connections, authorization actions and
policies, and base_resolvers.go Node dispatch for all entity types.

Frontend: Risk Assessments list page with create dialog, detail page
showing scopes as cards with nodes/processes/threats tables, inline
create/edit/delete actions on all entities, and a Scenarios tab on
the Risk detail page linking threats to risks. Existing RiskGraph.ts
hook file removed in favor of colocated queries in page files.

E2E tests cover CRUD for all entity types, RBAC, and tenant
isolation.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-05-19 21:44:27 +02:00
Émile Ré
7099a3d702 Replace vendor JSON with common third parties API
The CreateVendorDialog previously loaded the entire @probo/vendors
JSON bundle client-side and used MiniSearch for fuzzy search. This
replaces it with a GraphQL query against the common_third_parties
database table, searched server-side via ILIKE filtering.

Backend: adds CommonThirdParty GraphQL type, a pkg/thirdparty
service, and a commonThirdParties(name) root query. Frontend:
splits into CommonThirdPartyCombobox (display) and an @inline
fragment read on selection via readInlineData.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-12 16:43:36 +04:00
Émile Ré
d5394317bb Add geolocation-based privacy regulation detection to cookie banner
Resolve the visitor's IP to a country code via the geoloc service and
map it to the applicable privacy regulation (GDPR, UK GDPR, FADP, CCPA,
PIPEDA, LGPD, LFPDPPP, POPIA, PDPA, PIPL, PIPA, APPI, DPDP, PDPL).
The regulation and its implied consent mode (OPT_IN / OPT_OUT) are
injected into the GET /config response so the SDK can adapt its behavior.

Also makes geoloc.Service self-contained: LookupCountry and IsPopulated
now manage their own DB connections instead of requiring callers to pass
a pg.Querier.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-07 15:13:42 +04:00
Bryan Frimin
11770b4058 Add OAuth2/OpenID Connect authorization server
Implement a full OAuth2 2.0 and OpenID Connect 1.0 authorization
server with support for authorization code flow (with PKCE),
refresh token rotation, device authorization grant, dynamic
client registration, token introspection, and token revocation.

Includes database schema, coredata layer, service logic, HTTP
handlers, OIDC discovery endpoint, and JWKS publishing.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-04-19 12:00:53 +02:00
Émile Ré
36062310be Add cookie banner REST API with per-banner CORS middleware
Introduce /cookie-banner/v1/{bannerID}/config endpoint for the JS SDK.
The custom CORS middleware validates each request origin against the
specific banner being requested, preventing cross-customer leakage.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-15 10:20:59 +04:00
Aurélien Sibiril
244b6390cb Wire accessreview.Service into server and probod
Add AccessReview field to server.Config and api.Config,
pass through to console and MCP NewMux. Create the
service in probod and run its background workers.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-04-02 14:37:29 +02:00
Sacha Al Himdani
8c02c53315 Update copyright headers across all Go files
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-25 17:38:32 +01:00
Bryan Frimin
359f85f5da Add SEO controls and sitemap for compliance pages
Add search engine indexing toggle, robots.txt, and sitemap.xml
generation for compliance pages. Replace checkboxes with toggle
components in the compliance page UI and add an "Open" button
in the page header to quickly access the live compliance page.
The search engine indexing toggle is disabled when the compliance
page is inactive.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-24 15:55:31 +01:00
Bryan Frimin
f11eae6b82 Add /llms.txt endpoint to trust center compliance page
Renders compliance data (frameworks, documents, audits, subprocessors, references, and external links) as a plain-text Markdown document. The endpoint supports all required visibility filters and pagination.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-20 10:14:01 +01:00
Sacha Al Himdani
8ed6f1824f Fix unvalidated URL redirection in HTTP redirects
Use baseurl.Parse to construct the HTTPS redirect URL in the
trust center HTTP handler, breaking the taint chain from raw
request headers. Apply path.Clean to the slug-based redirect
in stripTrustPrefix to normalize path traversal sequences.

Addresses CodeQL go/unvalidated-url-redirection (CWE-601).

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-19 17:27:51 +01:00
Sacha Al Himdani
8b66a61990 Run go fix and go fmt
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-19 16:37:51 +01:00
Bryan Frimin
1e5f4012f0 Add dynamic favicon for trust center using file API
Use the trust center's logo as favicon via the public file API URL,
falling back to the default favicon when no logo is configured.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 09:32:37 +01:00
Bryan Frimin
751d9eb1f3 Add SSR for compliance page with dynamic title and meta tags
Implement server-side rendering of trust center page `<head>` with dynamic organization name and OG meta tags. Adds generic `FileRenderer` mechanism to statichandler for dynamic file rendering, allowing the trust server to inject templated content at request time.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 09:32:34 +01:00
Bryan Frimin
a5743729f7 Add file visibility (PRIVATE/PUBLIC) + public files API
Adds a visibility enum to files with PRIVATE (default) and PUBLIC states.
PUBLIC files are accessible via an unauthenticated /api/files/v1/{fileID}
endpoint that redirects to a presigned S3 URL. Introduces pkg/file service
to manage file operations. Logo uploads (trust centers, organizations,
frameworks, references) are marked PUBLIC; other files are PRIVATE.
Includes database migration and backfill for existing logos.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-18 19:19:04 +01:00
Bryan Frimin
158c36d9ab Add LLM interface
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 17:21:43 +01:00
Sacha Al Himdani
85ec106cd6 Send mailing list emails
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-11 15:34:37 +01:00
Sacha Al Himdani
4d2cb793b6 Add compliance page mailing list base
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-11 15:34:36 +01:00
Émile Ré
c4b06ddc7d Add compliange page base URL in context and use it to validate redirect URLs
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-03 22:07:01 +04:00
Bryan Frimin
c191d25e9a Add electronic signature
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-02-23 09:38:27 +01:00
Sacha Al Himdani
c9538ab287 Revert "Fix MCP"
This reverts commit 3048b99adb.
2026-02-20 20:22:58 +01:00
Sacha Al Himdani
3048b99adb Fix MCP
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-02-20 18:16:50 +01:00
Émile Ré
cbd873fd57 Revert ugly stripping by using a top level front route
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-01-17 12:34:25 -08:00
Émile Ré
c5cd225d95 Fix custom domain prefix + cookie
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-01-17 12:34:25 -08:00
Émile Ré
8b3bda56e6 Add magic link login for trust center
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-01-17 12:34:24 -08:00
Émile Ré
e220c259b3 Use trust center from context
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-01-17 12:34:23 -08:00
Émile Ré
7322201dab Plug trust center part 1
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-01-17 12:34:23 -08:00
Bryan Frimin
31f79fccce Add SCIM handler draft
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-01-17 12:22:44 -08:00
Bryan Frimin
63abfe3698 Fix not token secret
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-01-17 10:35:52 -08:00
Bryan Frimin
74fc3b8cd1 Rewrite identity and access management
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-01-17 10:07:34 -08:00
manish-singh-bisht
8eeab0a6d0 feat:pull the slack message service out to slack pkg
Signed-off-by: manish-singh-bisht <mthefool218@gmail.com>
2025-12-11 18:42:26 +01:00
Bryan Frimin
c4e7fd41cd Fix missing https redirect for trust center
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-11-24 09:26:44 +01:00