mirror of https://github.com/apache/activemq.git
Setting some svn eol-styles and improving source distro assembly
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@475265 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
540ebc6651
commit
ba476b36f0
|
@ -1,88 +0,0 @@
|
|||
/**
|
||||
*
|
||||
* 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 org.apache.activemq.broker.Broker;
|
||||
import org.apache.activemq.broker.BrokerPlugin;
|
||||
|
||||
import java.net.URL;
|
||||
|
||||
/**
|
||||
* Adds a JAAS based authentication security plugin
|
||||
*
|
||||
* @org.apache.xbean.XBean description="Provides a JAAS based authentication plugin"
|
||||
*
|
||||
* @version $Revision: 426366 $
|
||||
*/
|
||||
public class JaasAuthenticationPlugin implements BrokerPlugin {
|
||||
|
||||
private String configuration = "activemq-domain";
|
||||
private boolean discoverLoginConfig = true;
|
||||
|
||||
public Broker installPlugin(Broker broker) {
|
||||
initialiseJaas();
|
||||
return new JaasAuthenticationBroker(broker, configuration);
|
||||
}
|
||||
|
||||
|
||||
// Properties
|
||||
// -------------------------------------------------------------------------
|
||||
public String getConfiguration() {
|
||||
return configuration;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the JAAS configuration domain name used
|
||||
*/
|
||||
public void setConfiguration(String jaasConfiguration) {
|
||||
this.configuration = jaasConfiguration;
|
||||
}
|
||||
|
||||
|
||||
public boolean isDiscoverLoginConfig() {
|
||||
return discoverLoginConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables or disables the auto-discovery of the login.config file for JAAS to initialize itself.
|
||||
* This flag is enabled by default such that if the <b>java.security.auth.login.config</b> system property
|
||||
* is not defined then it is set to the location of the <b>login.config</b> file on the classpath.
|
||||
*/
|
||||
public void setDiscoverLoginConfig(boolean discoverLoginConfig) {
|
||||
this.discoverLoginConfig = discoverLoginConfig;
|
||||
}
|
||||
|
||||
// Implementation methods
|
||||
// -------------------------------------------------------------------------
|
||||
protected void initialiseJaas() {
|
||||
if (discoverLoginConfig) {
|
||||
String path = System.getProperty("java.security.auth.login.config");
|
||||
if (path == null) {
|
||||
//URL resource = Thread.currentThread().getContextClassLoader().getResource("login.config");
|
||||
URL resource = null;
|
||||
if (resource == null) {
|
||||
resource = getClass().getClassLoader().getResource("login.config");
|
||||
}
|
||||
if (resource != null) {
|
||||
path = resource.getFile();
|
||||
System.setProperty("java.security.auth.login.config", path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1 +1 @@
|
|||
http\://activemq.org/config/1.0=org.apache.xbean.spring.context.v2.XBeanNamespaceHandler
|
||||
http\://activemq.org/config/1.0=org.apache.xbean.spring.context.v2.XBeanNamespaceHandler
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<include>**/*.bin</include>
|
||||
<include>**/*.jnilib</include>
|
||||
<include>**/*.cert</include>
|
||||
<include>assembly/src/release/bin/macosx/wrapper</include>
|
||||
<include>assembly/src/release/bin/*/wrapper</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>**/eclipse-classes/**</exclude>
|
||||
|
@ -70,12 +70,13 @@
|
|||
<exclude>**/*.bin</exclude>
|
||||
<exclude>**/*.jnilib</exclude>
|
||||
<exclude>**/*.cert</exclude>
|
||||
<exclude>assembly/src/release/bin/macosx/wrapper</exclude>
|
||||
|
||||
<exclude>assembly/src/release/bin/*/wrapper</exclude>
|
||||
<exclude>**/target/**</exclude>
|
||||
<exclude>**/build/**</exclude>
|
||||
<exclude>data/**</exclude>
|
||||
<exclude>*/data/**</exclude>
|
||||
<exclude>**/activemq-data/**</exclude>
|
||||
<exclude>activemq-data/**</exclude>
|
||||
<exclude>*/activemq-data/**</exclude>
|
||||
<exclude>**/eclipse-classes/**</exclude>
|
||||
<exclude>**/.*</exclude>
|
||||
<exclude>**/.*/**</exclude>
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<include>**/*.bin</include>
|
||||
<include>**/*.jnilib</include>
|
||||
<include>**/*.cert</include>
|
||||
<include>assembly/src/release/bin/macosx/wrapper</include>
|
||||
<include>assembly/src/release/bin/*/wrapper</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>**/eclipse-classes/**</exclude>
|
||||
|
@ -70,12 +70,14 @@
|
|||
<exclude>**/*.bin</exclude>
|
||||
<exclude>**/*.jnilib</exclude>
|
||||
<exclude>**/*.cert</exclude>
|
||||
<exclude>assembly/src/release/bin/macosx/wrapper</exclude>
|
||||
<exclude>assembly/src/release/bin/*/wrapper</exclude>
|
||||
|
||||
<exclude>**/target/**</exclude>
|
||||
<exclude>**/build/**</exclude>
|
||||
<exclude>data/**</exclude>
|
||||
<exclude>*/data/**</exclude>
|
||||
<exclude>**/activemq-data/**</exclude>
|
||||
<exclude>activemq-data/**</exclude>
|
||||
<exclude>*/activemq-data/**</exclude>
|
||||
<exclude>**/eclipse-classes/**</exclude>
|
||||
<exclude>**/.*</exclude>
|
||||
<exclude>**/.*/**</exclude>
|
||||
|
|
Loading…
Reference in New Issue