You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by "Tutkowski, Mike" <Mi...@netapp.com> on 2016/05/11 14:40:02 UTC

Question: commands.properties.in deprecated

Hi,


I see in afcbd27 that we've deprecated commands.properties.in.


Is there documentation on the new way that we specify permissions for a given API these days?


Thanks!

Mike

RE: Question: commands.properties.in deprecated

Posted by Rohit Yadav <ro...@shapeblue.com>.
Hi Mike and Will,

I'll update the admin-docs PR on this, if you take a look at the dynamic roles FS it has pointers on how to deal with new API, what are role types (RoleType has existed since at least 4.3) etc.

In short use the authorized field in the APICommand annotation to set default authorization for a role type. The annotation has existed as old as 4.2/4.3 but it's not quite popular.
In addition to this, all release notes should include new APIs so admins if they wish can disable any APIs enabled for a role type.

For example, if you want your new APIs to be enabled user roles you can set: authorized= {RoleType.User}. Similarly, to enable for all, you can set it to: authorized= {RoleType.Admin, RoleType.ResourceAdmin, RoleType.DomainAdmin, RoleType.User}.

Regards.

Regards,

Rohit Yadav

rohit.yadav@shapeblue.com 
www.shapeblue.com
53 Chandos Place, Covent Garden, London  WC2N 4HSUK
@shapeblue

-----Original Message-----
From: williamstevens@gmail.com [mailto:williamstevens@gmail.com] On Behalf Of Will Stevens
Sent: Wednesday, May 11, 2016 9:18 PM
To: dev@cloudstack.apache.org
Subject: Re: Question: commands.properties.in deprecated

I think this is the extent of the documentation at this point.

https://github.com/apache/cloudstack-docs-admin/pull/37/files

Rohit, maybe you can shed some light on this from a developer's perspective and how we should be handling this going forward?  Are there official docs which covered how to use 'commands.properties.in'?  If so, we should update them to reflect this new feature...



*Will STEVENS*
Lead Developer

*CloudOps* *| *Cloud Solutions Experts
420 rue Guy *|* Montreal *|* Quebec *|* H3J 1S6 w cloudops.com *|* tw @CloudOps_

On Wed, May 11, 2016 at 10:40 AM, Tutkowski, Mike <Mike.Tutkowski@netapp.com
> wrote:

> Hi,
>
>
> I see in afcbd27 that we've deprecated commands.properties.in.
>
>
> Is there documentation on the new way that we specify permissions for 
> a given API these days?
>
>
> Thanks!
>
> Mike
>

Re: Question: commands.properties.in deprecated

Posted by Rohit Yadav <ro...@shapeblue.com>.
All,

I've updated the docs PR, that should be merged soon after one more review/LGTM.

I've updated the following cwiki pages on how to authorize APIs in the post-dynamic-roles world: (/cc Mike)

https://cwiki.apache.org/confluence/display/CLOUDSTACK/Annotations+use+in+the+API
https://cwiki.apache.org/confluence/display/CLOUDSTACK/CloudStack+API+Development

Also see `validations` field usable in @Parameter annotation to do API parameter validations too.

In addition to know how dynamic role-checker works, you may also read:
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Dynamic+Role+Based+API+Access+Checker+for+CloudStack

Regards,
Rohit Yadav


Regards,

Rohit Yadav

rohit.yadav@shapeblue.com 
www.shapeblue.com
53 Chandos Place, Covent Garden, London  WC2N 4HSUK
@shapeblue
On May 11 2016, at 9:18 pm, Will Stevens <ws...@cloudops.com> wrote:

I think this is the extent of the documentation at this point.

https://github.com/apache/cloudstack-docs-admin/pull/37/files

Rohit, maybe you can shed some light on this from a developer's perspective
and how we should be handling this going forward? Are there official docs
which covered how to use 'commands.properties.in'? If so, we should update
them to reflect this new feature...

*Will STEVENS*
Lead Developer

*CloudOps* *| *Cloud Solutions Experts
420 rue Guy *|* Montreal *|* Quebec *|* H3J 1S6
w cloudops.com *|* tw @CloudOps_

On Wed, May 11, 2016 at 10:40 AM, Tutkowski, Mike <Mike.Tutkowski@netapp.com
> wrote:

> Hi,
>
>
> I see in afcbd27 that we've deprecated commands.properties.in.
>
>
> Is there documentation on the new way that we specify permissions for a
> given API these days?
>
>
> Thanks!
>
> Mike
>

Re: Question: commands.properties.in deprecated

Posted by Will Stevens <ws...@cloudops.com>.
I think this is the extent of the documentation at this point.

https://github.com/apache/cloudstack-docs-admin/pull/37/files

Rohit, maybe you can shed some light on this from a developer's perspective
and how we should be handling this going forward?  Are there official docs
which covered how to use 'commands.properties.in'?  If so, we should update
them to reflect this new feature...



*Will STEVENS*
Lead Developer

*CloudOps* *| *Cloud Solutions Experts
420 rue Guy *|* Montreal *|* Quebec *|* H3J 1S6
w cloudops.com *|* tw @CloudOps_

On Wed, May 11, 2016 at 10:40 AM, Tutkowski, Mike <Mike.Tutkowski@netapp.com
> wrote:

> Hi,
>
>
> I see in afcbd27 that we've deprecated commands.properties.in.
>
>
> Is there documentation on the new way that we specify permissions for a
> given API these days?
>
>
> Thanks!
>
> Mike
>