Skip to content

Commit 0cf6805

Browse files
committed
Ref #30071: make groups upper-cased
1 parent 9433170 commit 0cf6805

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/eu/openanalytics/containerproxy/auth/impl/SimpleAuthenticationBackend.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,15 @@ private SimpleUser loadUser(int index) {
7979
// method 1: single property with comma seperated groups
8080
String[] groups = environment.getProperty(String.format("proxy.users[%d].groups", index), String[].class);
8181
if (groups != null) {
82+
groups = Arrays.stream(groups).map(String::toUpperCase).toArray(String[]::new);
8283
return new SimpleUser(userName, password, groups);
8384
} else {
8485
// method 2: YAML array
8586
List<String> groupsList = new ArrayList<>();
8687
int groupIndex = 0;
8788
String group = environment.getProperty(String.format("proxy.users[%d].groups[%d]", index, groupIndex));
8889
while (group != null) {
89-
groupsList.add(group);
90+
groupsList.add(group.toUpperCase());
9091
groupIndex++;
9192
group = environment.getProperty(String.format("proxy.users[%d].groups[%d]", index, groupIndex));
9293
}

0 commit comments

Comments
 (0)