This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch
graphql-authenticated-role-tenant-checks
in repository https://gitbox.apache.org/repos/asf/unomi.git
The following commit(s) were added to
refs/heads/graphql-authenticated-role-tenant-checks by this push:
new a56fa2ad2 Grant the JAAS success-path unit test the role and system
access it now needs.
a56fa2ad2 is described below
commit a56fa2ad2e22a032cf2258f1ec8af046f0dfb301
Author: Serge Huber <[email protected]>
AuthorDate: Mon Sep 21 21:39:20 2026 +0200
Grant the JAAS success-path unit test the role and system access it now
needs.
---
.../graphql/servlet/auth/GraphQLServletSecurityValidatorTest.java | 3 +++
1 file changed, 3 insertions(+)
diff --git
a/graphql/cxs-impl/src/test/java/org/apache/unomi/graphql/servlet/auth/GraphQLServletSecurityValidatorTest.java
b/graphql/cxs-impl/src/test/java/org/apache/unomi/graphql/servlet/auth/GraphQLServletSecurityValidatorTest.java
index fbf5feac2..8a664a98f 100644
---
a/graphql/cxs-impl/src/test/java/org/apache/unomi/graphql/servlet/auth/GraphQLServletSecurityValidatorTest.java
+++
b/graphql/cxs-impl/src/test/java/org/apache/unomi/graphql/servlet/auth/GraphQLServletSecurityValidatorTest.java
@@ -377,6 +377,9 @@ class GraphQLServletSecurityValidatorTest {
/** Control: a non-blank credential still reaches the realm and is
accepted by it. */
@Test
void validate_withNonBlankPassword_reachesJaas() throws IOException {
+ // Role + system access are required after JAAS succeeds when no
tenant header is present.
+ givenAdministratorRole();
+ when(securityService.hasSystemAccess()).thenReturn(true);
when(request.getHeader("Authorization")).thenReturn(BASIC_AUTH);
when(tenantService.getTenantByApiKey(any(),
eq(ApiKey.ApiKeyType.PRIVATE))).thenReturn(null);