egberts / bind9_parser

Bind9 Parser in Python that can process all of ISC Bind configuration files
MIT License
22 stars 7 forks source link

TSIG keys not handled correctly #48

Closed stephan2012 closed 2 years ago

stephan2012 commented 2 years ago

bind9_parser seems to not parse multiple TSIG keys correctly. The configuration

key "ansible" {
        algorithm hmac-sha256;
        secret "redacted_key_1";
};

key "externaldns" {
        algorithm hmac-sha256;
        secret "redacted_key_2";
};

results in

  "key": [
    {
      "algorithm": "hmac-sha256",
      "key_id": "\"externaldns\"",
      "secret": "redacted_key_2"
    }
  ],

for result.asDict()

So, the first key statement is missing.

stephan2012 commented 2 years ago

/assign