Skip to content

Feature: get attestation info of an agent #169

@think-in-universe

Description

@think-in-universe

Requirements

Update https://private.near.ai/attestation/report to return attestation data of a specific agent.

Add a new optional query parameter agent (with agent instance ID) that will add the agent_attestations data received from compose-api into the response. Use plural agent_attestations in case we may need to return attestations of multiple agents in a single response in future iterations.

Example request and response:

Request

https://private.near.ai/v1/attestation/report?agent=a28bd4af-f416-4c48-9229-7847f82d0707&nonce=af09d2d91a094db38c1afaaa354b919363225ebef2180d6596adf8f3e1624435

Response

{
  "chat_api_gateway_attestation": {
    "event_log": "string",
    "info": "string",
    "intel_quote": "string",
    "request_nonce": "string",
    "signing_address": "string",
    "signing_algo": "string",
    "vpc": null
  },
  "cloud_api_gateway_attestation": {
    "event_log": "string",
    "info": "string",
    "intel_quote": "string",
    "request_nonce": "string",
    "signing_address": "string",
    "signing_algo": "string",
    "vpc": null
  },
  "agent_attestations": [{
    "name": "string",
    "image_digest": "string",
    "event_log": "string",
    "info": "string",       // still missing
    "intel_quote": "string",
    "request_nonce": "string",     // still missing
    "tls_certificate": "string",
    "tls_certificate_fingerprint": "string",
  }]
}

How to Fetch Data

We need event_log, quote, tls_certificate and tls_certificate_fingerprint from https://api.agent0.near.ai/docs#tag/attestation/GET/attestation/report . (Convert quote to intel_quote in agent_attestations)

{
  "event_log": "string",
  "quote": "string",
  "report_data": "string",
  "tls_certificate": "string",
  "tls_certificate_fingerprint": "string",
  "vm_config": "string"
}

We need image_digest and name from https://api.agent0.near.ai/docs#tag/attestation/GET/instances/{name}/attestation

{
  "image_digest": null,
  "name": "string"
}

Missing Data and Parameters

  1. Return info (TCB info) in the result of https://api.agent0.near.ai/docs#tag/attestation/GET/attestation/report
  2. The endpoint https://api.agent0.near.ai/docs#tag/attestation/GET/attestation/report should accept a nonce query parameter to avoid replay attack, and include the nonce into the report data.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions