Entitlements V2 call for adding a user fails if the email id has a subdomain name which is same as data partition id name
I have tested this on Azure as well as AWS Here in the example provided, I using Azure
In the test when I try to create the member as follows
postman.setEnvironmentVariable("NewOwner_viewerdata", "user_" + _.random(1,9999999) + "@" + {{data_partition_id}} + URLdomain)
then try to add the member https://{{ENTITLEMENTS_HOST}}/groups/:group_email/members { "email" : "{{NewOwner_viewerdata}}", "role" : "OWNER" }
I get the message 404 Not Found { "code": 404, "reason": "Not Found", "message": "Member group user_5210855@osdu.example.com not found" }
The curl command curl --location --request POST 'https://osdu-qa.msft-osdu-test.org/api/entitlements/v2/groups/data.certification52528.viewers@opendes.contoso.com/members'
--header 'Content-Type: application/json'
--header 'data-partition-id: opendes'
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1Ni...'
--data-raw '{ "email" : "user_9570580@opendes.contoso.com", "role" : "OWNER" }'
user_9570580@opendes.contoso.com not found" }
Response: 404 Not Found { "code": 404, "reason": "Not Found", "message": "Member groupIf I create member like this (not using the data partition id or any other name other than data-partition-id e.g postman.setEnvironmentVariable("NewOwner_viewerdata", "user_" + _.random(1,9999999) + "@" + "osdu" + URLdomain); Then it works curl --location --request POST 'https://osdu-qa.msft-osdu-test.org/api/entitlements/v2/groups/data.certification52528.viewers@opendes.contoso.com/members'
--header 'Content-Type: application/json'
--header 'data-partition-id: opendes'
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6...'
--data-raw '{ "email" : "user_4860099@osdu.contoso.com", "role" : "OWNER" }' Response: 200 OK { "email": "user_4860099@osdu.contoso.com", "role": "OWNER" }
@ChrisZhang @ashams_s @manishism @anujgupta @gregwibben @Kateryna_Kurach @Sergey_Krupenin
This is the same issue that was reported in pre-shipping (https://gitlab.opengroup.org/groups/osdu/subcommittees/ea/projects/pre-shipping/-/issues) and then moved accidentally to https://gitlab.opengroup.org/osdu/subcommittees/info-sec/projects/data-sec-en-ob/home/-/issues/4