Project

General

Profile

Task #2337

Update NTLM libraries

Added by Luke Murphey about 6 years ago. Updated almost 3 years ago.

Status:
In Progress
Priority:
Normal
Assignee:
Target version:
Start date:
12/15/2021
Due date:
% Done:

100%



Subtasks

Task #2874: Try new libraries in LinuxClosed

Task #2875: See if Py2 still worksClosedLuke Murphey

History

#2 Updated by Luke Murphey about 6 years ago

#3 Updated by Luke Murphey over 5 years ago

  • Target version deleted (2.7.5)

#4 Updated by Luke Murphey about 3 years ago

https://github.com/requests/requests-ntlm/releases (1.1.0)
  • requests>=2.0.0
  • ntlm-auth>=1.0.2
  • cryptography>=1.3
  • flask
  • pytest
  • pytest-cov
  • wheel

https://github.com/jborean93/ntlm-auth/releases (1.5.0)

#5 Updated by Luke Murphey about 3 years ago

The tests don't work when under website_monitoring_app.

I moved it to bin and then got this error:

test.run_unit:
     [exec] Traceback (most recent call last):
     [exec]   File "unit.py", line 13, in <module>
     [exec]     from web_ping import URLField, DurationField, WebPing, NTLMAuthenticationValueException
     [exec]   File "../src/bin/web_ping.py", line 30, in <module>
     [exec]     from website_monitoring_app.requests_ntlm import HttpNtlmAuth
     [exec]   File "../src/bin/website_monitoring_app/requests_ntlm/__init__.py", line 1, in <module>
     [exec]     from .requests_ntlm import HttpNtlmAuth
     [exec]   File "../src/bin/website_monitoring_app/requests_ntlm/requests_ntlm.py", line 5, in <module>
     [exec]     from cryptography import x509
     [exec]   File "../src/bin/cryptography/x509/__init__.py", line 6, in <module>
     [exec]     from cryptography.x509 import certificate_transparency
     [exec]   File "../src/bin/cryptography/x509/certificate_transparency.py", line 10, in <module>
     [exec]     from cryptography.hazmat.bindings._rust import x509 as rust_x509
     [exec] ImportError: dlopen(../src/bin/cryptography/hazmat/bindings/_rust.abi3.so, 2): no suitable image found.  Did find:
     [exec]     file system relative paths not allowed in hardened programs

#6 Updated by Luke Murphey about 3 years ago

Splunk doesn't include cryptography:

>>> import cryptography
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'cryptography'

#7 Updated by Luke Murphey about 3 years ago

It works on the venv version of Python.

#8 Updated by Luke Murphey about 3 years ago

Linux fails too: fails to load the library saying "invalid ELF header".

I bet this is because I built this on Mac.

#9 Updated by Luke Murphey about 3 years ago

Another error:

module not found setuptools_rust

https://github.com/MISP/misp-docker/issues/113

I installed pip, then installed:

pip install setuptools-rust

I got a syntax error.

#10 Updated by Luke Murphey about 3 years ago

This is clearly not working in VirtualBox. I'm giving up on it.

#11 Updated by Luke Murphey almost 3 years ago

I have the test passing with the libraries. Some caveats:

  • I might be able to remove duplicates of some libraries which had to be moved:
    • cryptography which had to be moved up to /bin
    • ntlm_auth which had to be moved up to /bin
    • urllib3 from website_monitoring to requests/packages/urllib3
  • There are two failures and one error; but these are likely due to the test infrastructure not being present
  • requests/packages already had several libraries:
    • urllib3 (replaced with the new one)
    • chardet (kept the existing one)
    • idna (now present in both requests/packages and in the website_monitoring directory)
  • I also kept the init.py in the requests/packages in case it is still needed

#12 Updated by Luke Murphey almost 3 years ago

App runs successfully.

#13 Updated by Luke Murphey almost 3 years ago

  • Status changed from New to In Progress

#14 Updated by Luke Murphey almost 3 years ago

  • Target version set to 2.9.5

Also available in: Atom PDF