[
https://issues.apache.org/jira/browse/SOLR-16488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17692734#comment-17692734
]
Jason Gerlowski commented on SOLR-16488:
----------------------------------------
Ah - turns out there's actually a problem with moving the zkPath into a
query-parameter.
Both our v2 frameworks use annotations to associate APIs with particular authz
permissions. And currently, ZooKeeperReadAPI requires different authz
permissions based on the zkPath being read. Most paths are served by a Java
method that is annotated to require the ZK_READ permission. But there's a
separate Java method annotated specifically to handle requests for
security.json, that requires the stricter SECURITY_READ permission.
This is only possible because the HTTP path contains the zkNode (i.e.
/api/cluster/zk/data/security.json). If the zkPath were moved into a query
parameter then there's no easy way to special-case the reading of
security.json, as neither of our v2 frameworks support binding to methods based
on query-param values.
Unless someone sees a way around this, we might have to keep the zkPath in the
HTTP path, and be content with the other changes that Jan suggested above.
(e.g. removing the "children" suffix)
> Migrate ZookeeperReadAPI to JAX-RS
> ----------------------------------
>
> Key: SOLR-16488
> URL: https://issues.apache.org/jira/browse/SOLR-16488
> Project: Solr
> Issue Type: Sub-task
> Components: v2 API
> Affects Versions: 9.1, main (10.0)
> Reporter: Jason Gerlowski
> Assignee: Jason Gerlowski
> Priority: Major
> Labels: newdev
> Time Spent: 3h 40m
> Remaining Estimate: 0h
>
> EDIT: This description originally described creating a plan for creating v2
> APIs equivalent to the current v1 /admin/zookeeper endpoints. But it turns
> out that equivalent v2 APIs already largely exist in ZookeeperReadAPI. The
> description has updated to reflect this.
> The ZookeeperReadAPI APIs should be migrated to JAX-RS and be tweaked to be
> more REST-ful and in line with the direction we're pushing v2 in. See the
> comments below for a discussion of specific tweaks to the HTTP path,
> parameters, etc. for these APIs.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]