sarkaramrit1993 opened a new pull request, #5320: URL: https://github.com/apache/solr/pull/5320
JIRA: [SOLR-18639](https://issues.apache.org/jira/browse/SOLR-18639) # Description Rule-Based Authorization permissions are addressed by `index`, their position in the list, and every edit renumbers it. A client that reads and then edits can hit the wrong permission if another edit lands in between: `delete-permission: 2` sent twice on `[all, read, update]` removes `read`, then `update`. This unblocks the first blocker on [#4916](https://github.com/apache/solr/pull/4916), whose v2 resource APIs need a stable key per permission. # Solution - Solr gives each permission an `id` on edit and keeps it until the permission is deleted. Permissions without one get a deterministic id, so every node backfills the same value. - `update-permission` and `delete-permission` accept `id` in place of `index`. `index` works as before, and a permission read from the API can be sent back as is. # Tests New tests in `BaseTestRuleBasedAuthorizationPlugin` cover delete and update by id, ids surviving renumbering, backfill, and sending a stored permission back. -- 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]
