Commit Graph

42 Commits

Author SHA1 Message Date
Bryan Frimin
b524e9b497 Refactor certmanager to worker service
Replace the Provisioner and Renewer with poll-based provision and renew
workers orchestrated by a certmanager Service. Certificate operations are
now hostname-centric and driven by the certificates table, decoupled from
custom-domain business logic.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-21 15:43:07 +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
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
Émile Ré
f5703d390b Enforce Go style rules across codebase
Apply five style rules: convert iota string enums to typed
string constants, replace errors.As with errors.AsType,
merge three-group imports into two groups, fix multiline
parameter/argument formatting, and replace fmt.Sprintf URL
construction with net/url.

Signed-off-by: Émile Ré <emile@probo.com>
2026-05-20 11:46:39 +04: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
Bryan Frimin
da9ba64b07 Persist cleared provisioning error before HTTP challenge
When DNS and CAA checks pass, ProvisioningError is set to nil but
was only persisted later alongside the challenge data. If
GetHTTPChallenge then failed, the update was never reached,
leaving stale DNS/CAA error messages visible to the user.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-04-24 16:05:11 +02:00
Bryan Frimin
976acbd114 Surface domain provisioning errors to users
When DNS verification, CAA checks, or HTTP challenge completion
fail during certificate provisioning, the error is now stored on
the custom domain record and exposed via GraphQL. The console
displays it in both the domain card and domain detail dialog so
users can diagnose configuration issues without checking logs.

Previously these failures returned an error that was only logged
server-side, leaving users with no visibility into why their
domain was stuck in a pending state.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-04-24 16:05:11 +02:00
Bryan Frimin
f17fb7bf49 Upgrade to kit v0.3.0
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-04-03 11:56:06 +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
2004bf6050 Fix CAA issuer matching to handle parameters
CAA issue records may contain parameters after a semicolon per
RFC 8659 (e.g. "letsencrypt.org; accounturi=..."). Split on ";"
and compare only the issuer domain so these records are accepted.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-25 12:23:32 +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
f0d43fd8e5 Fix ACME challenge retry to create fresh orders
When CompleteHTTPChallenge fails, the challenge is already marked
invalid by Let's Encrypt. Retrying Accept on the same challenge
always fails with "authorization must be pending". Reset the
domain to pending with cleared challenge data so each retry
creates a new ACME order.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-25 09:30:40 +01:00
Bryan Frimin
6a77d42dd6 Style
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-16 00:28:47 +01:00
Bryan Frimin
ef76a8d2e1 Remove deadcode
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 17:18:02 +01: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
d4b3025463 Use go 1.26 syntax
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-06 15:00:42 +01:00
Bryan Frimin
a9a2e75c59 Fix wrong error type
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-02-06 09:36:07 +01:00
Bryan Frimin
ece54f1616 Fix golint errors
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-02-02 18:42:50 +01:00
Émile Ré
20582a831c Uncomment cert provisioner dns config check
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-01-17 12:35:46 -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
Bryan Frimin
3eeafb21bd Fix ACME queue bloqued in case of error
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-12-15 19:10:16 +01:00
Bryan Frimin
ca23e945b3 Fix go/cgo dns resolver behaviour
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-12-15 18:34:32 +01:00
Bryan Frimin
32e7936737 Fix ACME renew infinit loop
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-12-15 17:19:28 +01:00
Bryan Frimin
653ac5addb Fix error message
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-11-13 21:22:27 +01:00
Bryan Frimin
24abdb9d14 Fix import and error management
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-11-13 20:55:43 +01:00
MustafaAamir
60a3402b24 fix(certmanager#514): check DNS configuration before starting ACME
Signed-off-by: MustafaAamir <mustafa.290101@gmail.com>
2025-11-13 20:55:43 +01:00
Bryan Frimin
59aa332ab5 Move to vanity import url
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-10-31 17:01:52 +01:00
Bryan Frimin
6f2bd9c92f Fix failed to to cannot
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-10-30 16:38:08 +01:00
Bryan Frimin
84a80b9469 Fix cert provisioner clearing valid challenges on transient errors
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-10-14 15:47:55 +02:00
Bryan Frimin
6631e0fa99 Fix failed ACME block the queue
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-10-14 15:47:53 +02:00
Bryan Frimin
1b01659fbc Fix noisy SSL error
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-10-14 14:20:58 +02:00
Bryan Frimin
916485e119 Fix retry on error
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-10-11 10:59:15 +02:00
Bryan Frimin
26c7364e27 Remove insecure acme option
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-10-09 15:04:56 +02:00
Bryan Frimin
2f505497c1 Fix error not wrapped
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-10-09 15:04:55 +02:00
Bryan Frimin
a2485ec6fa Remove decrypt key by default
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-10-09 15:04:55 +02:00
Bryan Frimin
7a4046ad65 Adapt to new sql model
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-10-09 15:04:54 +02:00
Bryan Frimin
cf186a4120 Add support for persistent ACME account keys
Allow ACME account keys to be configured via config file to maintain
the same Let's Encrypt account across deployments. Add DecodePrivateKey
function with PEM block type constants to support EC, RSA, and PKCS8
key formats. When no account key is provided, fall back to generating
a new one with a warning.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-10-09 15:04:53 +02:00
Bryan Frimin
bb373d475b Replace string-based error matching with sentinel error
Introduced ErrHTTPChallengeRequired as a sentinel error and updated the
renewal flow to use errors.Is() for type-safe error checking instead of
string matching.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-10-09 15:04:53 +02:00
Bryan Frimin
2158a910a2 Style
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-10-09 15:04:52 +02:00
Bryan Frimin
06d64ae999 Put SSLStatus not nullable
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-10-09 15:03:37 +02:00
Bryan Frimin
f9f30c8b02 Fix logger name
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-10-09 15:03:37 +02:00
Bryan Frimin
6ff8386818 Rename pkg in certmanager
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-10-09 15:03:36 +02:00