Sarath Subramanian commented on ATLAS-3916:

[~yued], good requirement. The way metrics query works today is we rely on solr 
to provide you with the totalCount of a specific type. 
atlasGraph.indexQuery(VERTEX_INDEX, indexQuery).vertexTotals();
If metrics query should display the count of only those entities which user has 
read authorization.

We may need to go over individual entities for each type and check if user has 


> Get metrics according to the user permissions
> ---------------------------------------------
>                 Key: ATLAS-3916
>                 URL: https://issues.apache.org/jira/browse/ATLAS-3916
>             Project: Atlas
>          Issue Type: New Feature
>          Components:  atlas-core
>    Affects Versions: 2.0.0, 2.1.0
>            Reporter: Yue Dong
>            Priority: Major
>         Attachments: Captura-de-pantalla-de-2020-08-11-10-20-06.png
> I have two user groups: admin who has access to all tables and reader can 
> only see public data and module A tables. So I have configured Atlas to use a 
> simple authorizer with a little variation, which is to hide entities that are 
> not accessible to the user.
> The searches and displaying results work properly.
> The only problem I find is that the metrics. In the elements of search by 
> type, it indicates the number of all the entities of each type in the system. 
> And this is not consistent with the search result of a reader user. 
> !Captura-de-pantalla-de-2020-08-11-10-20-06.png!
> I have verified that these numbers come from the getMetrics method, which is 
> not secured so it does not obtain the numbers according to the users' 
> configuration. Am I missing something? Is there any way to change these 
> numbers?
> Maybe it'd be nice to have something that allows to modify the querys of the 
> metrics based on security and authorization, like 
> AtlasAuthorizer.scrubSearchResults in search methods.

This message was sent by Atlassian Jira

Reply via email to