Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NTLM auth API missing logs #8448

Merged
merged 6 commits into from
Jan 6, 2025
Merged

Conversation

stgmsa
Copy link
Contributor

@stgmsa stgmsa commented Dec 19, 2024

Description

Fix missing NTLM auth API logs
added several common error cases for easier troubleshooting.

Impacts

  • changed logging handler, from directly using print to built-in logging component.
  • added several hints when specific NTError occurred.

Issue

fixes #8414

Delete branch after merge

YES

Checklist

(REQUIRED) - [yes, no or n/a]

  • [no] Document the feature
  • [no] Add OpenAPI specification
  • [no] Add unit tests
  • [no] Add acceptance tests (TestLink)

Enhancements

added more detailed logs of ntlm-auth-api
added several common NTErrors

Bug Fixes

adds logging module
modify default app logging format
bin/pyntlm_auth/log.py Outdated Show resolved Hide resolved
bin/pyntlm_auth/log.py Show resolved Hide resolved
bin/pyntlm_auth/config_loader.py Show resolved Hide resolved

if None in (c_db_host, c_db_port, c_db_user, c_db_pass, c_db, c_db_unix_socket):
print(f" DB config: Missing settings, NT Key cache will be disabled")
log.warning(f" DB config: Missing settings, NT Key cache will be disabled")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one should be a log.error no?
It will not allow to enable the cache.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similar to the previous one, cache disabled. but still works.
I don't think this is an error or critical scenario.
they will only see the message during ntlm auth api starts.

bin/pyntlm_auth/rpc.py Outdated Show resolved Hide resolved
change several logging levels
@stgmsa stgmsa requested review from satkunas and JeGoi January 2, 2025 16:05
@satkunas satkunas merged commit 0bf9d20 into maintenance/14.0 Jan 6, 2025
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants