You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Rajkumar Rajaratnam <ra...@wso2.com> on 2015/02/17 15:10:10 UTC
[Discuss] Please add correct Authorization Action when defining new
rest APIs
Hi Devs,
I found some of our rest APIs doesn't have the correct Authorization
Action. For example addDeploymentPolicy API.
@POST
@Path("/deploymentPolicies")
@Produces("application/json")
@Consumes("application/json")
@AuthorizationAction("/permission/admin/manage/addCartridge")
public Response addDeploymentPolicy(DeploymentPolicyBean
deploymentPolicyDefinitionBean)
throws RestAPIException {
Authorization Action should be
"/permission/admin/manage/addDeploymentPolicy". We also need to add this to
the component.xml of the relevant component (AS/CC/SM) which exposes this
API.
Thanks.
--
Rajkumar Rajaratnam
Committer & PMC Member, Apache Stratos
Software Engineer, WSO2
Mobile : +94777568639
Blog : rajkumarr.com
Re: [Discuss] Please add correct Authorization Action when defining
new rest APIs
Posted by Rajkumar Rajaratnam <ra...@wso2.com>.
I have now fixed these.
Thanks.
On Tue, Feb 17, 2015 at 7:40 PM, Rajkumar Rajaratnam <ra...@wso2.com>
wrote:
> Hi Devs,
>
> I found some of our rest APIs doesn't have the correct Authorization
> Action. For example addDeploymentPolicy API.
>
> @POST
> @Path("/deploymentPolicies")
> @Produces("application/json")
> @Consumes("application/json")
> @AuthorizationAction("/permission/admin/manage/addCartridge")
> public Response addDeploymentPolicy(DeploymentPolicyBean
> deploymentPolicyDefinitionBean)
> throws RestAPIException {
>
> Authorization Action should be
> "/permission/admin/manage/addDeploymentPolicy". We also need to add this to
> the component.xml of the relevant component (AS/CC/SM) which exposes this
> API.
>
> Thanks.
>
> --
> Rajkumar Rajaratnam
> Committer & PMC Member, Apache Stratos
> Software Engineer, WSO2
>
> Mobile : +94777568639
> Blog : rajkumarr.com
>
--
Rajkumar Rajaratnam
Committer & PMC Member, Apache Stratos
Software Engineer, WSO2
Mobile : +94777568639
Blog : rajkumarr.com