SSO · SAML 2.0 + OIDC
Autenticação federada com seu IdP corporativo. PKCE, signature validation, replay protection.
OASIS SAML 2.0 · OpenID Connect Core 1.0
SAML 2.0 · OIDC · SCIM 2.0 · OAuth 2.0 · REST com OpenAPI 3.1. Tudo público, auditável, implementado conforme RFC. Sem “adapter proprietário” ou “conector mágico”.
Autenticação federada com seu IdP corporativo. PKCE, signature validation, replay protection.
OASIS SAML 2.0 · OpenID Connect Core 1.0
Provisionamento push do IdP. Users CRUD, filtros, ETag, soft-delete LGPD.
RFC 7642 / 7643 / 7644
Endpoints versionados, OpenAPI 3.1, paginação cursor-based, idempotency keys.
REST · OpenAPI 3.1 · JSON
API Keys com escopos granulares ou OAuth 2.0 Client Credentials com rotação automática.
RFC 6749 · RFC 6750 · RFC 7009
25+ tipos de evento, assinatura HMAC-SHA256, retry exponencial em 7 tentativas, DLQ.
RFC 2104 (HMAC) · timestamp anti-replay
Rate limit por API Key, IP allowlist, AES-256-GCM em repouso, SSRF protection, audit log.
OWASP API Top 10 · NIST SP 800-63
OIDC sempre que possível (Authorization Code + PKCE). SAML 2.0 para IdPs corporativos que só falam SAML. Discovery automática por domínio de e-mail.
# 1. Discovery por domínio (sem auth)
GET https://api.intellicreate.online/api
/api/sso/discover?domain=empresa.com.br
→ { sso: true, provider: "OIDC", init_url: "..." }
# 2. Browser redireciona para o IdP (state, nonce, PKCE)
GET https://api.intellicreate.online/api
/api/sso/oidc/start?tenant_slug=empresa
→ 302 https://login.microsoftonline.com/.../authorize?code_challenge=...
# 3. IdP devolve callback
GET https://api.intellicreate.online/api
/api/sso/oidc/callback?code=...&state=...
→ 302 https://intellicreate.online/login/sso-complete#token=...
# 4. Frontend extrai token, faz loginConfigure seu IdP apontando o connector SCIM para nossa base URL. Token bearer dedicado por tenant (escopo limitado, distinto de API Key).
# Endpoint base
https://api.intellicreate.online/api
/scim/v2
# Exemplo: criar usuário
curl -X POST https://api.intellicreate.online/api
/scim/v2/Users \
-H "Authorization: Bearer scim_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/scim+json" \
-d '{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"userName": "joao@empresa.com.br",
"name": { "givenName": "João", "familyName": "Silva" },
"active": true,
"title": "Vendedor",
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
"department": "Comercial",
"employeeNumber": "1234"
}
}'Versionamento URI explícito (/v1/...). Paginação cursor-based, idempotency keys, rate limit por API Key. OpenAPI 3.1 spec pública.
| Recurso | Endpoints | Escopos |
|---|---|---|
| Users | GET /v1/users · POST · PATCH · /:id/suspend · /:id/reactivate · /:id/enrollments · /:id/certificates | users:read users:write |
| Courses | GET /v1/courses · /:id · /:id/modules · /:id/stats | courses:read · analytics:read |
| Enrollments | GET /v1/enrollments · POST · POST /bulk (até 1000) | enrollments:read · write · bulk |
| Certificates | GET /v1/certificates · /:id · /verify/:code (público) | certificates:read |
| Webhooks | GET/POST/PATCH/DELETE /v1/webhooks · /deliveries · /test | webhooks:read · write |
# 1. Criar API Key no painel admin (/admin/integrations)
# Você verá o fullKey UMA vez — guarde em vault.
# 2. Fazer requisições
curl https://api.intellicreate.online/api
/v1/users?limit=20 \
-H "Authorization: Bearer ik_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# 3. Criar matrícula em massa (até 1000 por chamada)
curl -X POST https://api.intellicreate.online/api
/v1/enrollments/bulk \
-H "Authorization: Bearer ik_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"enrollments": [
{ "user_id": "uuid", "course_id": "uuid" },
{ "user_id": "uuid", "course_id": "uuid" }
]
}'
# 4. Verificar certificado publicamente (sem auth)
curl https://api.intellicreate.online/api
/v1/certificates/verify/abc123xyz
→ { "verified": true, "certificate": { ... } }Push do nosso lado, validação HMAC-SHA256 do seu. Retry exponencial 7 tentativas (5s→6h), dead-letter queue após 24h, idempotency por delivery_id.
import { createHmac, timingSafeEqual } from "node:crypto";
function verifyWebhook(req, secret) {
const sigHeader = req.headers["x-intellicreate-signature"];
if (!sigHeader) throw new Error("missing signature");
const parts = Object.fromEntries(
sigHeader.split(",").map((p) => p.split("="))
);
const t = parseInt(parts.t, 10);
const v1 = parts.v1;
// Anti-replay: rejeita signatures de mais de 5 min
if (Math.abs(Date.now() / 1000 - t) > 300)
throw new Error("timestamp too old");
const payload = `${t}.${req.rawBody}`;
const expected = createHmac("sha256", secret).update(payload).digest("hex");
if (!timingSafeEqual(Buffer.from(v1), Buffer.from(expected)))
throw new Error("signature mismatch");
return true;
}| Tentativa | Atraso | Total acumulado |
|---|---|---|
| 1 | imediato | 0s |
| 2 | +5s | 5s |
| 3 | +30s | 35s |
| 4 | +2min | 2min 35s |
| 5 | +10min | 12min 35s |
| 6 | +1h | 1h 12min |
| 7 | +6h | 7h 12min |
| DLQ | — | Após 7 falhas → dead-letter, visível no painel |
Para quebrar uma chamada, atacante precisa derrubar pelo menos 3 dessas camadas. Aderência a OWASP API Security Top 10 (2023) e NIST SP 800-63.
TLS 1.2+, HSTS preload, WAF Vercel, rate limit por IP. Ataque básico para de fora.
API Key SHA-256 hash + timingSafeEqual, OAuth JWT HS256, SCIM token dedicado, validação de aud/iss/exp.
scopeGuard recusa requisições sem escopo. tenantGuard recusa acesso cross-tenant. Audit log granular.
Validação Zod, PII masking, idempotency-key, SSRF protection no webhook URL.
Prisma 100% parametrizado (sem SQLi), AES-256-GCM em repouso pra secrets, multi-tenant via tenantId obrigatório.
ActivityLog imutável 24m, métricas por API Key, alertas de anomalia, plantão security@ 24×7.
| Endpoint | Limite | Chave |
|---|---|---|
| /v1/* | 1500 req / 15min | IP |
| /v1/certificates/verify | 60 req / min | IP |
| /scim/v2/* | 1000 req / 15min | IP |
| /oauth/token | 10 req / min | IP + client_id |
| /api/sso/discover | 30 req / min | IP |
| /api/auth/login | 5 req / min | IP + email |
Headers X-RateLimit-Limit, X-RateLimit-Remaining e X-RateLimit-Reset retornados em todas as respostas. Resposta 429 inclui Retry-After.
Swagger UI interativo · OpenAPI 3.1 spec · Exemplos curl/Python · SDK no roadmap.