-
Notifications
You must be signed in to change notification settings - Fork 1.2k
LDAP: consider blank values as null #11636
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #11636 +/- ##
============================================
- Coverage 16.17% 16.17% -0.01%
Complexity 13297 13297
============================================
Files 5656 5656
Lines 498151 498151
Branches 60441 60441
============================================
- Hits 80588 80586 -2
- Misses 408591 408593 +2
Partials 8972 8972
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@blueorangutan package |
|
@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
sureshanaparti
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes an issue with LDAP authentication by replacing null checks with blank value checks to better handle empty or whitespace-only strings in LDAP configuration values.
- Replaces null checks with
StringUtils.isNotBlank()for string validations - Replaces manual collection size check with
CollectionUtils.isNotEmpty() - Improves handling of blank/empty LDAP configuration values
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...er-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/OpenLdapUserManagerImpl.java
Show resolved
Hide resolved
DaanHoogland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm
|
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 15008 |
|
@blueorangutan package |
|
@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
moving to 4.20.3 milestone |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✖️ debian ✔️ suse15. SL-JID 15015 |
|
@blueorangutan package |
|
@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15086 |
shwstppr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code lgtm
|
@blueorangutan test keepEnv |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-14451)
|
|
It works for the global setting @weizhouapache , but not for the domain level setting, @weizhouapache . You think we should do that as well? |
@DaanHoogland |
No I mean if I empty a domain value it still gets “” instead of null. (as a global value does) i.e. your change only applies on the global level. |
oh, I did not notice where the values come from. |
Yes initially if a domain is given, but with considering override of course. If no domain is passed global is considered. |
I am trying to understand what the problem is. If domain setting is blank or empty, it will be used, but this PR considers it as null. |
I just re-tested it;
So my question is, is this the behaivure we want
I think an empty string should be an empty string. We could put a validation of sorts in place but introducing this inconsistency is not desirable imnsho. |
I agree it would be better to deal with the global settings with default "NULL" |
|
@DaanHoogland @weizhouapache I'm sorry for my late response on this. I am fine with leaving it the way it is. I think this PR #11728 would address this anyways. |
Description
This PR fixes #11570
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?