You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by chaitali <ch...@freestoneinfotech.com> on 2021/03/02 13:04:08 UTC

Re: Review Request 73210: ATLAS-3976 : On creating a type with a type_name that already exists as a read-only user 409 is thrown instead on 403/ATLAS-4176 : [Atlas: Read type auth] When un-authorised user creates a sub type, incorrect error message is thrown

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73210/
-----------------------------------------------------------

(Updated March 2, 2021, 1:04 p.m.)


Review request for atlas, Jayendra Parab and Nixon Rodrigues.


Summary (updated)
-----------------

ATLAS-3976 : On creating a type with a type_name that already exists as a read-only user 409 is thrown instead on 403/ATLAS-4176 : [Atlas: Read type auth] When un-authorised user creates a sub type, incorrect error message is thrown


Bugs: ATLAS-3976
    https://issues.apache.org/jira/browse/ATLAS-3976


Repository: atlas


Description (updated)
-------

This is reproducible on struct, entity and relationship types. It works fine on classification, business_metadata and enum types

{'errorCode': 'ATLAS-409-00-001', 'errorMessage': 'Given type read_auth_struct_zEFBP already exists'} 
{'errorCode': 'ATLAS-409-00-001', 'errorMessage': 'Given type read_auth_entity_EfAyL already exists'} 
{'errorCode': 'ATLAS-409-00-001', 'errorMessage': 'Given type non_read_relationship_ENshy already exists'}

ATLAS-4176: 

hrt_20 is an unauthorised_user

When hrt_20 tries to create an entity_type sub_entity_1 with super_type as "entity_1" the following is thrown

hrt_20 is not authorized to perform create entity-def sub_entity_1 
Expectation:

hrt_20 is not authorized to perform read type-def of category ENTITY entity_1


Diffs (updated)
-----

  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityDefStoreV2.java b86cd91af 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEnumDefStoreV2.java 2abfcf824 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasRelationshipDefStoreV2.java cf316eab1 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasStructDefStoreV2.java 0c13a78b3 


Diff: https://reviews.apache.org/r/73210/diff/2/

Changes: https://reviews.apache.org/r/73210/diff/1-2/


Testing
-------

errorcode after fix 
{
    "errorCode": "ATLAS-403-00-001",
    "errorMessage": "admin is not authorized to perform create entity-def dharsh_entity_1"
}


Thanks,

chaitali