Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Authentication

SynDB uses PASETO v4 tokens for authentication. Access tokens authorize API requests; refresh tokens obtain new access tokens without re-authenticating.

Account Types

TypeHow to createCapabilities
RegularPOST /v1/user/auth/register or CLI syndb user registerBrowse, search datasets
AcademicVerify via CILogon (institutional login)All regular + SyQL, graph analysis, meta-analysis, upload, jobs
ServicePOST /v1/user/auth/register-service with X-Service-Secret headerSame as Academic (auto-verified)
SuperUserPromoted by existing superuserAll + federation admin, ontology management

Academic verification is required for compute-intensive operations: query execution, graph analysis, analytics, meta-analysis, and dataset upload.

Registration & Login

CLI:

syndb user register
syndb user login

API:

# Register
curl -X POST https://api.syndb.xyz/v1/user/auth/register \
  -H "Content-Type: application/json" \
  -d '{"email": "[email protected]", "password": "...", "display_name": "Jane Doe"}'

# Login — returns access_token and refresh_token
curl -X POST https://api.syndb.xyz/v1/user/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email": "[email protected]", "password": "..."}'

Token Lifecycle

  1. Login returns an access token (15 min TTL) and a refresh token (30 day TTL)
  2. Use the access token in requests: Authorization: Bearer <access_token>
  3. When the access token expires, exchange the refresh token for a new pair:
    curl -X POST https://api.syndb.xyz/v1/user/auth/refresh \
      -H "Content-Type: application/json" \
      -d '{"refresh_token": "..."}'
    
  4. Each refresh rotates the token — the old refresh token is invalidated

Refresh tokens use family-based rotation: reuse of a revoked token invalidates the entire family, forcing re-authentication.

OAuth Providers

Authenticate through institutional or social identity providers:

ProviderUse caseScopes
CILogonAcademic institutional login (universities, research labs)openid, email, org.cilogon.userinfo
GitHubSocial login + ORCID associationuser:email
GoogleSocial loginopenid, email, profile
GitLabSocial login (supports self-hosted instances)read_user
ORCIDResearcher ID association (requires existing account)openid

All OAuth flows use PKCE (Proof Key for Code Exchange) with SHA-256.

Academic Verification via CILogon

CILogon links your institutional identity to your SynDB account, automatically verifying you as an academic user:

  1. Log in to SynDB
  2. Navigate to CILogon verification (or GET /v1/user/authenticate/cilogon/authorize)
  3. Authenticate with your institution’s SSO
  4. Your account is marked as verified — unlocking SyQL, graph analysis, and upload

Service Accounts

For automated pipelines and integrations:

curl -X POST https://api.syndb.xyz/v1/user/auth/register-service \
  -H "Content-Type: application/json" \
  -H "X-Service-Secret: <SERVICE_SECRET>" \
  -d '{"email": "[email protected]", "password": "..."}'

Service accounts are auto-verified and bypass academic checks. The X-Service-Secret must match the server’s SERVICE_SECRET environment variable.

Logout

# Revokes the refresh token
curl -X POST https://api.syndb.xyz/v1/user/auth/logout \
  -H "Content-Type: application/json" \
  -d '{"refresh_token": "..."}'