{"ok":true,"service":"gestaowhats-api-contabo","db":"gestaowhats","ts":"2026-11-23T18:33:29.702Z","auth_users":1,"auth_schema":"auth.users","auth":true,"evolution":{"configured":true,"reachable":true,"status":200},"storage":{"configured":true,"reachable":true,"bucket":"chat-media","exists":true},"security":{"rate_limit_enabled":true,"rate_limit_store":"memory","rate_limit_on_store_error":"fail_open","app_rls_mode":"off","db_role_mode":"legacy","db_role_config":{"mode":"legacy","note":"single_pool_elevated_default_cand2_compat","app_role":null,"migrate_role":null,"ingress_role":null,"dual":false,"segregated":false,"commercial_safe_default":true},"flow_privilege_examples":{"chat_data":"app_least_privilege","webhook":"ingress_system","create_tenant":"admin_elevated","migrate":"migrate"},"evolution_webhook_auth_mode":"legacy_compat","evolution_webhook_secret_configured":false,"evolution_webhook_enforced_ready":false,"controls_fingerprint":"2d3443463f835a55","residual_bypassrls":"pool_elevated_default_legacy","sc25_with_app_rls_handlers":["handleFnChatDataBypass"],"sc25_authz_gate":"enforceTenantAuthz","sc25_elevated_policies":["ingress_webhook","admin_provisioning","public_unauthenticated","schema_bootstrap","scheduled_internal"],"sc25_handler_protection_sample":{"tenant_info":{"handler":"handleFnTenantInfo","protection":"tenant_user_jwt","jwt_user":true,"identity":"profile_tenant_authz"},"create_tenant":{"handler":"handleFnCreateTenant","protection":"admin_provisioning","jwt_user":"conditional","identity":"elevated_admin_or_api_key"},"site_contact":{"handler":"handleFnSiteSendContactEmail","protection":"public_unauthenticated","jwt_user":false,"identity":"public_form_or_token_or_signed_url"},"webhook":{"handler":"processEvolutionWebhook","protection":"ingress_webhook","jwt_user":false,"identity":"instance_map_or_provider_secret"}},"sc25_pool_routing":{"tenant":"admin","ingress":"admin","migrate":"admin","helpers_bound":true},"sc25_five_tables_plan":{"source":"auditoria-real-20261109","commercial_apply":false,"principle":"preserve_backups_deny_by_default_least_privilege","tables":[{"table":"ai_alerts","function":"operational_alerts","recommended":"enable_rls_tenant_or_service_policy","notes":"Se tiver tenant_id: policy por tenant para gw_app. Se global ops: REVOKE de roles app; só gw_admin/ingress.","class":"ops_or_tenant_alert","actions":["If tenant_id present: ENABLE RLS + policy tenant for gw_app","Else: REVOKE FROM gw_app; admin-only"],"apply_in_commercial":"requires_GO_migration"},{"table":"miria_storage_backups","function":"backup_artifact","recommended":"no_app_grants_keep_as_backup","notes":"NÃO apagar. NÃO aplicar policy indiscriminada que force app a ver backups. REVOKE ALL FROM gw_app/gw_ingress; acesso só admin/ops.","class":"backup_artifact","actions":["REVOKE ALL ON TABLE FROM gw_app, gw_ingress, PUBLIC","GRANT SELECT ON TABLE TO gw_admin (ops only)","DO NOT DROP / DO NOT truncate in modernization","ENABLE RLS optional only with deny-all for non-admin"],"apply_in_commercial":"requires_GO_migration"},{"table":"storage_backups_dated","function":"backup_artifact","recommended":"no_app_grants_keep_as_backup","notes":"Idem miria_storage_backups — preservação obrigatória; privilégio mínimo ops.","class":"backup_artifact","actions":["REVOKE ALL ON TABLE FROM gw_app, gw_ingress, PUBLIC","GRANT SELECT ON TABLE TO gw_admin (ops only)","DO NOT DROP / DO NOT truncate in modernization","ENABLE RLS optional only with deny-all for non-admin"],"apply_in_commercial":"requires_GO_migration"},{"table":"gw_parallel_webhook_events","function":"ingress_idempotency","recommended":"enable_rls_or_revoke_app_select","notes":"Tabela de idempotência webhook. Preferir: GRANT só gw_ingress/gw_admin; gw_app sem SELECT. Opcional RLS por connection/tenant se coluna existir.","class":"ingress_idempotency","actions":["REVOKE FROM gw_app","GRANT INSERT,SELECT,UPDATE TO gw_ingress, gw_admin","Optional: ENABLE ROW LEVEL SECURITY + policy by tenant_id/connection_id if columns exist"],"apply_in_commercial":"requires_GO_migration"},{"table":"ai_alerts_legacy_alias","function":"unknown_or_variant","recommended":"inventory_confirm_name","notes":"Nome canônico na evidência comercial pode variar (ai_alerts + backups miria/storage + gw_parallel_webhook_events). Confirmar lista viva antes de migration GO.","class":"ops_or_tenant_alert","actions":["If tenant_id present: ENABLE RLS + policy tenant for gw_app","Else: REVOKE FROM gw_app; admin-only"],"apply_in_commercial":"requires_GO_migration"}]},"rate_limit_activation":"memory_default_set_GW_RATE_LIMIT_STORE_postgres_for_shared","security_center":{"version":"1.0.0-draft","product":"gestaowhats-luntrio","evidence_types":["control_matrix_snapshot","suite_result","config_fingerprint","role_attribute_audit","rate_limit_health","webhook_auth_mode","incident_signal","deploy_gate_status"],"event_types":["authz_denied","webhook_rejected","rate_limit_exceeded","rls_context_failed","dependency_alert","backup_verify_result","rollback_executed"],"integration_status":"prepared_not_connected","privacy":"minimize_redact_deny_sensitive_keys"},"runtime_plane":"contabo","supabase_runtime":false,"commercial_activation_ready":false,"security_center_readiness":{"contract_version":"1.0.0-draft","product":"gestaowhats-luntrio","kind":"evidence","type":"config_fingerprint","emitted_at":"2026-11-23T18:33:29.907Z","control_ids":["SC-17","SC-21","SC-25","SC-33","SC-35"],"summary":{"ready_for_integration":false,"reason":"contract_prepared_integration_not_authorized","db_role_mode":"legacy","rate_limit_store":"memory","webhook_auth_mode":"legacy_compat","commercial_activation_ready":false,"controls_fingerprint":"2d3443463f835a55"},"suite":null,"integration":{"mode":"contract_only","transport":"none","operational_dependency":false,"note":"Do not POST until Security Center GO"}}}}