Private API — implement user-cluster status write

XMLWordPrintableJSON

    • Atlas SQL
    • Not Needed

      Context

      The private status endpoint ApiPrivateSQLInterfaceStatusResource (POST /api/private/nds/groups/{groupId}/clusters/{clusterName}/sqlInterface/status) was scaffolded as a stub in
      SQL-3310 and currently returns NOT_IMPLEMENTED. The original write mechanism — issuing a per-write scoped X.509 certificate (SQL-3308) — has been abandoned; that ticket is closed
      as superseded. We now connect directly to the user's dedicated cluster to write the status marker. This ticket implements the real endpoint behavior under that updated design.

      Scope

      Replace the NOT_IMPLEMENTED stub with the real write:

      • Establish a direct connection from the sql-interface service to the target user's dedicated cluster.
      • Upsert the signed JWT status marker into _sql_interface._sql_status using a timestamp-conditional write (do not overwrite a newer marker).
      • No per-write X.509 certificate issuance.
      • Map the write result to a terminal outcome — DELIVERED / DROPPED / FAILED — and return it to the caller (E11000 / stale-timestamp => DROPPED).
      • Preserve the existing cluster resolution + dedicated/eligibility gating from SQL-3310.

      Open questions

      • How the service authenticates/authorizes the direct connection to the user cluster (credentials, mesh hostnames, network path).
      • Whether the write-result surfacing (n / nModified / upserted) is available on this path.
      • Least-privilege authz role for the endpoint is tracked separately in SQL-3357 (currently reused GLOBAL_BAAS_X509_CERTIFICATE).

      Relationships

      • Called by SQL-3327 (Status Propagation Activity 2); that ticket's write language should be reconciled to match this design.
      • Supersedes the mechanism formerly scoped by SQL-3308.
      • Builds on the scaffold from SQL-3310.

      Acceptance criteria

      • Endpoint performs the conditional write to _sql_interface._sql_status and no longer returns NOT_IMPLEMENTED.
      • Returns the correct terminal outcome for success, stale-timestamp, and failure cases.
      • No X.509 cert is minted on the write path.
      • Unit/integration coverage for the write and outcome mapping.

            Assignee:
            Neal Beeken
            Reporter:
            Jonathan Chemburkar
            Basit Chonka, Jonathan Chemburkar, Natacha Bagnard, Rhys Howell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: