public class AndesAuthorizationHandler extends Object
Constructor and Description |
---|
AndesAuthorizationHandler() |
Modifier and Type | Method and Description |
---|---|
static org.wso2.andes.server.security.Result |
handleBindQueue(String username,
org.wso2.carbon.user.api.UserRealm userRealm,
org.wso2.andes.server.security.access.ObjectProperties properties,
org.wso2.andes.server.security.access.Operation operation)
Authorize binding a destination to an exchange based on permissions.
|
static org.wso2.andes.server.security.Result |
handleBrowseQueue(String username,
org.wso2.carbon.user.api.UserRealm userRealm,
org.wso2.andes.server.security.access.ObjectProperties properties,
org.wso2.andes.server.security.access.Operation operation)
Evaluate whether the user has browsing permission for a queue
|
static org.wso2.andes.server.security.Result |
handleConsumeQueue(String username,
org.wso2.carbon.user.api.UserRealm userRealm,
org.wso2.andes.server.security.access.ObjectProperties properties,
org.wso2.andes.server.security.access.Operation operation)
Evaluates whether the user has consuming permissions for a queue, topic or durable topic.
|
static org.wso2.andes.server.security.Result |
handleCreateQueue(String username,
org.wso2.carbon.user.api.UserRealm userRealm,
org.wso2.andes.server.security.access.ObjectProperties properties,
org.wso2.andes.server.security.access.Operation operation)
Evaluates user permissions when creating a queue.
|
static org.wso2.andes.server.security.Result |
handleDeleteQueue(String username,
org.wso2.carbon.user.api.UserRealm userRealm,
org.wso2.andes.server.security.access.ObjectProperties properties,
org.wso2.andes.server.security.access.Operation operation)
The following method handles the deletion of a queue by checking whether the user is
authorized or not.
|
static org.wso2.andes.server.security.Result |
handlePublishToExchange(String username,
org.wso2.carbon.user.api.UserRealm userRealm,
org.wso2.andes.server.security.access.ObjectProperties properties,
org.wso2.andes.server.security.access.Operation operation)
Authorise publishing to a given exchange based on user's permissions.
|
static org.wso2.andes.server.security.Result |
handlePurgeQueue(String username,
org.wso2.carbon.user.api.UserRealm userRealm,
org.wso2.andes.server.security.access.ObjectProperties properties,
org.wso2.andes.server.security.access.Operation operation)
This method handles the deletion of messages of a topic or queue.
|
static org.wso2.andes.server.security.Result |
handleUnbindQueue(String username,
org.wso2.carbon.user.api.UserRealm userRealm,
org.wso2.andes.server.security.access.ObjectProperties properties,
org.wso2.andes.server.security.access.Operation operation)
Evaluates whether the user has unbind permissions for an exchange.
|
public static org.wso2.andes.server.security.Result handleCreateQueue(String username, org.wso2.carbon.user.api.UserRealm userRealm, org.wso2.andes.server.security.access.ObjectProperties properties, org.wso2.andes.server.security.access.Operation operation) throws AndesAuthorizationHandlerException
username
- User who is trying to create the queueuserRealm
- User's Realmproperties
- NAME, OWNER, DURABLEoperation
- The operationAndesAuthorizationHandlerException
- if user store or registry exception occurredpublic static org.wso2.andes.server.security.Result handleConsumeQueue(String username, org.wso2.carbon.user.api.UserRealm userRealm, org.wso2.andes.server.security.access.ObjectProperties properties, org.wso2.andes.server.security.access.Operation operation) throws AndesAuthorizationHandlerException
IMPORTANT : Consuming an AMQP queue is not as same as consuming a JMS queue. The former is an atomic operation that is allowed for the user who created the queue where as the latter is the binding to an exchange based on permission granted.
username
- User who is trying to consume the queueuserRealm
- User's Realmproperties
- NAME, OWNER, TEMPORARYoperation
- The operationAndesAuthorizationHandlerException
- if user store or registry exception occurredpublic static org.wso2.andes.server.security.Result handleBrowseQueue(String username, org.wso2.carbon.user.api.UserRealm userRealm, org.wso2.andes.server.security.access.ObjectProperties properties, org.wso2.andes.server.security.access.Operation operation) throws AndesAuthorizationHandlerException
username
- User who is trying to consume the queueuserRealm
- User's Realmproperties
- NAME, OWNER, TEMPORARYoperation
- The operationAndesAuthorizationHandlerException
- if user store exception occurredpublic static org.wso2.andes.server.security.Result handleBindQueue(String username, org.wso2.carbon.user.api.UserRealm userRealm, org.wso2.andes.server.security.access.ObjectProperties properties, org.wso2.andes.server.security.access.Operation operation) throws AndesAuthorizationHandlerException
username
- topicID
User who is trying to do the bindinguserRealm
- User's Realmproperties
- NAME, ROUTING_KEYoperation
- The operationAndesAuthorizationHandlerException
- if user store or registry exception occurredpublic static org.wso2.andes.server.security.Result handlePublishToExchange(String username, org.wso2.carbon.user.api.UserRealm userRealm, org.wso2.andes.server.security.access.ObjectProperties properties, org.wso2.andes.server.security.access.Operation operation) throws AndesAuthorizationHandlerException
username
- User who is trying to publishuserRealm
- User's Realmproperties
- NAME, ROUTING_KEY @return
ALLOWED, DENIEDoperation
- The operationAndesAuthorizationHandlerException
- if user store or registry exception occurredpublic static org.wso2.andes.server.security.Result handleUnbindQueue(String username, org.wso2.carbon.user.api.UserRealm userRealm, org.wso2.andes.server.security.access.ObjectProperties properties, org.wso2.andes.server.security.access.Operation operation) throws AndesAuthorizationHandlerException
username
- The user nameuserRealm
- The user realmproperties
- NAME, QUEUE_NAME, ROUTING_KEYoperation
- The operationAndesAuthorizationHandlerException
- if user store or registry exception occurredpublic static org.wso2.andes.server.security.Result handleDeleteQueue(String username, org.wso2.carbon.user.api.UserRealm userRealm, org.wso2.andes.server.security.access.ObjectProperties properties, org.wso2.andes.server.security.access.Operation operation) throws AndesAuthorizationHandlerException
username
- User who is trying to publishuserRealm
- User's Realmproperties
- NAME, OWNER, DURABLEoperation
- The operationAndesAuthorizationHandlerException
- if user store or registry exception occurredpublic static org.wso2.andes.server.security.Result handlePurgeQueue(String username, org.wso2.carbon.user.api.UserRealm userRealm, org.wso2.andes.server.security.access.ObjectProperties properties, org.wso2.andes.server.security.access.Operation operation) throws AndesAuthorizationHandlerException
username
- User who is trying to publishuserRealm
- User's Realm that represents the user storeproperties
- NAME, OWNER, DURABLEoperation
- The operationAndesAuthorizationHandlerException
- if user store or registry exception occurredCopyright © 2017 WSO2. All rights reserved.