{
  "schema_version": "geoclosure-doc06g-service-identity/1",
  "project_code": "ACOBAMBA-COLQUI",
  "research_date_lima": "2026-10-28",
  "previous_phase": {
    "doc06f_curated_rows": 4,
    "node_tests": 15,
    "scope": "curated paraphrases of procedures; no full text, no GPT"
  },
  "service_role": {
    "name": "geoclosure_doc06g_service",
    "creation_method": "SQL CREATE ROLE",
    "pg_login_attribute": true,
    "password_managed": false,
    "can_authenticate_with_neon_connector": false,
    "postgres_options": {
      "noinherit": true,
      "superuser": false,
      "create_role": false,
      "create_db": false,
      "replication": false,
      "bypass_rls": false
    },
    "membership": {
      "granted": "geoclosure_doc06f_reader",
      "can_SET_ROLE": true,
      "inherit_granted_role": false
    },
    "direct_private_schema_USAGE": false,
    "direct_private_chunks_SELECT": false,
    "direct_private_row_table_SELECT": false,
    "direct_private_function_EXECUTE": false,
    "target_restricted_role_can_execute_curated_function": true
  },
  "unsafe_trial": {
    "method": "Neon API create_postgres_role",
    "role": "geoclosure_doc06g_app",
    "unexpected_privileges_found": [
      "neon_superuser member",
      "CREATEROLE",
      "CREATEDB",
      "REPLICATION",
      "BYPASSRLS"
    ],
    "immediate_action": "deleted test role using Neon API",
    "verified_role_absent": true,
    "no_credentials_published": true
  },
  "verification": {
    "sql_isolation_checks": {
      "passed": 15,
      "total": 15
    },
    "sqlite_or_rag": false,
    "node_identity_guard": {
      "passed": 5,
      "total": 5,
      "node_version": "22.16.0",
      "source_git_blob": "55e069f88c1635fad01e151f3ad6b7f9fa7766eb",
      "tests_git_blob": "9d6bd779ea6703de6bf56d4c6474f588562d5c03"
    },
    "updated_server_git_blob": "472471dd95b2258db29c23150bc6abc8ca231eb5",
    "tested_connection_as_service": {
      "attempted": true,
      "succeeded": false,
      "observed_error": "missing authentication credentials: required password"
    },
    "sensitive_tables_exposed": false,
    "actual_service_login_to_select_curated_function_tested": false
  },
  "files": {
    "server": "services/doc06f/server.mjs",
    "guard": "services/doc06g/identity-guard.mjs",
    "tests": "tests/doc06g-identity-guard.test.mjs",
    "sql": "sql/doc06g-service-isolation.sql"
  },
  "audit_event_id": 10,
  "operational": {
    "service_backend_deployed": false,
    "public_api_modified": false,
    "llm_enabled": false,
    "model_api_calls": 0,
    "source_pdf_published": false,
    "new_field_observations": 0,
    "compliance_certified": false,
    "status": "NO_DEPLOY"
  },
  "next_actions": [
    "Provision SQL-created restricted role with a strong password through an appropriately privileged Neon SQL Editor workflow or create a fresh non-admin SQL role with password at creation",
    "Never give password in chat, GitHub commits, CLI output, or frontend; store only in private backend environment",
    "Check actual session_user and current_user before/after SET LOCAL ROLE; verify denied direct table SELECT under true login",
    "Then test Node backend locally against Neon with dedicated login, still with GPT disabled"
  ],
  "warning": "A role possessing LOGIN flag without a stored password does not constitute an authenticated service identity."
}
