List identities
Changed onList the non-human identities (NHIs) of the workspace.
The response contains a page of identities and a pagination cursor to retrieve the next page.
Filters that take a list accept comma-separated values. The __nin variant of a filter excludes the identities that match it.
An identity id stays the same while the identity holds the same secrets. When a secret is rotated, or two identities merge, the id can change and the owners set on the previous id are not carried over. Look up the identity again rather than storing its id.
The API token must have the Manager access level or above, or be a service account token.
Request
- Base URLhttps://api.gitguardian.com
- URLhttps://api.gitguardian.com/v1/nhi/identities
- AuthHTTP bearer
Query parameters
Pagination cursor.
Number of items to list per page.
Search on the resource id and display name of the identity, and on the email of its owners.
Sort the results by id. Prefix with - to sort in descending order.
Source types the identity is found in, for example awssecretsmanager or k8s.
Environments of the identity: production, pre-production, staging, testing, development.
Policies the identity breaches: cross_environment, duplicated_secrets, endpoint_secret_high_risk, improper_offboarding, insecure_cloud_deployment_configuration, long_lived_secret, overprivileged_identity, reused_secrets, secret_internally_leaked, secret_publicly_leaked.
Risk criticality of the identity: low, medium, high, critical.
Validity of the identity: valid, invalid, failed_to_check, no_checker, unknown.
Principal types of the identity: no_type, user, service_account, assumable_role, group, application.
Owner ids, as returned by the identity owners endpoints. The value 0 matches the identities without an owner.
Ids of the secrets manager sources that store a secret of the identity. See List sources.
Ids of the consumer sources (k8s, gitlabci, githubactions) that use a secret of the identity.
Ids of the endpoint sources that hold a secret of the identity.
Ids of the provider sources (for example a cloud account) that declare the identity.
Detectors that classify the secrets of the identity. The value Unknown matches the identities without a classification.
Detector types: generic or specific. The value Unknown matches the identities without a classification.
Families that the detectors declare. The value Unknown matches the identities without a classification.
Categories that the detectors declare. The value Unknown matches the identities without a classification.
Providers that the detectors declare. The value Unknown matches the identities without a classification.
Keep only the identities with (true) or without (false) an owner.
Keep only the identities with (true) or without (false) a secret classified by a detector.
Keep only the identities with (true) or without (false) admin-level permissions.
Keep only the identities that hold a secret matching this HasMySecretLeaked hash.
Response
A page of identities.
Example response
[
{
"id": 1234,
"name": "arn:aws:iam::123456789012:user/ci-deployer",
"companies": [
"MongoDB"
],
"detectors": [
{
"name": "aws_iam",
"display_name": "AWS Keys"
}
],
"detector_types": [
"specific"
],
"provider": {
"id": 56,
"type": "awssecretsmanager",
"name": "prod-eu-west-1"
},
"secrets_managers": [
{
"id": 56,
"type": "awssecretsmanager",
"name": "prod-eu-west-1"
}
],
"consumers": [
{
"id": 56,
"type": "awssecretsmanager",
"name": "prod-eu-west-1"
}
],
"endpoints": [
{
"id": 56,
"type": "awssecretsmanager",
"name": "prod-eu-west-1"
}
],
"breached_policies": [
"long_lived_secret"
],
"owners": [
{
"id": 42,
"email": "jane.doe@example.com"
}
],
"validity": "valid"
}
]Changes
- info
endpoint added
- info