I thought the plan was to do Amazon authn/z later? If we are doing it then it must be done right as a common authn and authz thing with full integration to the usual Carbon auth as Paul noted.
Sanjiva. On Mon, Nov 22, 2010 at 6:10 PM, Manjula Rathnayake <manju...@wso2.com>wrote: > Hi all, > > In Simple Queue Service(SQS) we can share queues with other users who have > AWS accounts registered. > And they don't need to sign up with SQS. We can set permission to actions > involved with queue services > as an example, SendMessage, DeleteMessage and so on. > > According to the SQS wsdl, sharing a queue with other users is done by > AddPermission() method which > takes input parameters as > LabelName - String > AWSAccountIds - String[] > ActionNames - String[] > > To remove permissions we can use, > removePermission(String LabelName) > > So, It is assumed that for each AWSAccountIds has been given permission to > all ActionNames. > Is this assumption correct? please have a look and give your comments. > > Assuming above understanding is correct, checking user permissions to do > actions on queue is > implemented as below. > > public class PermissionLabel { > private List<String> sharedUserList; > private List<String> operationList; > > public PermissionLabel(List<String> sharedUserList, > List<String> operationList) { > this.sharedUserList = sharedUserList; > this.operationList = operationList; > } > > public List<String> getSharedUserList() { > return sharedUserList; > } > > public boolean isSharedForOperation(String loggedInUser, String > operation) { > if (sharedUserList.contains(loggedInUser) && > operationList.contains(operation)) { > return true; > } else { > return false; > } > } > } > > > More details of these operations is available at [1] and in the attached > file. > [1]. > http://docs.amazonwebservices.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/index.html?acp-overview.html#PermissionTypes > > > -- > Manjula Rathnayaka > Software Engineer > WSO2, Inc. > Mobile:+94 77 743 1987 > > _______________________________________________ > Carbon-dev mailing list > Carbon-dev@wso2.org > https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev > > -- Sanjiva Weerawarana, Ph.D. Founder, Chairman & CEO; WSO2, Inc.; http://wso2.com/ email: sanj...@wso2.com; phone: +94 11 763 9622; cell: +94 77 787 6880 | +1 650 265 8311 blog: http://sanjiva.weerawarana.org/ Lean . Enterprise . Middleware
_______________________________________________ Carbon-dev mailing list Carbon-dev@wso2.org https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev