GSS-TSIG

100 views
Skip to first unread message

D S

unread,
Sep 28, 2021, 6:31:40 PM9/28/21
to dnspython-users
With the following example:

Looks like I'm having issues getting a completed security context

At this point:
response = dns.query.tcp(tkey_query,'x.x.x.x',timeout=10,port=53)

In the traceback seeing the following: 
dns.tsig.BadSignature: The TSIG signature fails to verify.
  File "gssapi/raw/message.pyx", line 135, in gssapi.raw.message.verify_mic
gssapi.raw.exceptions.MissingContextError: Major (524288): No context has been established, Minor (39756039): Attempt to use incomplete security context

From the comments from the example author, it looks like changes were required in messages.py for the example to work at the time of its writing.  Has anybody been able to get this functioning/have a working sample?

Bob Halley

unread,
Sep 28, 2021, 8:56:28 PM9/28/21
to dnspython-users
It looks like the (apparently obsolete) example code is expecting message.py to do some magic stepping but clearly the last step hasn't happened as you are getting an "Attempt to use incomplete security context"  error.  Rereading more of the giant thread I believe the message.py patch got replaced by passing a dns.tsig.GSSTsigAdapter as the keyring calling dns.message.from_wire().  This will automatically cause the final GSS step before TSIG validation happens.   I'm not sure how this works in client code, and alas I still can't test anything as I don't have a test environment for GSS-TSIG.

D S

unread,
Sep 29, 2021, 3:22:00 PM9/29/21
to dnspython-users
Does this warrant creating an issue/bug in the Github project?  Currently testing with the master branch.

Bob Halley

unread,
Oct 1, 2021, 5:04:18 PM10/1/21
to dnspython-users
Yes, it would be good to have a working client implementation in the library so people didn't have to figure out how to do the TKEY setup themselves.  So, I'm ok with opening an issue for it, but I will mark it as Author Needed as the dnspython maintainers don't have any way to test GSS-TSIG code against a Windows server.   I'd also say that getting that testing ability is essential to progress.
Reply all
Reply to author
Forward
0 new messages