Author: degenaro
Date: Mon May 23 21:00:59 2016
New Revision: 1745275
URL: http://svn.apache.org/viewvc?rev=1745275&view=rev
Log:
UIMA-4926 No need to prompt for passwords when installing DUCC
1. keystore
- make Web Server's keystore password randomly generated by ducc_post_install
- update ducc.private.properties concerning default (random)
- update DUCC Book too
Modified:
uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_post_install
uima/sandbox/uima-ducc/trunk/src/main/resources/private/ducc.private.properties
uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part4/admin/ducc-properties.tex
uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/uima-ducc-vm/config/resources/private/ducc.private.properties
Modified: uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_post_install
URL:
http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_post_install?rev=1745275&r1=1745274&r2=1745275&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_post_install (original)
+++ uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_post_install Mon May 23
21:00:59 2016
@@ -18,12 +18,14 @@
# under the License.
# -----------------------------------------------------------------------
-
import os
import sys
import getopt
import platform
+import string
+import random
+
import shutil
import subprocess
from stat import *
@@ -133,22 +135,17 @@ class PostInstall():
return
+ def generate_pw(self, pwlen):
+ reply = ''.join([random.choice(string.ascii_letters + string.digits)
for n in xrange(pwlen)])
+ return reply
+
def get_keystore_pw(self, prompt):
-
if ( self.keystore_pw == None ):
- reply = ''
- while ( reply == self.default_keystore_pw or reply == '' or reply
== prompt):
- reply = raw_input('Enter password for webserver keystore:')
- if ( reply == self.default_keystore_pw):
- print 'May not use the preconfigured password of', reply
- if ( reply == prompt ):
- print 'Please enter a different password', reply
+ reply = self.generate_pw(32)
else:
reply = self.keystore_pw
-
return reply
-
def create_keystore(self, keytool):
'''
Modified:
uima/sandbox/uima-ducc/trunk/src/main/resources/private/ducc.private.properties
URL:
http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/src/main/resources/private/ducc.private.properties?rev=1745275&r1=1745274&r2=1745275&view=diff
==============================================================================
---
uima/sandbox/uima-ducc/trunk/src/main/resources/private/ducc.private.properties
(original)
+++
uima/sandbox/uima-ducc/trunk/src/main/resources/private/ducc.private.properties
Mon May 23 21:00:59 2016
@@ -22,6 +22,6 @@
#
====================================================================================
# ========== Web Server Configuration block ==========
-# Optionally configure the webserver ssl pw for HTTPS requests, default is
quackquack
+# Optionally configure the webserver ssl pw for HTTPS requests, default is
randomly generated
ducc.ws.port.ssl.pw = quackquack
# ========== Web Server Configuration block ==========
Modified:
uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part4/admin/ducc-properties.tex
URL:
http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part4/admin/ducc-properties.tex?rev=1745275&r1=1745274&r2=1745275&view=diff
==============================================================================
---
uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part4/admin/ducc-properties.tex
(original)
+++
uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part4/admin/ducc-properties.tex
Mon May 23 21:00:59 2016
@@ -1825,7 +1825,7 @@ org.apache.uima.ducc.common.persistence.
This is the password used to generate the Web Server's keystore used
for HTTPS requests. Usually
this keystore is created at initial installation time using
\hyperref[subsec:install.single-user]{ducc\_post\_install.}
\begin{description}
- \item[Default Value] quackquack
+ \item[Default Value] randomly generated at install time
\item[Type] Local
\end{description}
\end{description}
Modified:
uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/uima-ducc-vm/config/resources/private/ducc.private.properties
URL:
http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/uima-ducc-vm/config/resources/private/ducc.private.properties?rev=1745275&r1=1745274&r2=1745275&view=diff
==============================================================================
---
uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/uima-ducc-vm/config/resources/private/ducc.private.properties
(original)
+++
uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/uima-ducc-vm/config/resources/private/ducc.private.properties
Mon May 23 21:00:59 2016
@@ -22,6 +22,6 @@
#
====================================================================================
# ========== Web Server Configuration block ==========
-# Optionally configure the webserver ssl pw for HTTPS requests, default is
quackquack
+# Optionally configure the webserver ssl pw for HTTPS requests, default is
randomly generated
ducc.ws.port.ssl.pw = quackquack
# ========== Web Server Configuration block ==========