Currently any new API extension to CloudStack must edit
commands.properties to add the appropriate ACLs.  This generally works
fine for ACS as we control the contents of that file and distribute
all the code ourself.  The hang up comes when somebody develops code
outside of ACS and want to add their code to an existing ACS
installation.  The Spring work that has been done has made this much
easier, but you are still required to manually edit
commands.properties.  I propose that we add the ACL metadata as an
optional field in @APICommand.  The logic will be as follows.

First check commands.properties for ACL info.  If ACL info exists, use
that to authorize the command.  If no ACL information exists (ie
null), then look at the @APICommand annotation.  The defaults of
@APICommand will provide no ACL info.  If the @APICommand annotation
provides no ACL info, use that.

Effectively what this means is that for all existing "ACS distributed"
code @APICommand will provide no ACL info (as the default is none) so
commands.properties will be used.  If somebody extends ACS, they can
set the ACL info in @APICommand.

The scope of proposal is focused on "non-ACS" distributed code.  In
order for ACS to move to the annotations fully and make
commands.properties optional more things need to change.  Specifically
the documentation and some python utilities look at
command.properties.  It would be a nice future enhancement to make
commands.properties fully optional, but for the time being this
proposal will address the core issue.

Darren

Reply via email to