Repository: knox
Updated Branches:
refs/heads/master 0bcc6594e -> 3158bc842
http://git-wip-us.apache.org/repos/asf/knox/blob/3158bc84/gateway-test-ldap/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/gateway-test-ldap/src/main/resources/log4j.properties b/gateway-test-ldap/src/main/resources/log4j.properties
deleted file mode 100644
index 40b5546..0000000
--- a/gateway-test-ldap/src/main/resources/log4j.properties
+++ /dev/null
@@ -1,25 +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.
-
-log4j.rootLogger=ERROR,stdout
-log4j.threshhold=ALL
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %-5p %m%n
-
-#log4j.logger.org.apache.directory=INFO
-#log4j.logger.org.apache.hadoop.gateway=INFO
-#log4j.logger.org.apache.hadoop.gateway=DEBUG
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/knox/blob/3158bc84/gateway-test-ldap/src/main/resources/users.ldif
----------------------------------------------------------------------
diff --git a/gateway-test-ldap/src/main/resources/users.ldif b/gateway-test-ldap/src/main/resources/users.ldif
deleted file mode 100644
index f75edb8..0000000
--- a/gateway-test-ldap/src/main/resources/users.ldif
+++ /dev/null
@@ -1,44 +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.
-
-version: 1
-
-dn: dc=hadoop,dc=apache,dc=org
-objectclass: organization
-objectclass: dcObject
-o: Hadoop at Apache.org
-dc: hadoop
-description: Makers of Hadoop
-
-# entry for a sample people container
-# please replace with site specific values
-dn: ou=people,dc=hadoop,dc=apache,dc=org
-objectclass:top
-objectclass:organizationalUnit
-ou: people
-
-# entry for a sample end user
-# please replace with site specific values
-dn: uid=guest,ou=people,dc=hadoop,dc=apache,dc=org
-objectclass:top
-objectclass:person
-objectclass:organizationalPerson
-objectclass:inetOrgPerson
-cn: Guest
-sn: User
-uid: guest
-userPassword:guest-password
-
http://git-wip-us.apache.org/repos/asf/knox/blob/3158bc84/gateway-test-ldap/src/test/java/org/apache/hadoop/gateway/security/ldap/SimpleLdapServerTest.java
----------------------------------------------------------------------
diff --git a/gateway-test-ldap/src/test/java/org/apache/hadoop/gateway/security/ldap/SimpleLdapServerTest.java b/gateway-test-ldap/src/test/java/org/apache/hadoop/gateway/security/ldap/SimpleLdapServerTest.java
deleted file mode 100644
index 75f439e..0000000
--- a/gateway-test-ldap/src/test/java/org/apache/hadoop/gateway/security/ldap/SimpleLdapServerTest.java
+++ /dev/null
@@ -1,98 +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.hadoop.gateway.security.ldap;
-
-import org.apache.directory.api.ldap.model.exception.LdapAuthenticationException;
-import org.apache.directory.api.ldap.model.exception.LdapException;
-import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.ldap.client.api.LdapNetworkConnection;
-import org.apache.directory.server.protocol.shared.transport.TcpTransport;
-import org.apache.directory.server.protocol.shared.transport.Transport;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.ServerSocket;
-
-import static org.junit.Assert.fail;
-
-public class SimpleLdapServerTest {
-
- private static int port;
- private static File ldifFile;
- private static SimpleLdapDirectoryServer ldap;
-
- @BeforeClass
- public static void setup() throws Exception {
- port = findFreePort();
- ldifFile = new File( ClassLoader.getSystemResource( "users.ldif" ).toURI() );
- ldap = new SimpleLdapDirectoryServer( "dc=hadoop,dc=apache,dc=org", ldifFile, new Transport[]{ new TcpTransport( port ) } );
- ldap.start();
- }
-
- @AfterClass
- public static void cleanup() throws Exception {
- if( ldap != null ) {
- ldap.stop( true );
- }
- }
-
- private static int findFreePort() throws IOException {
- ServerSocket socket = new ServerSocket(0);
- int port = socket.getLocalPort();
- socket.close();
- return port;
- }
-
- @Test
- public void testBind() throws LdapException, IOException {
- LdapConnection connection;
-
- connection = new LdapNetworkConnection( "localhost", port );
- try {
- connection.bind( "uid=guest,ou=people,dc=hadoop,dc=apache,dc=org", "guest-password" );
- } finally {
- connection.close();
- }
-
- connection = new LdapNetworkConnection( "localhost", port );
- try {
- connection.bind( "uid=nobody,ou=people,dc=hadoop,dc=apache,dc=org", "guest-password" );
- fail( "Expected LdapAuthenticationException" );
- } catch ( LdapAuthenticationException e ) {
- // Expected
- } finally {
- connection.close();
- }
-
- connection = new LdapNetworkConnection( "localhost", port );
- try {
- connection.bind( "uid=guest,ou=people,dc=hadoop,dc=apache,dc=org", "wrong-password" );
- fail( "Expected LdapAuthenticationException" );
- } catch ( LdapAuthenticationException e ) {
- // Expected
- } finally {
- connection.close();
- }
-
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/knox/blob/3158bc84/gateway-test/pom.xml
----------------------------------------------------------------------
diff --git a/gateway-test/pom.xml b/gateway-test/pom.xml
index 9d60ef7..b0016e0 100644
--- a/gateway-test/pom.xml
+++ b/gateway-test/pom.xml
@@ -48,7 +48,7 @@
${gateway-group}
- gateway-test-ldap
+ gateway-demo-ldap
test
http://git-wip-us.apache.org/repos/asf/knox/blob/3158bc84/hsso-release/pom.xml
----------------------------------------------------------------------
diff --git a/hsso-release/pom.xml b/hsso-release/pom.xml
index 117f669..7f93201 100644
--- a/hsso-release/pom.xml
+++ b/hsso-release/pom.xml
@@ -169,11 +169,11 @@
${gateway-group}
- gateway-test-ldap
+ gateway-demo-ldap
${gateway-group}
- gateway-test-ldap-launcher
+ gateway-demo-ldap-launcher
junit
http://git-wip-us.apache.org/repos/asf/knox/blob/3158bc84/hsso-release/src/assembly.xml
----------------------------------------------------------------------
diff --git a/hsso-release/src/assembly.xml b/hsso-release/src/assembly.xml
index 59f7aa1..54ed892 100644
--- a/hsso-release/src/assembly.xml
+++ b/hsso-release/src/assembly.xml
@@ -70,7 +70,7 @@
${gateway-group}:gateway-util-launcher
${gateway-group}:gateway-server-launcher
${gateway-group}:gateway-shell-launcher
- ${gateway-group}:gateway-test-ldap-launcher
+ ${gateway-group}:gateway-demo-ldap-launcher
@@ -91,7 +91,7 @@
bin
ldap.jar
- ${gateway-group}:gateway-test-ldap-launcher
+ ${gateway-group}:gateway-demo-ldap-launcher
http://git-wip-us.apache.org/repos/asf/knox/blob/3158bc84/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f47ebb3..c0ee6f9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -39,8 +39,8 @@
gateway-util-configinjector
gateway-util-launcher
gateway-util-urltemplate
- gateway-test-ldap
- gateway-test-ldap-launcher
+ gateway-demo-ldap
+ gateway-demo-ldap-launcher
gateway-i18n
gateway-i18n-logging-log4j
gateway-i18n-logging-sl4j
@@ -986,12 +986,12 @@
${gateway-group}
- gateway-test-ldap
+ gateway-demo-ldap
${gateway-version}
${gateway-group}
- gateway-test-ldap-launcher
+ gateway-demo-ldap-launcher
${gateway-version}