Commit Graph

128 Commits

Author SHA1 Message Date
Aurélien Sibiril
509d0c88b1 Add vendor assessment agent
Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-04-24 08:43:14 +02:00
Sacha Al Himdani
25c590ffe6 Add background PDF generation for published document versions
Move PDF generation from synchronous publish flow to a background polling
job. Published versions with file_id IS NULL are picked up by the job,
which generates the PDF, uploads to S3, and links the file. Export PDF
now serves stored files for published versions (with optional signature
page and watermark) and generates on the fly for drafts.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-04-23 20:50:25 +02:00
Bryan Frimin
990dfa8438 Update kit with new pg config
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-04-22 22:30:23 +02:00
Émile Ré
4313930ae9 Add global branding config field to control cookie banner default
Introduces a BRANDING boolean config (default true) propagated through
the standard config pipeline. Cookie banners now initialize their
show_branding column from this config instead of hardcoding true.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-22 15:41:11 +04:00
Bryan Frimin
c4e81ed092 Inline OAuth2 signing key in config
The OAuth2/OIDC server accepted its signing key via a file path
(key-file), while every other PEM key in the probod config (SAML
private key, ACME account key) is embedded inline. Switch the
field to a private-key string so the convention is uniform.

The signing key is operator-supplied material that must outlive
any process restart, so the bootstrap builder now treats
OAUTH2_SERVER_SIGNING_KEY as required and refuses to start
without one; silently minting a fresh key per boot would break
token validation across rollouts. The OAUTH2_SERVER_* env vars
otherwise flow through builder.Build like the existing SAML
block so the new OAuth2Server section is populated end-to-end.

Rework the e2e harness to render its config via bootstrap at
test setup, which removes the static
e2e/console/testdata/config.yaml and the previously generated
test-only PEM file. A per-run RSA key is minted via
bootstrap.GenerateOAuth2SigningKey (kept public for test
tooling) and injected through the builder env map. CI now
passes ACME_ROOT_CA inline instead of mutating a YAML on disk.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-04-21 17:56:00 +02:00
Émile Ré
1ec8e475de Add UX for cookie banner management
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-20 17:47:04 +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é
e3ab373a0c Add trusted proxy middleware and simplify clientip
Strip forwarded headers (Forwarded, X-Forwarded-For, X-Real-Ip)
from requests originating from untrusted proxies at the HTTP
server level, reusing the existing proxy-protocol trusted-proxies
config. The clientip package is now a pure extraction helper;
context plumbing and middleware wrappers are removed.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-15 10:21:01 +04:00
Sacha Al Himdani
06c0972551 Add membership and host to user webhook payload
Nest membership ID, role, and state into a membership sub-object
in the user webhook payload. Also emit user:updated webhook when
the membership role is changed. Add X-Probo-Webhook-Host header
to webhook HTTP calls. Skip delete webhook when membership is
not found in SCIM user deletion.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-04-13 17:14:01 +02:00
Bryan Frimin
43336078f4 Migrate workers to kit/worker
Replace hand-rolled polling loops, semaphores, and WaitGroups
in all 7 background workers with go.gearno.de/kit/worker. Each
worker now implements Handler[T] (Claim/Process) and optionally
StaleRecoverer, gaining automatic Prometheus metrics and
OpenTelemetry tracing. Bumps kit from v0.3.0 to v0.5.0.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-04-13 12:25:42 +02:00
Aurélien Sibiril
a4c15c6fb6 Wire provider defaults at connector registration time
Compute the OAuth2 redirect URI from the base URL using the
CallbackPath constant and apply provider defaults before
registering each connector.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-04-08 11:05:12 +02:00
Bryan Frimin
050154ab6a Refactor LLM config into top-level settings
Replace the monolithic agents config with a cleaner structure:
- llm: holds provider credentials and default model settings
- probo-agent: LLM overrides for the probo agent
- evidence-describer: worker config (interval, stale-after,
  max-concurrency) alongside LLM overrides

This makes worker tuning configurable via YAML and env vars
instead of being hardcoded in Go, and separates provider
credentials from per-consumer model settings.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-04-03 14:06:30 +02: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
Bryan Frimin
619ec7b882 Add AI-powered evidence description generation
Introduce a background worker that automatically generates
compliance-focused descriptions for uploaded evidence files
using configurable LLM providers. Descriptions are surfaced
across all interfaces: GraphQL API, MCP API, CLI, and the
console UI.

Key changes:
- Multi-provider LLM config with per-agent settings (pointer
  types for Temperature/MaxTokens to preserve zero values)
- Evidence description worker with bounded concurrency
- EvidenceDescriptionStatus typed enum with PostgreSQL enum type
- New `prb evidence` CLI commands (list, view, delete)
- Evidence description displayed in console table and preview
- Migration only marks evidences without files as completed

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-26 14:32:41 +01:00
Bryan Frimin
9b66d05c3c Check CAA records before ACME certificate issuance
Before requesting a certificate from the ACME provider, verify
that CAA DNS records for the domain permit issuance by the
configured CA. This avoids wasting ACME attempts on domains
whose CAA policy would reject the request.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-25 12:23:30 +01:00
Bryan Frimin
23084a72a2 Add OIDC login support for Google and Microsoft providers
Implements OpenID Connect authentication flow with PKCE, JWT verification, and enterprise-only account restrictions. Adds OIDC service with JWKS caching and state management, HTTP handlers for login/callback flows, GraphQL query for available providers, and sign-in UI integration.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-23 14:17:43 +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
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
Sacha Al Himdani
16b966b8fb Fix multiline function call style violations
Expand mixed inline/multiline function calls so each argument
is on its own line, matching the one-argument-per-line rule.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-17 15:59:26 +01:00
Bryan Frimin
7c77c217c7 Fix Anthropic requests failing due to missing MaxTokens in agent configuration
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 18:24:02 +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é
355e6b81b8 Add an account activation step in the signing request flow when needed
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-11 17:08:42 +04:00
Émile Ré
87415c0324 Remove useless encryption key injections
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-11 14:42:37 +04:00
Bryan Frimin
4875a2bd5e Improve mailer performance
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-09 11:19:04 +01:00
Bryan Frimin
63bf983e59 Refactor entrypoint
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-06 12:11:12 +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
c163ca9bf0 Add cache ttl
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-02-13 18:28:27 +01:00
Sacha Al Himdani
f9de9c4834 Add webhooks
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-02-13 18:28:25 +01:00
Bryan Frimin
99f1da1560 Suppress noisy TLS log
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-02-09 10:08:34 +01:00
Émile Ré
e094dc847b Fix typo in function name + fix email render return values on error
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-02-05 12:56:23 +04:00
Émile Ré
c6da1c2cce Update error message
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-02-05 12:51:30 +04:00
Émile Ré
6189a8ed81 Generate presigned URL for email assets at render time
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-02-05 12:41:35 +04:00
Bryan Frimin
8e8288a361 Remove noisy tls error
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-02-05 08:48:32 +01:00
Émile Ré
27821632c6 Serve email static assets from object store
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-02-04 18:32:52 +04:00
Bryan Frimin
ece54f1616 Fix golint errors
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-02-02 18:42:50 +01:00
Bryan Frimin
13d19cea9d Fix undefined rejectProxyHeaderFrom func
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-02-02 11:01:49 +01:00
Bryan Frimin
86c0d6a94c Remove code who has been merged
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-02-02 10:54:07 +01:00
Bryan Frimin
3d4b215b8f Add bridge backend for sync
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-02-02 09:14:39 +01:00
Bryan Frimin
a3c3411a40 Update ignore tls pattern
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-01-21 09:38:21 -08:00
Émile Ré
6c7bcfb50a Get rid of old trust-auth config
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-01-17 12:36:47 -08:00
Émile Ré
5384e12ced Make magic link single use and reduce duration to 15min
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-01-17 12:35:45 -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
63abfe3698 Fix not token secret
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-01-17 10:35:52 -08:00
Bryan Frimin
e9ac50d91c Update RBAC on console
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-01-17 10:23:45 -08:00
Bryan Frimin
63349098fd Add saml domain verification
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-01-17 10:10:26 -08:00
Bryan Frimin
bac107a7df Start IAM service
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-01-17 10:10:25 -08:00