[
https://issues.apache.org/jira/browse/KNOX-3219?focusedWorklogId=993439&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-993439
]
ASF GitHub Bot logged work on KNOX-3219:
----------------------------------------
Author: ASF GitHub Bot
Created on: 26/Nov/25 13:47
Start Date: 26/Nov/25 13:47
Worklog Time Spent: 10m
Work Description: hanicz commented on code in PR #1112:
URL: https://github.com/apache/knox/pull/1112#discussion_r2565034971
##########
gateway-provider-identity-assertion-common/src/test/java/org/apache/knox/gateway/identityasserter/common/filter/VirtualGroupMapperTest.java:
##########
@@ -117,8 +123,37 @@ public void testMatchGroup() {
assertEquals(0, virtualGroups("user4", emptyList()).size());
}
+ @Test
+ public void tesRequestParameterContainsParam() {
Review Comment:
nit: there is a typo in the 3 test method names
Issue Time Tracking
-------------------
Worklog Id: (was: 993439)
Time Spent: 20m (was: 10m)
> New Virtual Group mapping function to check request parameters
> --------------------------------------------------------------
>
> Key: KNOX-3219
> URL: https://issues.apache.org/jira/browse/KNOX-3219
> Project: Apache Knox
> Issue Type: Improvement
> Components: Server
> Affects Versions: 2.0.0, 2.1.0
> Reporter: Sandor Molnar
> Assignee: Sandor Molnar
> Priority: Major
> Fix For: 3.0.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> KNOX-2707 added a very cool feature that allows virtual group mapping using
> predicates. There are many pre-defined functions, including
> {{request-header}} and {{{}request-attribute{}}}.
> It'd be beneficial to add a new request-related function called
> {{request-parameter}} that works the same way as the above listed ones, but
> it gets the value to compare from the request parameters.
> For instance:
> {code:java}
> <param>
> <name>group.mapping.non_rejected_requests</name>
> <value>(= (strlen (request-parameter 'impala.doas.user')) 0)</value>
> </param> {code}
> This would map user principals to the {{non_rejected_requests}} where the
> request doesn't contain the {{impala.doas.user}} parameter.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)