{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "create_ipsec_identity",
  "type": "object",
  "properties": {
    "peer": {
      "type": "string",
      "description": "Peer name this identity authenticates"
    },
    "auth_method": {
      "default": "pre-shared-key",
      "description": "Authentication method",
      "type": "string",
      "enum": ["pre-shared-key", "rsa-signature", "digital-signature", "eap", "eap-radius"]
    },
    "secret": {
      "description": "Pre-shared key secret",
      "type": "string"
    },
    "my_id": {
      "type": "string"
    },
    "remote_id": {
      "type": "string"
    },
    "match_by": {
      "description": "How the remote peer is matched to this identity",
      "type": "string",
      "enum": ["remote-id", "certificate"]
    },
    "generate_policy": {
      "type": "string",
      "enum": ["no", "port-override", "port-strict"]
    },
    "mode_config": {
      "type": "string"
    },
    "policy_template_group": {
      "type": "string"
    },
    "certificate": {
      "type": "string"
    },
    "remote_certificate": {
      "description": "Remote peer's certificate name (rsa/digital-signature auth)",
      "type": "string"
    },
    "eap_methods": {
      "description": "EAP method(s), e.g. 'eap-tls' (eap auth)",
      "type": "string"
    },
    "notrack_chain": {
      "description": "Raw firewall chain to bypass connection tracking for matched traffic",
      "type": "string"
    },
    "comment": {
      "type": "string"
    },
    "disabled": {
      "default": false,
      "type": "boolean"
    }
  },
  "required": ["peer", "auth_method", "disabled"],
  "additionalProperties": false
}
