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

Add logging wrappers to LdapService calls #442

Merged
merged 2 commits into from
Feb 6, 2025
Merged

Add logging wrappers to LdapService calls #442

merged 2 commits into from
Feb 6, 2025

Conversation

amcclain
Copy link
Member

@amcclain amcclain commented Feb 5, 2025

No description provided.

- Add log statement for successful auth - we don't expect this to be called often, but if we have it enabled we are prob paying close attention to some auth-related issue - seems helpful to give ourselves more insight as to what's happening with user auth requests.
@@ -192,7 +207,7 @@ class LdapService extends BaseService {
List<T> ret = cache.get(key)
if (ret != null) return ret

withDebug(["Querying LDAP", [host: host, filter: filter]]) {
withTrace(["Querying LDAP", [host: host, filter: filter]]) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the lowest-level query call which will be executed (potentially a number of times) as part of all the higher-level requests. Thinking this makes the most sense to be on trace.

@amcclain
Copy link
Member Author

amcclain commented Feb 5, 2025

Opened as a draft b/c I have not yet run this code, but I would like to get this in with the next release if we can verify. I think the changes should be clear and I did my best to be careful, but always want to be up-front about code that's not yet been run!

(Discussed need for proper Hoist-side LDAP test env on Slack yesterday - can aim to get that done, or fold this into on-prem testing.)

@amcclain amcclain requested review from lbwexler and cnrudd February 5, 2025 16:07
Copy link
Member

@lbwexler lbwexler left a comment

Choose a reason for hiding this comment

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

Looks great -- nice pickup.

@lbwexler
Copy link
Member

lbwexler commented Feb 6, 2025

Merging, we'll test this post merge in the field for sure

@lbwexler lbwexler marked this pull request as ready for review February 6, 2025 20:38
@lbwexler lbwexler merged commit 628c888 into develop Feb 6, 2025
4 checks passed
@lbwexler lbwexler deleted the ldapLogging branch February 6, 2025 20:38
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.

2 participants