NHI Identities

List the locations of an identity

Changed on

List the places that hold a secret of a non-human identity: the paths in secrets managers, the resources of consumers such as Kubernetes clusters or CI systems, the endpoints, and the provider accounts. The response has one entry for each latest version of a resource.

The response contains a page of locations and a pagination cursor to retrieve the next page. The locations are sorted by id.

This endpoint is available when the workspace has full NHI governance.

The API token must have the Manager access level or above, or be a service account token.

get/v1/nhi/identities/{identity_id}/locations

Request

  • Base URL
    https://api.gitguardian.com
  • URL
    https://api.gitguardian.com/v1/nhi/identities/{identity_id}/locations
  • Auth
    HTTP bearer

Path parameters

identity_idinteger required

The id of the non-human identity

Query parameters

cursorstring

Pagination cursor.

per_pageinteger

Number of items to list per page.

Response

A page of locations.

kind'secrets_manager' | 'consumer' | 'endpoint' | 'provider' required

Role of the source that holds the secret.

resource_idstring required

Path or identifier of the resource in the source.

display_namestring required
resource_versionstring required

Latest version of the resource. It changes with each new version.

environment'production' | 'pre-production' | 'staging' | 'testing' | 'development' | 'null' nullable

Environment of the location, inferred from its metadata or declared by its source.

validity'valid' | 'invalid' | 'failed_to_check' | 'no_checker' | 'unknown' required

Validity of the secret at this location.

last_used_atstring date-time nullable

Example response

[
  {
    "source": {
      "id": 56,
      "type": "awssecretsmanager",
      "name": "prod-eu-west-1"
    },
    "resource_id": "secret/data/payments/db",
    "resource_version": "3",
    "validity": "valid"
  }
]

Changes