Service registry overrides
Admin endpoints for managing service configuration overrides. Overrides are stored in theservice_registry_overrides database table and take precedence over hardcoded service configurations. An in-memory cache refreshes every 30 seconds for zero-latency lookups at runtime.
These endpoints require admin authentication. Non-admin users receive a
403 Forbidden response.List service overrides
Retrieve all service registry overrides. By default, includes both active and inactive (soft-deleted) entries for the admin view.| Parameter | Type | Default | Description |
|---|---|---|---|
search | string | — | Filter by domain or name (case-insensitive substring match) |
category | string | — | Filter by category (exact match) |
active_only | string | "false" | Set to "true" to exclude inactive overrides |
200 OK:
Create service override
Create a new service registry override. If an inactive (soft-deleted) override exists for the same domain, it is reactivated with the new data.Required fields
| Field | Type | Description |
|---|---|---|
domain | string | Service domain (e.g., newservice.com). 3-253 characters. Normalized to lowercase with www. stripped. Validated as a proper hostname. |
name | string | Display name. 1-200 characters. |
Optional fields
URL fields
URL fields
| Field | Type | Description |
|---|---|---|
logo_url | string (URL) | Service logo URL. Must be http or https. |
login_url | string (URL) | Login page URL. |
reset_url | string (URL) | Direct password reset page URL. |
passkey_setup_url | string (URL) | Passkey setup/enrollment URL. |
Classification fields
Classification fields
| Field | Type | Allowed values |
|---|---|---|
category | string | big-tech, social, finance, productivity, shopping, gaming, developer, email, other |
passkey_support_type | string | sign-in, sign-in-and-sign-up, mfa-only |
login_type | string | password_reset, magic_link, otp, sso_only |
browser_type | string | chromium, stealth |
recovery_method | object | { primary: string, secondary?: string } |
Email pattern fields
Email pattern fields
| Field | Type | Description |
|---|---|---|
sender_patterns | string[] | Email sender addresses or patterns for reset emails |
gmail_search_queries | string[] | Gmail API search queries to find reset emails |
otp_patterns | string[] | Regex patterns (as strings) to extract OTP codes from email bodies |
link_patterns | string[] | Regex patterns (as strings) to extract reset links from emails |
success_indicators | string[] | Text patterns indicating a successful reset request (max 20 entries, 200 chars each) |
Form selector fields
Form selector fields
| Field | Type | Description |
|---|---|---|
forgot_password_selectors | string[] | CSS selectors for “forgot password” links. Max 20 selectors, 500 chars each. Validated against script injection. |
email_input_selectors | string[] | CSS selectors for email input fields |
submit_selectors | string[] | CSS selectors for submit buttons (highest priority in smart-submit) |
submit_button_text | string[] | Button text to match for submit (case-insensitive). Max 10 entries. |
skip_submit_patterns | string[] | Text patterns for buttons to never click. Max 10 entries. |
Password and admin fields
Password and admin fields
| Field | Type | Description |
|---|---|---|
password_requirements | object | Service-specific password rules. See below. |
notes | string | Admin notes. Max 5000 characters. |
is_verified | boolean | Whether the configuration has been verified by an admin. |
Password requirements object
| Field | Type | Description |
|---|---|---|
minLength | integer | Minimum password length (1-128) |
maxLength | integer | Maximum password length (1-256) |
requireUppercase | boolean | Must contain uppercase letters |
requireLowercase | boolean | Must contain lowercase letters |
requireNumbers | boolean | Must contain digits |
requireSymbols | boolean | Must contain symbols |
disallowedChars | string | Characters that the service rejects (max 50) |
specificSymbols | string | Service-allowed symbols (replaces the default set, max 50) |
201 Created:
| Status | Code | Description |
|---|---|---|
400 | validation_failed | Invalid or missing fields |
409 | conflict | An active override already exists for this domain |
429 | rate_limited | Rate limit exceeded |
500 | internal_error | Database insert failed |
Creating or updating an override invalidates the in-memory cache for that domain. The next lookup fetches fresh data from the database and the full cache is refreshed.
Unified registry architecture
The service registry uses a three-tier architecture to resolve service configurations:In-memory cache lookup
A warm
Map<string, ServiceRegistryOverride> is refreshed from the database every 30 seconds. Synchronous lookups return results in microseconds.Database override
If a database override exists for the domain, its non-null fields are merged onto the hardcoded configuration. Database values always take precedence.
Merge behavior
When a database override is merged with a hardcoded configuration:| Behavior | Detail |
|---|---|
| Non-null DB fields | Override the hardcoded value |
| Null DB fields | Hardcoded value is preserved |
extractLinks function | Never overridden (functions cannot be stored in the database) |
| String regex patterns | Compiled to RegExp objects with safeRegExp(). Invalid patterns are silently dropped. |
| Domain normalization | Lowercase, www. prefix stripped |
Cache lifecycle
| Event | Action |
|---|---|
| First lookup | Cache is loaded from the database (async) |
| Every 30 seconds | Background refresh from the database |
| After create/update/delete | Immediate cache invalidation and refresh |
| Process restart | Cache starts empty and loads on first access |