org.apache.activemq.security.DefaultAuthorizationMap Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of activemq-broker Show documentation
Show all versions of activemq-broker Show documentation
The ActiveMQ Message Broker implementation
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.activemq.security;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.security.Principal;
import java.util.*;
import org.apache.activemq.command.ActiveMQDestination;
import org.apache.activemq.filter.DestinationMap;
import org.apache.activemq.filter.DestinationMapEntry;
/**
* Represents a destination based configuration of policies so that individual
* destinations or wildcard hierarchies of destinations can be configured using
* different policies. Each entry in the map represents the authorization ACLs
* for each operation.
*
*
*/
public class DefaultAuthorizationMap extends DestinationMap implements AuthorizationMap {
public static final String DEFAULT_GROUP_CLASS = "org.apache.activemq.jaas.GroupPrincipal";
private AuthorizationEntry defaultEntry;
private TempDestinationAuthorizationEntry tempDestinationAuthorizationEntry;
protected String groupClass = DEFAULT_GROUP_CLASS;
public DefaultAuthorizationMap() {
}
@SuppressWarnings("rawtypes")
public DefaultAuthorizationMap(List authorizationEntries) {
setAuthorizationEntries(authorizationEntries);
}
public void setTempDestinationAuthorizationEntry(TempDestinationAuthorizationEntry tempDestinationAuthorizationEntry) {
this.tempDestinationAuthorizationEntry = tempDestinationAuthorizationEntry;
}
public TempDestinationAuthorizationEntry getTempDestinationAuthorizationEntry() {
return this.tempDestinationAuthorizationEntry;
}
@Override
public Set