directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject [01/15] directory-kerberos git commit: Adjust the framework of standalone kdc server
Date Fri, 13 Mar 2015 03:20:52 GMT
Repository: directory-kerberos
Updated Branches:
  refs/heads/master a94dd211b -> 0b649f508


http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/0b649f50/kerby-kdc/kerby-kdc-dist/wrapperApp.jar
----------------------------------------------------------------------
diff --git a/kerby-kdc/kerby-kdc-dist/wrapperApp.jar b/kerby-kdc/kerby-kdc-dist/wrapperApp.jar
new file mode 100644
index 0000000..5923751
Binary files /dev/null and b/kerby-kdc/kerby-kdc-dist/wrapperApp.jar differ

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/0b649f50/kerby-kdc/kerby-kdc-dist/yajsw.policy.txt
----------------------------------------------------------------------
diff --git a/kerby-kdc/kerby-kdc-dist/yajsw.policy.txt b/kerby-kdc/kerby-kdc-dist/yajsw.policy.txt
new file mode 100644
index 0000000..aa5bbfb
--- /dev/null
+++ b/kerby-kdc/kerby-kdc-dist/yajsw.policy.txt
@@ -0,0 +1,4 @@
+grant codebase "file:/${yajsw.home}${/}-"
+{
+permission java.security.AllPermission;
+};

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/0b649f50/kerby-kdc/pom.xml
----------------------------------------------------------------------
diff --git a/kerby-kdc/pom.xml b/kerby-kdc/pom.xml
index 5b575d3..080725b 100644
--- a/kerby-kdc/pom.xml
+++ b/kerby-kdc/pom.xml
@@ -51,4 +51,34 @@
       <artifactId>junit</artifactId>
     </dependency>
   </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <version>2.2</version>
+        <executions>
+          <execution>
+            <id>dist</id>
+            <phase>package</phase>
+            <goals>
+              <goal>single</goal>
+            </goals>
+            <configuration>
+              <archive>
+                <manifest>
+                  <mainClass>org.apache.kerby.kerberos.kdc.server.KerbyKdcServer</mainClass>
+                </manifest>
+              </archive>
+              <descriptorRefs>
+                <descriptorRef>jar-with-dependencies</descriptorRef>
+              </descriptorRefs>
+              <outputDirectory>kerby-kdc-dist/kerby-kdc</outputDirectory>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
 </project>

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/0b649f50/kerby-kdc/src/main/java/org/apache/kerby/kerberos/kdc/server/KerbyKdcServer.java
----------------------------------------------------------------------
diff --git a/kerby-kdc/src/main/java/org/apache/kerby/kerberos/kdc/server/KerbyKdcServer.java
b/kerby-kdc/src/main/java/org/apache/kerby/kerberos/kdc/server/KerbyKdcServer.java
index 5e43fe3..f9a85bb 100644
--- a/kerby-kdc/src/main/java/org/apache/kerby/kerberos/kdc/server/KerbyKdcServer.java
+++ b/kerby-kdc/src/main/java/org/apache/kerby/kerberos/kdc/server/KerbyKdcServer.java
@@ -38,6 +38,42 @@ public class KerbyKdcServer extends KdcServer {
         initIdentityService();
     }
 
+    private static KdcServer server;
+    private static final String USAGE = "Usage: " + KerbyKdcServer.class.getSimpleName()
+ " -start conf-dir working-dir|-stop";
+
+    public static void main(String[] args) {
+        if (args.length == 0) {
+            System.err.println(USAGE);
+            return;
+        }
+
+        if (args[0].equals("-start")) {
+            if (args.length != 3) {
+                System.err.println(USAGE);
+                return;
+            }
+            String confDir = args[1];
+            String workingDir = args[2];
+
+            //FIXME host and config should be loaded from configuration.
+            String serverHost = "localhost";
+            short serverPort = 8015;
+
+            server = new KdcServer();
+            server.setKdcHost(serverHost);
+            server.setKdcTcpPort(serverPort);
+            server.init();
+            server.start();
+            System.out.println("KDC Server(" + KerbyKdcServer.class.getSimpleName() + ")
started.");
+        } else if (args[0].equals("-stop")) {
+            //server.stop();//FIXME can't get the server instance here
+            System.out.println("KDC Server stoped.");
+        } else {
+            System.err.println(USAGE);
+        }
+
+    }
+
     protected void initIdentityService() {
         Config config = getKdcConfig().getBackendConfig();
         IdentityService identityService = new LdapIdentityBackend(config);

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/0b649f50/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/KdcServer.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/KdcServer.java
b/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/KdcServer.java
index 3685378..b72d5d2 100644
--- a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/KdcServer.java
+++ b/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/KdcServer.java
@@ -78,26 +78,7 @@ public class KdcServer {
         started = true;
     }
 
-    private static KdcServer server;
-
-    public static void main(String[] args) {
-        if (args.length == 0) {
-            //FIXME host and config should be loaded from configuration.
-            String serverHost = "localhost";
-            short serverPort = 8015;
-
-            server = new KdcServer();
-            server.setKdcHost(serverHost);
-            server.setKdcTcpPort(serverPort);
-            server.init();
-            server.start();
-            System.out.println("KDC Server started.");
-        } else if (args[0].equals("stop")){
-            System.out.println("server is null? " + (server == null));
-//            server.stop();//FIXME can't get the server instance here
-            System.out.println("KDC Server stoped.");
-        }
-    }
+
 
     public String getKdcRealm() {
         if (kdcRealm != null) {

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/0b649f50/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index d03c850..7f012b8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -44,7 +44,6 @@
     <module>kdc-tool</module>
     <module>kdc-backend</module>
     <module>benchmark</module>
-    <module>kerby-dist</module>
   </modules>
 
   <dependencyManagement>


Mime
View raw message