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

Vault 27392 log ldap warning - remove from warning from response #29134

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

hashiblaum
Copy link
Member

Description

What does this PR do?

This PR removes LDAP warnings from API response when trying to authenticate with LDAP and instead logs them at the Warning log level

JIRA: https://hashicorp.atlassian.net/browse/VAULT-27392

@hashiblaum hashiblaum requested review from a team as code owners December 9, 2024 23:13
@hashiblaum hashiblaum requested a review from digivava December 9, 2024 23:13
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Dec 9, 2024
Copy link

github-actions bot commented Dec 9, 2024

CI Results: failed ❌
Failures:

Test Type Package Test Logs
race builtin/credential/ldap TestBackend_basic_nogroupdn view test results
standard builtin/credential/ldap TestBackend_basic_nogroupdn view test results

Copy link

github-actions bot commented Dec 9, 2024

Build Results:
All builds succeeded! ✅

@hashiblaum hashiblaum force-pushed the VAULT-27392-log-ldap-warning-remove-from-response branch from 75f7930 to cf80b6d Compare December 10, 2024 13:04
@hashiblaum hashiblaum removed the request for review from digivava December 10, 2024 13:07
sdk/logical/events.go Outdated Show resolved Hide resolved
@fairclothjm
Copy link
Contributor

Do we also plan to make the changes to the hashicorp/cap library as mentioned in the Jira?

@hashiblaum
Copy link
Member Author

Do we also plan to make the changes to the hashicorp/cap library as mentioned in the Jira?

@fairclothjm it didn't seem necessary to modify the hashicorp/cap library, which provides the ldap client and returns the slice of warnings, which seems helpful to any consumer of the ldap client. For the requirement to modify how the end user receives the warnings, it appeared that the change was only needed in the LDAP plugin

@fairclothjm
Copy link
Contributor

@hashiblaum Thanks, I see what you mean.

Can we also add a changelog of type change and set the GH Milestone to 1.19.0-rc?

@hashiblaum hashiblaum force-pushed the VAULT-27392-log-ldap-warning-remove-from-response branch from cf80b6d to 147c7c2 Compare December 11, 2024 17:22
@hashiblaum hashiblaum added this to the 1.19.0-rc milestone Dec 11, 2024
@hashiblaum
Copy link
Member Author

@hashiblaum Thanks, I see what you mean.

Can we also add a changelog of type change and set the GH Milestone to 1.19.0-rc?

@fairclothjm thanks, I added the changelog with the type change. Interestingly when using the go-changelog tool it doesn't provide that type to use so I had to do it manually

changelog/29134.txt Outdated Show resolved Hide resolved
Copy link
Contributor

@fairclothjm fairclothjm left a comment

Choose a reason for hiding this comment

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

I took another look at the Jira and we should also remove the AddWarning call on Line 124.

builtin/credential/ldap/backend.go Outdated Show resolved Hide resolved
Co-authored-by: John-Michael Faircloth <fairclothjm@users.noreply.github.com>
@@ -0,0 +1,3 @@
```release-note:change
auth/ldap: No longer return authentication warnings to client. Some debug logs are now logged at the warning log level.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
auth/ldap: No longer return authentication warnings to client. Some debug logs are now logged at the warning log level.
auth/ldap: No longer return authentication warnings to client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants