Amrit Sarkar created SOLR-18639:
-----------------------------------
Summary: Give each Rule-Based Authorization permission a stable id
Key: SOLR-18639
URL: https://issues.apache.org/jira/browse/SOLR-18639
Project: Solr
Issue Type: Improvement
Components: Authorization
Reporter: Amrit Sarkar
Permissions in {{security.json}} are addressed by {{index}}, their position in
the list.
Every {{set-permission}}, {{update-permission}} and {{delete-permission}}
renumbers that list. This has been on purpose since
[SOLR-13900|https://issues.apache.org/jira/browse/SOLR-13900], so an index only
holds until the next edit.
*Example*
Given permissions {{\[all, read, update\]}}, sending {{delete-permission: 2}}
twice removes {{read}}, then {{update}}.
Any client that reads and then edits can hit the wrong permission if another
edit lands in between.
*Proposal*
* Add an {{id}} to each permission. Solr assigns it once and never changes it.
* {{update-permission}} and {{delete-permission}} accept {{id}} in place of
{{index}}.
* {{index}} keeps working as before.
*Follow-up*
The v2 resource APIs in [PR #4916|https://github.com/apache/solr/pull/4916]
will address permissions by this id.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]