jborean93 / pyspnego

Python SPNEGO authentication library
MIT License
52 stars 11 forks source link

Add support for DCE style authentication. #63

Closed jborean93 closed 1 year ago

jborean93 commented 1 year ago

Adds support for DCE style authentication that is used by protocols like RPC. DCE style authentication changes some behaviour about an authentication protocol, e.g. Kerberos has an extra leg, and some wrapping behaviour changes. This PR also adjusts the underlying behaviour of spnego.iov.BufferType.sign_only on SSPI to represent the buffer type of SECBUFFER_DATA | SECBUFFER_READONLY_WITH_CHECKSUM rather than SECBUFFER_MECHLIST. This aligns the behaviour with GSSAPI and the use of SECBUFFER_MECHLIST is most likely an internal flag rather than something used publicly.

codecov[bot] commented 1 year ago

Codecov Report

Merging #63 (2f32a2d) into main (95d9878) will increase coverage by 1.46%. The diff coverage is 93.52%.

:exclamation: Current head 2f32a2d differs from pull request most recent head 459d020. Consider uploading reports for the commit 459d020 to get more accurate results

@@            Coverage Diff             @@
##             main      #63      +/-   ##
==========================================
+ Coverage   98.30%   99.77%   +1.46%     
==========================================
  Files          31       31              
  Lines        5262     5387     +125     
==========================================
+ Hits         5173     5375     +202     
+ Misses         89       12      -77     
Flag Coverage Δ
99.77% <93.52%> (+1.46%) :arrow_up:
py3.10 99.77% <93.52%> (+1.46%) :arrow_up:
py3.11 99.77% <93.52%> (+1.46%) :arrow_up:
py3.7 99.77% <93.52%> (+1.46%) :arrow_up:
py3.8 99.77% <93.52%> (+1.46%) :arrow_up:
py3.9 99.77% <93.52%> (+1.46%) :arrow_up:
x64 99.77% <93.52%> (+1.46%) :arrow_up:
x86 95.67% <88.48%> (+1.47%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/spnego/_credssp.py 99.03% <50.00%> (-0.97%) :arrow_down:
src/spnego/_gss.py 98.94% <75.00%> (-1.06%) :arrow_down:
src/spnego/_negotiate.py 99.57% <83.33%> (-0.43%) :arrow_down:
src/spnego/_sspi.py 99.59% <94.11%> (-0.41%) :arrow_down:
src/spnego/_ntlm.py 99.76% <98.83%> (-0.24%) :arrow_down:
src/spnego/_context.py 99.49% <100.00%> (-0.51%) :arrow_down:
src/spnego/_ntlm_raw/security.py 100.00% <100.00%> (ø)
src/spnego/_version.py 100.00% <100.00%> (ø)
src/spnego/iov.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes