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

Merged
merged 10 commits into from
Jan 7, 2025

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:
All Go tests succeeded! ✅

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
@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

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.

Co-authored-by: John-Michael Faircloth <fairclothjm@users.noreply.github.com>
Co-authored-by: John-Michael Faircloth <fairclothjm@users.noreply.github.com>
fairclothjm
fairclothjm previously approved these changes Jan 2, 2025
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.

LGTM!

@fairclothjm
Copy link
Contributor

Looks like a failing test?

=== FAIL: builtin/credential/ldap TestBackend_basic_nogroupdn (3.93s)
...
    testing.go:367: Failed step 5: expected a warning due to no group dn, got: []string(nil)
...

https://github.com/hashicorp/vault/actions/runs/12657568986/job/35272697843?pr=29134

@hashiblaum hashiblaum force-pushed the VAULT-27392-log-ldap-warning-remove-from-response branch from 7027537 to b2b1aab Compare January 7, 2025 21:18
@hashicorp hashicorp deleted a comment from hashicorp-cla-app bot Jan 7, 2025
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.

LGTM!

@hashiblaum hashiblaum merged commit f188016 into main Jan 7, 2025
91 of 92 checks passed
@hashiblaum hashiblaum deleted the VAULT-27392-log-ldap-warning-remove-from-response branch January 7, 2025 21:51
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