You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by de...@apache.org on 2013/11/16 14:06:21 UTC

svn commit: r1542504 - /uima/sandbox/uima-ducc/trunk/src/main/admin/pam_test

Author: degenaro
Date: Sat Nov 16 13:06:21 2013
New Revision: 1542504

URL: http://svn.apache.org/r1542504
Log:
UIMA-3421 DUCC webserver (WS) native Linux-based authentication mechanism, as plug-in via ducc.properties

Added:
    uima/sandbox/uima-ducc/trunk/src/main/admin/pam_test

Added: uima/sandbox/uima-ducc/trunk/src/main/admin/pam_test
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/src/main/admin/pam_test?rev=1542504&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/src/main/admin/pam_test (added)
+++ uima/sandbox/uima-ducc/trunk/src/main/admin/pam_test Sat Nov 16 13:06:21 2013
@@ -0,0 +1,41 @@
+#!/usr/bin/env python
+# -----------------------------------------------------------------------
+# 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.
+# -----------------------------------------------------------------------
+import sys
+import getpass
+
+from ducc_util import DuccUtil
+from ducc_base import DuccProperties
+
+class PamTest(DuccUtil):
+    def main(self, argv):
+        user = raw_input("User: ")
+        pw = getpass.getpass()
+        service = 'org.apache.uima.ducc.ws.authentication.PamTest'
+        cmd = []
+        cmd.append(self.java())
+        cmd.append(service)
+        cmd.append(user)
+        cmd.append(pw)
+        pid = self.spawn(' '.join(cmd))
+        return pid
+        
+if __name__ == "__main__":
+    pamtest = PamTest()
+    pamtest.main(sys.argv[1:])