id: infoblox
name: Infoblox NIOS
version: 1.0.0
description: "Infoblox NIOS (WAPI) — DNS-layer containment and DDI lookups: block a domain via an RPZ record (DNS sinkhole), list and delete RPZ records, search host records, look up networks, and add A records. HTTP Basic authentication; stdlib-only, no extra Python dependencies."
changelog: "1.0.0 — Initial release: add/list/delete RPZ records, search hosts, get networks, add A record."
category: network

# Per-instance configuration. HTTP Basic auth against the Grid Master WAPI.
config_schema:
  properties:
    base_url:
      type: string
      description: "Grid Master URL (e.g. https://infoblox.example.com)"
    username:
      type: string
      description: "WAPI username"
    password:
      type: string
      description: "WAPI password"
      x-soar-sensitive: true
    wapi_version:
      type: string
      description: "WAPI version (default v2.12)"
      default: "v2.12"
    insecure:
      type: boolean
      description: "Trust any TLS certificate (not secure)"
      default: false
  required:
    - base_url
    - username
    - password

commands:
  - id: add_rpz_domain
    name: infoblox-add-rpz-domain
    description: "Block a domain by adding an RPZ CNAME record (returns NXDOMAIN — DNS sinkhole)."
    inputs_schema:
      properties:
        domain: { type: string, description: "Domain to block (e.g. bad.example.com)" }
        rpz_zone: { type: string, description: "RPZ response-policy zone name (e.g. rpz.local)" }
        view: { type: string, description: "DNS view (default 'default')" }
      required: [domain, rpz_zone]
    outputs_schema: { properties: {} }
  - id: list_rpz_records
    name: infoblox-list-rpz-records
    description: "List RPZ CNAME records (optionally in a specific zone)."
    risk: read
    inputs_schema:
      properties:
        rpz_zone: { type: string, description: "Optional RPZ zone filter" }
        max_results: { type: number, description: "Max records (default 100)" }
      required: []
    outputs_schema: { properties: {} }
  - id: delete_rpz_record
    name: infoblox-delete-rpz-record
    description: "Delete an RPZ record (unblock) by its object reference."
    inputs_schema:
      properties:
        ref: { type: string, description: "WAPI object reference (_ref) of the record" }
      required: [ref]
    outputs_schema: { properties: {} }
  - id: search_host
    name: infoblox-search-host
    description: "Search host records by name (substring match)."
    risk: read
    inputs_schema:
      properties:
        name: { type: string, description: "Host name (or partial)" }
        max_results: { type: number, description: "Max records (default 100)" }
      required: [name]
    outputs_schema: { properties: {} }
  - id: get_network
    name: infoblox-get-network
    description: "Look up networks (optionally filtered by CIDR)."
    risk: read
    inputs_schema:
      properties:
        network: { type: string, description: "Optional network CIDR filter (e.g. 10.0.0.0/24)" }
        max_results: { type: number, description: "Max networks (default 100)" }
      required: []
    outputs_schema: { properties: {} }
  - id: add_a_record
    name: infoblox-add-a-record
    description: "Add a DNS A record."
    inputs_schema:
      properties:
        name: { type: string, description: "FQDN of the record" }
        ipv4addr: { type: string, description: "IPv4 address" }
        view: { type: string, description: "DNS view (default 'default')" }
      required: [name, ipv4addr]
    outputs_schema: { properties: {} }

  - id: test_connection
    name: infoblox-test-connection
    description: "Verify connectivity and credentials (used by the Test button)."
    risk: read
    inputs_schema:
      properties: {}
      required: []
    outputs_schema: { properties: {} }
