Re: [Dev] [APPM/APIM] AuthorizationFailedException when getting tags where webapp/api visibility is restricted by role

2015-10-13 Thread Nuwan Dias
Can you please do a milestone release with this fix? We need to do a milestone release of API Manager 1.10.0 this week. Thanks, NuwanD. On Wed, Oct 14, 2015 at 10:57 AM, Sameera Kannangara wrote: > Hi All, > > We are releasing Carbon-governance repo on 23rd oct. > This fix will be included in t

Re: [Dev] [APPM/APIM] AuthorizationFailedException when getting tags where webapp/api visibility is restricted by role

2015-10-13 Thread Sameera Kannangara
Hi All, We are releasing Carbon-governance repo on 23rd oct. This fix will be included in the new release. Thank you, SameeraK. On Wed, Oct 14, 2015 at 10:52 AM, Sameera Kannangara wrote: > Hi Jena, > > We have added a fix to governance API to validate permission when > retrieving from regist

Re: [Dev] [APPM/APIM] AuthorizationFailedException when getting tags where webapp/api visibility is restricted by role

2015-10-13 Thread Jenananthan Yogendran
Hi Sameera, I checked 4.5.10-SNAPSHOT with appmanager , now issue is fixed . On Wed, Oct 14, 2015 at 10:52 AM, Sameera Kannangara wrote: > Hi Jena, > > We have added a fix to governance API to validate permission when > retrieving from registry. > Please use current development governance vers

Re: [Dev] [APPM/APIM] AuthorizationFailedException when getting tags where webapp/api visibility is restricted by role

2015-10-13 Thread Sameera Kannangara
Hi Jena, We have added a fix to governance API to validate permission when retrieving from registry. Please use current development governance version (4.5.10-SNAPSHOT) in your local build and verify that the issue is fixed. Thank you, SameeraK. On Sat, Oct 10, 2015 at 10:36 AM, Sameera Kannang

Re: [Dev] [APPM/APIM] AuthorizationFailedException when getting tags where webapp/api visibility is restricted by role

2015-10-09 Thread Sameera Kannangara
Hi Nuwan, We were able to reproduce this issue. Problem seems to be there is no enforce of user permissions when retrieving from UUID cache. We are looking in to this. Thank you, SameeraK. On Fri, Oct 9, 2015 at 10:28 PM, Nuwan Dias wrote: > Hi Sameera, > > This is a very simple scenario. Som

Re: [Dev] [APPM/APIM] AuthorizationFailedException when getting tags where webapp/api visibility is restricted by role

2015-10-09 Thread Nuwan Dias
Hi Sameera, This is a very simple scenario. Something that was working fine all this time is now breaking. No client side code changes have happened. You can get an API Manager 1.9.1 and try this scenario and then compare the same behaviour with a 1.10.0-SNAPSHOT build. Here are the steps to try.

Re: [Dev] [APPM/APIM] AuthorizationFailedException when getting tags where webapp/api visibility is restricted by role

2015-10-09 Thread Sameera Kannangara
Hi Jena, There seems to be a misunderstanding here. Please confirm you are executing retrieveGovernanceArtifactById method with a UserRegistry instance as the registry parameter. Or is registry parameter here is a CacheBackedRegistry instance? Because UserRegistry is the registry implementation w

Re: [Dev] [APPM/APIM] AuthorizationFailedException when getting tags where webapp/api visibility is restricted by role

2015-10-09 Thread Jenananthan Yogendran
Hi Sameera, This is what I observed when debugged the code, method getArtifactPath is getting called in the method retrieveGovernanceArtifactById[1]. Before caching is introduced query[2] in getArtifactPath returned null if unauthorized user try to get the atrifactpath. if path is null, then meth

Re: [Dev] [APPM/APIM] AuthorizationFailedException when getting tags where webapp/api visibility is restricted by role

2015-10-09 Thread Jenananthan Yogendran
Hi Sameera, What I meant is , when creating a web app/api , add tags to it and restrict the webapp's/api's visibilty by role . On Fri, Oct 9, 2015 at 3:17 PM, Sameera Kannangara wrote: > There is no permission model for tags. Permission model is only associated > with the registry resources w

Re: [Dev] [APPM/APIM] AuthorizationFailedException when getting tags where webapp/api visibility is restricted by role

2015-10-09 Thread Sameera Kannangara
There is no permission model for tags. Permission model is only associated with the registry resources which may have tags. I think Jena is referring [1] their own tag specific implementation, because tag specific permissions are not supported by registry. [1] "Create a web app with tags and rest

Re: [Dev] [APPM/APIM] AuthorizationFailedException when getting tags where webapp/api visibility is restricted by role

2015-10-09 Thread Nuwan Dias
On Fri, Oct 9, 2015 at 2:34 PM, Sameera Kannangara wrote: > Hi Nuwan, > > According to my knowledge tags do not have a permissions attached. > But resources that are tagged with those tags have permissions. > Even if a user can get all the tags, user will be able to read only the > permitted reso

Re: [Dev] [APPM/APIM] AuthorizationFailedException when getting tags where webapp/api visibility is restricted by role

2015-10-09 Thread Sanjeewa Malalgoda
I think we have scheduled task to generate tags and associated resources. If that is the case we may be able to handle it there. If we have query to get APIs with tag then we will have set of APIs associated with given tag. When you retrieve them we check API is published or not. In same way we can

Re: [Dev] [APPM/APIM] AuthorizationFailedException when getting tags where webapp/api visibility is restricted by role

2015-10-09 Thread Sameera Kannangara
Hi Nuwan, According to my knowledge tags do not have a permissions attached. But resources that are tagged with those tags have permissions. Even if a user can get all the tags, user will be able to read only the permitted resources even though they are tagged. As the reported exception related t

Re: [Dev] [APPM/APIM] AuthorizationFailedException when getting tags where webapp/api visibility is restricted by role

2015-10-09 Thread Nuwan Dias
You means tags have permissions? Since tags are attached to artifacts, shouldn't it inherit the permissions of the artifact instead of having its own? On Fri, Oct 9, 2015 at 1:34 PM, Sameera Kannangara wrote: > Hi Jena, > > I assume that anon user does not have access to these tags. > If so why

Re: [Dev] [APPM/APIM] AuthorizationFailedException when getting tags where webapp/api visibility is restricted by role

2015-10-09 Thread Sameera Kannangara
Hi Jena, I assume that anon user does not have access to these tags. If so why does process try to retrieve tags which are not allowed to be read by anon user? Above exception is expected when a user tries to perform a restricted operation. Problem seems to be trying to access a restricted resour