{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "#NHI",
    "description": "A non-human identity (NHI) — any digital identity that is not a person, such as a service account, machine credential, secret, OAuth app, bot, certificate, API key, webhook, or CI/CD identity. NHIs are typically used by software, automation, or workloads to access systems and services.",
    "type": "object",
    "allOf": [
        {
            "$ref": "#Entity"
        },
        {
            "properties": {
                "nhiType": {
                    "description": "The category of non-human identity.",
                    "type": "string",
                    "enum": [
                        "service_account",
                        "credential",
                        "secret",
                        "oauth_app",
                        "bot",
                        "certificate",
                        "api_key",
                        "webhook",
                        "ci_cd_identity",
                        "service_linked_role",
                        "service_role",
                        "workload_identity",
                        "ci_cd_role",
                        "cross_account_role",
                        "sso_role",
                        "federated_role",
                        "iam_role"
                    ]
                },
                "isAi": {
                    "description": "Whether this NHI is associated with an AI agent, model, or AI-powered workload.",
                    "type": "boolean"
                },
                "aiConfidence": {
                    "description": "Confidence that this NHI is AI-related. 'confirmed' = signed evidence; 'high'/'medium'/'low' = heuristic strength.",
                    "type": "string",
                    "enum": ["confirmed", "high", "medium", "low"]
                },
                "aiPlatform": {
                    "description": "The AI platform or vendor this NHI belongs to (e.g. 'openai', 'anthropic', 'google-vertex'). Open string — new platforms appear constantly.",
                    "type": "string"
                },
                "owner": {
                    "description": "Identifier of the human or team responsible for this NHI (e.g. email, team handle, employee ID). Free-form string — owner-resolution conventions are integration-specific.",
                    "type": "string"
                },
                "nhiOwnerStatus": {
                    "description": "Ownership state used by governance triage workflows.",
                    "type": "string",
                    "enum": ["assigned", "unassigned", "orphaned"]
                }
            },
            "required": []
        }
    ]
}
