Commit Graph
99 Commits
Author SHA1 Message Date
Sebastian UnterschützandClaude Opus 5.5 d820547e8c feat(store): add status pages and their components
Composite foreign keys keep pages from listing monitors of other
organizations, independent of row-level security.

Refs #21

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 08:39:00 +01:00
Sebastian UnterschützandClaude Opus 5.5 b831478143 feat(web): console pages for monitors, incidents and notification channels
The dashboard lists monitors with status, latency and 24-hour uptime
bars rendered as SVG on the server; monitor pages add 90-day uptime,
latency and recent checks; an editor shows the settings of the selected
check type.

Closes #17
Closes #19

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 01:50:04 +01:00
Sebastian UnterschützandClaude Opus 5.5 9a050ea712 feat(web): ship ibm plex fonts with the build
Closes #20

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 01:50:04 +01:00
Sebastian UnterschützandClaude Opus 5.5 22f0740056 feat(api): organization-owned regions, checkers and status page servers
Organizations create regions and agents for themselves under Regions &
checkers; an org checker only receives its org's monitors. Platform admins
manage shared regions and agents in the admin panel or with the CLI,
which gains 'api admin grant|revoke'. The first user of a self-hosted
installation becomes a platform admin. Region lists show the org's own
regions first.

Closes #52
Refs #29

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 01:36:02 +01:00
Sebastian UnterschützandClaude Opus 5.5 607798d742 feat(store): let regions and agents belong to the platform or one organization
Regions are identified by id so organizations can reuse keys. Triggers
keep agents in regions of the same owner and monitors in platform or own
regions. Platform admins are a user flag.

Refs #52

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 01:36:02 +01:00
Sebastian UnterschützandClaude Opus 5.5 7bb4afa04a fix(migrations): run migrations in the system scope and repair skipped data
Row-level security hid every row from the data changes in migrations
00009 and 00012: existing members did not receive the Viewer role and
the built-in Admin role lacked tokens.manage. Built-in roles were also
not writable in the system scope.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 01:28:43 +01:00
Sebastian UnterschützandClaude Opus 5.5 5f42e3e650 feat(api): open incidents and notify channels when monitors go down
Results are evaluated as they arrive. Transitions open or resolve the
monitor's incident and queue a notification per enabled channel in the
same transaction; every API replica delivers the outbox with leases and
exponential retries. Organizations manage webhook and email channels,
can send test notifications and list incidents. Email requires
UPTIME_SMTP_URL.

Closes #14
Closes #15
Closes #16

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 01:23:37 +01:00
Sebastian UnterschützandClaude Opus 5.5 01ef543e62 feat(notify): deliver incidents by signed webhook and smtp
Webhooks carry an HMAC-SHA256 signature over timestamp and body and
refuse private addresses unless allowed.

Refs #16

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 01:23:37 +01:00
Sebastian UnterschützandClaude Opus 5.5 de7c6fc842 feat(evaluate): alert only when every region of a monitor fails
Regions without recent results count as unknown and keep the monitor up.
State changes are decided by one Lua script so concurrent results on
several API replicas yield a single transition.

Refs #14

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 01:23:37 +01:00
Sebastian UnterschützandClaude Opus 5.5 ffef63e586 feat(store): add incidents, notification channels and delivery outbox
At most one open incident per monitor is enforced by a partial unique
index.

Refs #15, #16

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 01:23:37 +01:00
Sebastian UnterschützandClaude Opus 5.5 d9891bb050 feat!: let checkers and status page servers reach data only through the api
Only cmd/api connects to Postgres and Redis. Agents authenticate with
tokens created by 'api agent create' and use /agent/v1: checkers long
poll for jobs, which doubles as heartbeat, and report results in
batches. Organizations manage monitors through /api/v1/org/monitors.

BREAKING CHANGE: cmd/checker and cmd/statuspage no longer read
UPTIME_DATABASE_URL or UPTIME_REDIS_*; they need UPTIME_API_URL and
UPTIME_AGENT_TOKEN. UPTIME_CHECKER_REGION is replaced by the region bound
to the agent token.

Closes #10
Closes #11
Closes #12
Closes #13
Closes #49

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 01:12:53 +01:00
Sebastian UnterschützandClaude Opus 5.5 56862dce84 feat(schedule): dispatch due checks to a random live checker instance
Dispatch runs atomically in Redis so every API replica can do it. Jobs of
instances that stop polling return to their region.

Refs #11, #49

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 01:12:53 +01:00
Sebastian UnterschützandClaude Opus 5.5 00658d49a2 feat(store): add monitors, regions, agents and check result hypertable
check_results has no row-level security because TimescaleDB refuses
compression and continuous aggregates on such tables. Every results
query takes org_id as a parameter, which a test enforces.

Refs #10, #13

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 01:12:53 +01:00
Sebastian UnterschützandClaude Opus 5.5 55559c8b0a feat(check): add http, tcp, tls, dns and icmp checks
Validate normalizes settings for the API; Run executes them on checkers.
Targets on private networks are refused unless explicitly allowed.

Refs #12

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 01:12:53 +01:00
Sebastian UnterschützandClaude Opus 5.5 bc8e934568 refactor: move private address guard into netguard
Checks need the same protection as identity provider requests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 01:12:53 +01:00
Sebastian UnterschützandClaude Opus 5.5 b52698ffbc feat(api): let owners audit all api tokens and cap their lifetime
Holders of tokens.manage list every token of the org with owner,
permissions, creation, expiry and last use, and can revoke any of them.
A maximum lifetime rejects tokens that would outlive it and shortens
existing ones when it is set.

Closes #48

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 00:55:14 +01:00
Sebastian UnterschützandClaude Opus 5.5 da128c5081 feat(store): add token lifetime limit and tokens.manage permission
The built-in Admin role gains tokens.manage.

Refs #48

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 00:55:14 +01:00
Sebastian UnterschützandClaude Opus 5.5 d7d4821e3e feat(api): enforce roles, org sign-in policies, invitations and api tokens
Every org route resolves a principal from the session or a bearer token
and checks a permission. Nobody can grant, revoke or remove more than
they hold. Tokens are capped by their owner's current rights and cannot
manage credentials. Orgs can require TOTP or SSO; the owner keeps a
password fallback for SSO.

Closes #6
Closes #7
Closes #8
Closes #9
Closes #41
Closes #45

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 00:49:35 +01:00
Sebastian UnterschützandClaude Opus 5.5 30409697f7 feat(auth): record how a session was authenticated
Refs #41, #45

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 00:49:35 +01:00
Sebastian UnterschützandClaude Opus 5.5 ee09c497de feat(store): add roles, role assignments, api tokens and invitations
Built-in roles are seeded with fixed ids and are read-only for every org.
Existing non-owner members receive the Viewer role.

Refs #6, #7, #8, #9

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 00:49:35 +01:00
Sebastian UnterschützandClaude Opus 5.5 15932db98a feat(authz): add permission sets, scoped grants and escalation checks
Refs #6, #7

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 00:49:35 +01:00
Sebastian UnterschützandClaude Opus 5.5 7b063d2cd8 feat(api): accept recovery codes as second factor and let users regenerate them
Enabling TOTP returns ten codes that are shown once. Disabling TOTP and
regenerating codes require the password plus a current code.

Closes #40

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 00:35:20 +01:00
Sebastian UnterschützandClaude Opus 5.5 dbea42e7a5 feat(auth): add single-use totp recovery codes
Codes are stored as SHA-256 hashes and consumed with one conditional
update, so concurrent use of the same code succeeds at most once.

Refs #40

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 00:35:20 +01:00
Sebastian UnterschützandClaude Opus 5.5 3f21361995 feat(api): let each organization sign in through its own identity provider
Owners manage OIDC providers under /settings/sso. Users start at
/sso/<org>. New users can be provisioned for verified emails in allowed
domains; existing accounts are never matched by email and must link
their SSO sign-in while signed in.

Closes #4

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 00:30:43 +01:00
Sebastian UnterschützandClaude Opus 5.5 9ad5f29f1b feat(sso): add openid connect client with pkce and guarded discovery
Issuer URLs come from customers, so requests to their IdPs refuse
non-public addresses unless private networks are explicitly allowed.

Refs #4

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 00:30:43 +01:00
Sebastian UnterschützandClaude Opus 5.5 d1976ed57a feat(store): add per-organization sso providers and linked identities
Identities are keyed by provider and subject. Both tables are tenant
scoped; org_id_by_slug resolves a slug before sign-in without opening a
broader scope.

Refs #4

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 00:30:43 +01:00
Sebastian UnterschützandClaude Opus 5.5 c485d1a96f feat(platform): tag requests, logs and api errors with a request id
A well-formed X-Request-ID from a proxy is kept, otherwise a UUIDv7 is
generated. The ID is echoed in the response header, added to every log
record written with the request context and returned in API error
bodies.

Closes #44

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 00:20:57 +01:00
Sebastian UnterschützandClaude Opus 5.5 b6843330a8 test: report failures as got/want and use subtests for tables
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 00:18:02 +01:00
Sebastian UnterschützandClaude Opus 5.5 d20225982a refactor: follow the google go style guide
Document every package and exported identifier, return the log level
from NewLogger instead of keeping it in a package variable, and stop
tests from mutating the argon2 parameters.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 00:18:02 +01:00
Sebastian UnterschützandClaude Opus 5.5 ea6f022112 fix(config): reject an empty checker region
UPTIME_CHECKER_REGION= passed the required check and started a checker
that no monitor could ever be assigned to.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 00:18:02 +01:00
Sebastian UnterschützandClaude Opus 5.5 70190446ff feat(api): localize console pages and api error messages
The language comes from the user setting, then the lang cookie, then
Accept-Language, falling back to English. Errors keep a stable code and
carry a translated message.

Closes #42

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 00:07:00 +01:00
Sebastian UnterschützandClaude Opus 5.5 dde7b890b8 feat(auth): persist preferred language per user and session
Refs #42

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 00:07:00 +01:00
Sebastian UnterschützandClaude Opus 5.5 7dd1f87ffe feat(i18n): add english and german message catalogs
Tests fail on catalogs with diverging keys and on message IDs used in
code or templates that no catalog defines.

Refs #42

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 00:07:00 +01:00
Sebastian UnterschützandClaude Opus 5.5 db44fedc72 feat(api): add signup, login with totp and account security pages
Signup is limited to the first user by default (UPTIME_SIGNUP). TOTP
secrets are sealed with UPTIME_SECRET_KEYS and bound to the user id.

Closes #3
Closes #5

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-21 23:55:23 +01:00
Sebastian UnterschützandClaude Opus 5.5 99e9b1e57d feat(store): add totp columns, org totp policy and global scope
Orgs are created inside their own tenant scope, so signup needs no
system scope.

Refs #3

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-21 23:55:23 +01:00
Sebastian UnterschützandClaude Opus 5.5 caff396264 feat(auth): add argon2id passwords, replay-safe totp and redis rate limits
Refs #3

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-21 23:55:23 +01:00
Sebastian UnterschützandClaude Opus 5.5 96c1555889 feat(sealed): encrypt secrets at rest with a rotatable keyring
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-21 23:55:23 +01:00
Sebastian UnterschützandClaude Opus 5.5 9667e121f1 feat(auth): add session middleware and csrf protection
Unsafe methods require the session's synchronizer token and a matching
Origin, which also covers login requests that have no session yet.

Refs #5

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-21 23:49:08 +01:00
Sebastian UnterschützandClaude Opus 5.5 dae55d8c18 feat(auth): store sessions in redis with sliding and absolute expiry
Tokens are only kept as SHA-256 hashes. A per-user index allows ending
all sessions of an account at once.

Closes #1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-21 23:49:08 +01:00
Sebastian UnterschützandClaude Opus 5.5 ccc0fe58b8 feat(tenant): enforce tenant isolation with row-level security
Every query runs inside a transaction carrying app.org_id, app.user_id
or the explicit system scope. Without a scope no rows are visible.

Closes #2

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-21 23:48:02 +01:00
Sebastian UnterschützandClaude Opus 5.5 95da376ac1 feat(store): add users and org memberships with single owner per org
Refs #1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-21 23:48:02 +01:00
Sebastian UnterschützandClaude Opus 5.5 e9c7394c8b feat(platform)!: log exclusively as structured json
Request access logs, panics, migration output and fatal errors are now
emitted through the JSON slog handler.

BREAKING CHANGE: UPTIME_LOG_FORMAT is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-21 23:41:57 +01:00
Sebastian UnterschützandClaude Opus 5.5 2bd3d0a18e feat(platform): support redis sentinel for failover
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-21 23:37:48 +01:00
Sebastian UnterschützandClaude Opus 5.5 8ea459e5f1 feat(web): set up templ layout with tailwindcss 4.3 and axios
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-21 23:33:28 +01:00
Sebastian UnterschützandClaude Opus 5.5 0af74267b9 feat(store): generate typed queries with sqlc
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-21 23:33:28 +01:00
Sebastian UnterschützandClaude Opus 5.5 018b24948e feat(migrations): embed goose migrations with advisory locking
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-21 23:33:28 +01:00
Sebastian UnterschützandClaude Opus 5.5 1a6fadb030 feat(platform): add postgres, redis, logging and graceful http serving
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-21 23:33:28 +01:00
Sebastian UnterschützandClaude Opus 5.5 9662a3cea2 feat(config): load component configuration from environment
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-21 23:33:28 +01:00
Sebastian UnterschützandClaude Opus 5.5 b92474c272 chore: initialize go module and repository settings
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-21 23:33:28 +01:00