Authentication
How users log into Sectora, how Sectora authenticates to your providers (GitHub, Stripe, AWS, OAuth IdPs), and how to issue API keys for automation.
User login
Sectora does not use passwords. Two login methods:
- Magic link — enter your email at
/auth/login. We send a one-time link valid for 15 minutes. Clicking it logs you in. The link can be used once. - Google OAuth — Sign in with Google. Maps the Google account's primary email to your Sectora account.
Both produce the same kind of session — a signed JWT in a Secure HttpOnly cookie, valid for 30 days, refreshed silently on every request. Log out anywhere clears all sessions for the account.
SSO (Enterprise plan)
On the Enterprise plan, all members of your organization must authenticate via your IdP. Sectora supports:
SSO is set up with Sectora support: send your IdP's metadata (SAML) or issuer + client_id + client_secret (OIDC). Members then sign in at /auth/sso with your organization ID. Test that sign-in works before asking us to enforce it.
Require SSO. When SSO is enforced, the members your SSO signs in can sign in only through your IdP. Magic links, Google sign-in and passkey sign-in are refused for them:
- A magic-link request gets no link. The member receives an email pointing to the SSO sign-in instead. Anyone who requests a link sees the usual "link sent" reply, so the login page never reveals who belongs to your organization.
- An older magic link, a Google sign-in, a passkey sign-in, or a second-factor step started before enforcement was turned on is refused, with a link to your SSO sign-in.
- A member can't accept an invitation to another organization while enforcement is on.
- Enforcement applies only while SSO is enabled and the organization is active, so members always have a working way in.
Some accounts can't sign in through an organization's SSO. Enforcing on them would lock them out, so they keep their usual sign-in:
- Accounts that also belong to another organization. SSO signs in only accounts that belong to your organization alone, so your IdP can never take over an account that reaches another tenant.
- Sectora staff, and accounts with an elevated platform role, such as partner, MSP and distributor admins.
Each such sign-in is recorded in your audit log as sso_enforcement_bypassed, with the reason.
Sessions + audit log
Settings → Account → Sessions shows every active session for your account (browser, IP, last seen). Revoke any session you don't recognise.
Settings → Audit Log shows every account-relevant action: login, logout, password-less sign-in via new device, API key generation, role change, scan triggers. Filterable by actor + action; exportable to CSV.
API keys (for automation)
For CI/CD pipelines, scripts, and integrations, use API keys instead of session cookies. Generate at Settings → API Keys → + New key.
Key scopes
Each key has an explicit scope set. Pick the minimum:
- scans:read — list scans and read scan results.
- scans:create — start DAST scans (
POST /api/v1/scans, and the MCPscan_urltool). Keys issued with the older name scans:write keep working: it is accepted as an alias of scans:create. - vulns:read — read findings.
- shield:read — read Shield config + analytics.
- threat-intel:read — threat-intelligence lookups.
- mcp:read / mcp:write — use the key from an MCP client.
A key acts as the team member who created it, inside the organization it was created in. A scan started with a key passes the same checks as one started from the dashboard — verified domain ownership, your plan's scan quota and plan features — and runs only while that organization is its creator's primary (and active) organization.
Using a key
curl -H "Authorization: Bearer $SECTORA_API_KEY" \
https://sectora.io/api/v1/scansKeys are prefixed sk_live_. The full key is shown only at creation time; afterwards only its prefix is visible.
Key rotation
Best practice: rotate API keys every 90 days. Use Settings → API Keys → Rotate, which generates a new key and gives you a 7-day grace period where both old and new accept requests. Update your CI/CD secrets within the grace, then revoke the old.
Provider integrations (Sectora → your services)
Sectora needs to authenticate TO your providers for scan operations. Each provider connection is configured at Settings → Integrations and is org-scoped (shared across team members).
Source control (GitHub / GitLab / Bitbucket)
OAuth flow — click Connect → authorize on the provider. Sectora stores the access token + refresh token AES-256-encrypted at rest. Used to clone repos for SAST/SCA/Secrets scans and to post PR comments + check runs.
Ticket trackers (Jira / Linear / GitHub Issues)
OAuth or API token (provider-dependent). Used for auto-creating tickets from findings and bi-directional status sync (closing the ticket in Linear marks the finding resolved in Sectora).
AI proxy (Anthropic / OpenAI / Gemini)
For BYO-key AI Smart Triage. Set your provider API key under Settings → Integrations → AI. The bundled Gemini fallback ships with the trial so the feature works out of the box without this; bring your own key once you outgrow the included quota.
Cloud accounts (AWS / GCP / Azure)
For Attack Surface Management — discovers your public endpoints by querying provider APIs (EC2, ELB, Cloud Run, App Service, etc.). Read-only IAM role / service account. See ASM.
Webhooks (Sectora → your systems)
Outbound webhooks deliver your alerts — scan completed or failed, vulnerabilities and secrets found, new CVEs, KEV additions, EPSS spikes, published exploits — as JSON. Configure one at Settings → Integrations → Custom Webhook. When you set a webhook secret, every delivery is signed with HMAC-SHA256 over <timestamp>.<raw body>, hex-encoded:
POST /your-endpoint
Content-Type: application/json
User-Agent: Sectora-Webhook/1.0
X-Sectora-Timestamp: 1793610000
X-Sectora-Signature: 80af4c5cf0116ef8d02331d411f87ad5cb0be0cc2a88c07b67b4d0185b5052d5
X-Signature-256: sha256=80af4c5cf0116ef8d02331d411f87ad5cb0be0cc2a88c07b67b4d0185b5052d5X-Sectora-Timestamp— Unix seconds when the delivery was signed. Always sent.X-Sectora-Signature— hex HMAC-SHA256 of the timestamp, a., and the raw request body, keyed with your secret.X-Signature-256— the same signature assha256=<hex>, for tools that expect that format.
Without a secret, deliveries are not signed (only the timestamp header is sent). Verify against the raw body before parsing it, and reject old timestamps yourself — Sectora signs every attempt fresh, so a 5-minute window is safe. Node.js:
const crypto = require('crypto')
// rawBody: the request body exactly as received (Buffer or string) — not re-serialized JSON.
// headers: Node's lower-cased request headers (req.headers).
function verifySectoraWebhook(rawBody, headers, secret, toleranceSeconds = 300) {
const timestamp = headers['x-sectora-timestamp']
const signature = headers['x-sectora-signature']
if (!timestamp || !signature) return false
// Reject old deliveries so a captured request can't be replayed.
const age = Math.abs(Math.floor(Date.now() / 1000) - Number(timestamp))
if (!Number.isFinite(age) || age > toleranceSeconds) return false
const expected = crypto.createHmac('sha256', secret)
.update(timestamp + '.')
.update(rawBody)
.digest('hex')
const a = Buffer.from(signature)
const b = Buffer.from(expected)
return a.length === b.length && crypto.timingSafeEqual(a, b)
}With Express, read the body with express.raw({ type: 'application/json' }) so the bytes you verify are the bytes that were signed. Payload format: see Alerts.
What's next
- Teams + Roles — RBAC + invite flow.
- Integrations — third-party service connections.
- API Reference — full endpoint list for your API keys.