Skip to content

Key

KeyBlock pydantic-model

Bases: BindBaseModel

Key block for BIND configuration.

Defines a shared secret key for use with TSIG or the command channel.

Grammar:

key <string> {
    algorithm <string>;
    secret <string>;
};

Show JSON schema:
{
  "description": "Key block for BIND configuration.\n\nDefines a shared secret key for use with TSIG or the command channel.\n\nGrammar:\n```\nkey <string> {\n    algorithm <string>;\n    secret <string>;\n};\n```",
  "properties": {
    "comment": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optional comment for this block",
      "title": "Comment"
    },
    "name": {
      "description": "Key name (server_key)",
      "title": "Name",
      "type": "string"
    },
    "algorithm": {
      "description": "Authentication algorithm",
      "title": "Algorithm",
      "type": "string"
    },
    "secret": {
      "description": "Base64-encoded secret string",
      "title": "Secret",
      "type": "string"
    }
  },
  "required": [
    "name",
    "algorithm",
    "secret"
  ],
  "title": "KeyBlock",
  "type": "object"
}

Fields:

Validators:

name pydantic-field

name: quoted_string_BIND

Key name (server_key)

algorithm pydantic-field

algorithm: string_BIND

Authentication algorithm

secret pydantic-field

secret: quoted_string_BIND

Base64-encoded secret string

validate_algorithm pydantic-validator

validate_algorithm(v: string_BIND) -> string_BIND

Validate algorithm.

validate_secret pydantic-validator

validate_secret(
    v: quoted_string_BIND,
) -> quoted_string_BIND

Validate that the shared secret is valid base64.

named-checkconf rejects a malformed secret with "bad secret".

KeyStoreBlock pydantic-model

Bases: BindBaseModel

Key-store block for BIND configuration.

Configures a DNSSEC key store.

Grammar:

key-store <string> {
    directory <quoted_string>;
    pkcs11-uri <quoted_string>;
};

Show JSON schema:
{
  "description": "Key-store block for BIND configuration.\n\nConfigures a DNSSEC key store.\n\nGrammar:\n```\nkey-store <string> {\n    directory <quoted_string>;\n    pkcs11-uri <quoted_string>;\n};\n```",
  "properties": {
    "comment": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optional comment for this block",
      "title": "Comment"
    },
    "name": {
      "description": "Key store name",
      "title": "Name",
      "type": "string"
    },
    "directory": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Directory for key files",
      "title": "Directory"
    },
    "pkcs11_uri": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "PKCS#11 URI for token storage",
      "title": "Pkcs11 Uri"
    }
  },
  "required": [
    "name"
  ],
  "title": "KeyStoreBlock",
  "type": "object"
}

Fields:

name pydantic-field

name: string_BIND

Key store name

directory pydantic-field

directory: quoted_string_BIND | None = None

Directory for key files

pkcs11_uri pydantic-field

pkcs11_uri: quoted_string_BIND | None = None

PKCS#11 URI for token storage