Commit 28ef3a6
[AAP-48822] Add default LDAP connection options to match documentation (#785)
## Description
This PR extends the work done in PR #756 by improving how LDAP
connection options are handled in the UI while maintaining the default
`OPT_REFERRALS` connection option functionality.
https://issues.redhat.com/browse/AAP-48822
**Building on PR #756:**
PR #756 added the default LDAP connection options that our documentation
says we have, specifically setting `OPT_REFERRALS` that was previously
missing. This PR continues that work by addressing the UI experience.
- What is being changed?
- Changed the default value of CONNECTION_OPTIONS field from
`default_connection_options` to an empty dict `{}`
- Updated backend logic to merge the default `OPT_REFERRALS` setting
with user-provided options when CONNECTION_OPTIONS is empty or not a
dict
- Builds upon the default `OPT_REFERRALS` connection option established
in PR #756
- Why is this change needed?
- While PR #756 correctly established the default `OPT_REFERRALS`
option, users should not be forced to see this default pre-populated in
the UI configuration form
- How does this change address the issue?
- UI now shows empty CONNECTION_OPTIONS field by default (cleaner user
experience)
- Backend properly merges the default `OPT_REFERRALS` setting with any
user-provided options
- Maintains backward compatibility with existing configurations
- Preserves the `OPT_REFERRALS` default connection option functionality
from PR #756
## Type of Change
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] Documentation update
- [ ] Test update
- [ ] Refactoring (no functional changes)
- [ ] Development environment change
- [ ] Configuration change
## Self-Review Checklist
- [x] I have performed a self-review of my code
- [x] I have added relevant comments to complex code sections
- [ ] I have updated documentation where needed
- [x] I have considered the security impact of these changes
- [x] I have considered performance implications
- [x] I have thought about error handling and edge cases
- [x] I have tested the changes in my local environment
## Testing Instructions
### Prerequisites
- LDAP authenticator configuration environment
### Steps to Test
1. Add some debugger or logger to monitor the final value of the
`connection_options` variable
2. Run the `test_ldap_config_defaults` ATF test and put a breakpoint
before its teardown, this will setup a valid LDAP server into your AAP
3. Check the value of the `connection_options`, which must contain the
expected defaults
### Expected Results
- The `connection_options` must always have the `OPT_REFERRALS` key
- The default values must be used if the user didn't provide a different
one
## Additional Context
This PR is a continuation of the LDAP connection options work:
1. **PR #756**: Established the missing default LDAP connection options
that match our documentation
2. **This PR (#785)**: Improves the UI experience by not forcing the
`OPT_REFERRALS` default to be visible in the form while maintaining all
the backend functionality
The combination of both PRs provides the complete solution: proper
`OPT_REFERRALS` default that matches documentation + clean UI
experience.
### Required Actions
- [ ] Requires documentation updates
- [ ] Requires downstream repository changes
- [ ] Requires infrastructure/deployment changes
- [ ] Requires coordination with other teams
---------
Co-authored-by: Pablo Hess <[email protected]>
Co-authored-by: John Westcott IV <[email protected]>1 parent cb33897 commit 28ef3a6
File tree
2 files changed
+125
-1
lines changed- ansible_base/authentication/authenticator_plugins
- test_app/tests/authentication/authenticator_plugins
2 files changed
+125
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
434 | 435 | | |
435 | 436 | | |
436 | 437 | | |
437 | | - | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
438 | 446 | | |
439 | 447 | | |
440 | 448 | | |
| |||
Lines changed: 116 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
771 | 772 | | |
772 | 773 | | |
773 | 774 | | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
0 commit comments