Commit d91b363
[MINOR] Address review feedback on LDAP escaping changes
- Apply RFC 4515 escaping to the matching-rule-in-chain filter site
(groupObjectClass, memberAttribute, userDn) — previously this branch
used String.format with no escape on values that may include parts of
the principal once group membership is resolved through the chain.
- Preserve the bare-placeholder DN template behaviour: when
userDnTemplate is exactly "{0}", treat the principal as a full DN
supplied verbatim rather than running RFC 4514 escape on it. Escaping
collapsed comma-separated DNs into a single RDN value and broke binds
for deployments that rely on full-DN principals.
- Stop applying RFC 4514 escape inside setUserSearchFilter and
setGroupSearchFilter. The values are operator-supplied filter
templates; the placeholder substitution itself is the only place that
needs escaping, and that already happens at expandFilterTemplate time.
- Update LdapRealmTest expectations to reflect the verbatim template
storage and the bare-placeholder passthrough.
- Switch the second-call-site coverage in
ActiveDirectoryGroupRealmFilterInjectionTest to actually invoke
getRoleNamesForUser via reflection rather than re-running
searchForUserName.
- Drop the unused assertFalse imports flagged by Checkstyle and replace
the raw NUL byte in LdapRealmDnInjectionTest with the Java escape
sequence to keep the source file plain text.
- Tighten the inline comment on the bare-placeholder branch and remove
'=' from the expandDnTemplate Javadoc since RFC 4514 does not require
escaping '=' inside an attribute value.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 5156af1 commit d91b363
5 files changed
Lines changed: 33 additions & 29 deletions
File tree
- zeppelin-server/src
- main/java/org/apache/zeppelin/realm
- test/java/org/apache/zeppelin/realm
Lines changed: 15 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
366 | | - | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
367 | 370 | | |
368 | 371 | | |
369 | 372 | | |
| |||
774 | 777 | | |
775 | 778 | | |
776 | 779 | | |
777 | | - | |
| 780 | + | |
778 | 781 | | |
779 | 782 | | |
780 | 783 | | |
781 | 784 | | |
782 | 785 | | |
783 | 786 | | |
784 | 787 | | |
785 | | - | |
| 788 | + | |
786 | 789 | | |
787 | 790 | | |
788 | 791 | | |
| |||
887 | 890 | | |
888 | 891 | | |
889 | 892 | | |
890 | | - | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
891 | 900 | | |
892 | 901 | | |
893 | 902 | | |
| |||
1045 | 1054 | | |
1046 | 1055 | | |
1047 | 1056 | | |
1048 | | - | |
1049 | | - | |
| 1057 | + | |
| 1058 | + | |
1050 | 1059 | | |
1051 | 1060 | | |
1052 | 1061 | | |
| |||
Lines changed: 9 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
79 | 78 | | |
80 | 79 | | |
81 | 80 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
87 | 84 | | |
88 | 85 | | |
89 | 86 | | |
90 | 87 | | |
91 | 88 | | |
92 | 89 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
| 90 | + | |
101 | 91 | | |
102 | 92 | | |
103 | | - | |
104 | | - | |
105 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
106 | 98 | | |
107 | 99 | | |
108 | 100 | | |
| |||
Binary file not shown.
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
Lines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
52 | 53 | | |
53 | | - | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
130 | 134 | | |
131 | | - | |
| 135 | + | |
132 | 136 | | |
133 | | - | |
| 137 | + | |
134 | 138 | | |
135 | 139 | | |
136 | 140 | | |
| |||
0 commit comments