sarkaramrit1993 opened a new pull request, #5214:
URL: https://github.com/apache/solr/pull/5214

   # Description
   
   [SOLR-18579](https://issues.apache.org/jira/browse/SOLR-18579): with a 
catch-all `all` rule in security.json, a user holding only a predefined 
permission (e.g. `config-read`) gets a 403 from JAX-RS v2 APIs that require 
exactly that permission. `HttpSolrCall` authorizes first with a null handler, 
so only `all` can match. This is the double authorization described in 
[SOLR-17708](https://issues.apache.org/jira/browse/SOLR-17708).
   
   # Solution
   
   `V2HttpCall` overrides `shouldAuthorize()` to skip the `HttpSolrCall` check 
when no native v2 `Api` is resolved. `SolrRequestAuthorizer` then authorizes 
the request once, using the resource's `@PermissionName`.
   
   # Tests
   
   `JaxRsPredefinedPermissionTest`: a `config-read` user can list log levels 
with an `all` rule present (403 on main), and a user without it still gets 403.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to