You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Jan Høydahl (JIRA)" <ji...@apache.org> on 2019/04/03 20:25:00 UTC
[jira] [Updated] (SOLR-13364) Make Admin UI aware of logged-in
users permissions
[ https://issues.apache.org/jira/browse/SOLR-13364?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jan Høydahl updated SOLR-13364:
-------------------------------
Description:
We should aim to add fine-grained permission checks to the UI. One way to do this is to add a new REST-endpoint {{/admin/login/whoami}} that is always open for all, and that responds with a JSON with current user's permissions. If no user is logged in it will respond with empty list and "No user logged in". Else it will respond with e.g.
{code:java}
{
"user": "john",
"roles": ["superuser", "searcher"],
"permissions": [
{"name": "security-edit"},
{"name": "read"},
{"name": "customFoo", "path": "/custom/path", "params": {"key": ["val1", "val2"]} }
]
}{code}
The Admin UI can then request this endpoint and cache the info, so that it may make decisions to hide/grey out certain menu options throughout the UI. E.g. the create collection button would be disabled if the user lacks the predefined permission "collection-admin-edit".
In theory the UI must also check if the user has a custom permission with path {{/admin/collections}} and params {{action=CREATE}}, but it is not likely that anyone would create a custom permission for something that is predefined.
was:
We should aim to add fine-grained permission checks to the UI. One way to do this is to add a new REST-endpoint {{/admin/login/whoami}} that is always open for all, and that responds with a JSON with current user's permissions. If no user is logged in it will respond with empty list and "No user logged in". Else it will respond with e.g.
{code:java}
{ "user": "john", "roles": ["superuser", "searcher"], "permissions": ["security-edit", "collectionadmin"...] }{code}
The Admin UI can then request this endpoint and cache the info, so that it may make decisions to hide/grey out certain menu options throughout the UI.
> Make Admin UI aware of logged-in users permissions
> --------------------------------------------------
>
> Key: SOLR-13364
> URL: https://issues.apache.org/jira/browse/SOLR-13364
> Project: Solr
> Issue Type: New Feature
> Security Level: Public(Default Security Level. Issues are Public)
> Components: Admin UI, Authentication, Authorization, security
> Reporter: Jan Høydahl
> Priority: Major
>
> We should aim to add fine-grained permission checks to the UI. One way to do this is to add a new REST-endpoint {{/admin/login/whoami}} that is always open for all, and that responds with a JSON with current user's permissions. If no user is logged in it will respond with empty list and "No user logged in". Else it will respond with e.g.
> {code:java}
> {
> "user": "john",
> "roles": ["superuser", "searcher"],
> "permissions": [
> {"name": "security-edit"},
> {"name": "read"},
> {"name": "customFoo", "path": "/custom/path", "params": {"key": ["val1", "val2"]} }
> ]
> }{code}
> The Admin UI can then request this endpoint and cache the info, so that it may make decisions to hide/grey out certain menu options throughout the UI. E.g. the create collection button would be disabled if the user lacks the predefined permission "collection-admin-edit".
> In theory the UI must also check if the user has a custom permission with path {{/admin/collections}} and params {{action=CREATE}}, but it is not likely that anyone would create a custom permission for something that is predefined.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org