Create cache directory for storing images for SP Portal
[cascardo/ipsilon.git] / tests / fconf.py
index 16738cb..f6985a5 100755 (executable)
@@ -1,22 +1,6 @@
 #!/usr/bin/python
 #
-# Copyright (C) 2014  Simo Sorce <simo@redhat.com>
-#
-# see file 'COPYING' for use and warranty information
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
+# Copyright (C) 2014 Ipsilon project Contributors, for license see COPYING
 
 from helpers.common import IpsilonTestBase  # pylint: disable=relative-import
 from helpers.http import HttpSessions  # pylint: disable=relative-import
@@ -25,6 +9,7 @@ import os
 import pwd
 import sys
 from string import Template
+import uuid
 
 
 idpname = 'idp1'
@@ -38,6 +23,7 @@ spport = '45081'
 idp_g = {'TEMPLATES': '${TESTDIR}/templates/install',
          'CONFDIR': '${TESTDIR}/etc',
          'DATADIR': '${TESTDIR}/lib',
+         'CACHEDIR': '${TESTDIR}/cache',
          'HTTPDCONFD': '${TESTDIR}/${NAME}/conf.d',
          'STATICDIR': '${ROOTDIR}',
          'BINDIR': '${ROOTDIR}/ipsilon',
@@ -51,7 +37,7 @@ idp_a = {'hostname': '${ADDRESS}:${PORT}',
          'secure': 'no',
          'testauth': 'yes',
          'pam': 'no',
-         'krb': 'no',
+         'gssapi': 'no',
          'ipa': 'no',
          'server_debugging': 'True'}
 
@@ -66,6 +52,7 @@ saml2 idp key file = ${TESTDIR}/lib/${NAME}/saml2/idp.key
 saml2 idp storage path = ${TESTDIR}/lib/${NAME}/saml2
 saml2 idp metadata file = metadata.xml
 saml2 idp certificate file = ${TESTDIR}/lib/${NAME}/saml2/idp.pem
+saml2 idp nameid salt = ${IDPSALT}
 [saml2_data]
 811d0231-9362-46c9-a105-a01a64818904 id = http://${SPADDR}:${SPPORT}/saml2
 811d0231-9362-46c9-a105-a01a64818904 type = SP
@@ -116,10 +103,12 @@ def fixup_idp_conf(testdir):
 
     idpuri = "http://%s:%s/%s" % (idpaddr, idpport, idpname)
 
+    idpsalt = uuid.uuid4().hex
     t = Template(idp_file_conf)
     text = t.substitute({'NAME': idpname, 'IDPURI': idpuri,
                          'SPNAME': spname, 'SPADDR': spaddr, 'SPPORT': spport,
-                         'SPMETA': spmeta, 'TESTDIR': testdir})
+                         'SPMETA': spmeta, 'TESTDIR': testdir,
+                         'IDPSALT': idpsalt})
 
     adminconf = os.path.join(testdir, 'etc/admin.conf')
     with open(adminconf, 'w+') as f: