diff options
author | Simo Sorce <simo@redhat.com> | 2014-05-30 10:09:18 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2014-06-04 10:26:34 -0400 |
commit | ca38224edc22e794c77418d30c2034cdba7ebe67 (patch) | |
tree | 8aabd122c87425b0cbaecd2e2974ba36f427cb89 /ipsilon/providers/saml2idp.py | |
parent | 5c0898a8e0fa977911fde7c24123f834e4792948 (diff) | |
download | ipsilon-ca38224edc22e794c77418d30c2034cdba7ebe67.tar.gz ipsilon-ca38224edc22e794c77418d30c2034cdba7ebe67.tar.xz ipsilon-ca38224edc22e794c77418d30c2034cdba7ebe67.zip |
Allow turning off security at install time
This should be used only for testing purposes
Signed-off-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'ipsilon/providers/saml2idp.py')
-rwxr-xr-x | ipsilon/providers/saml2idp.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ipsilon/providers/saml2idp.py b/ipsilon/providers/saml2idp.py index b337652..e89fe0c 100755 --- a/ipsilon/providers/saml2idp.py +++ b/ipsilon/providers/saml2idp.py @@ -246,6 +246,9 @@ class Installer(object): def install_args(self, group): group.add_argument('--saml2', choices=['yes', 'no'], default='yes', help='Configure SAML2 Provider') + group.add_argument('--saml2-secure', + choices=['yes', 'no'], default='yes', + help='Configure SAML2 Provider') def configure(self, opts): if opts['saml2'] != 'yes': @@ -261,7 +264,10 @@ class Installer(object): cert.generate('idp', opts['hostname']) # Generate Idp Metadata - url = 'https://' + opts['hostname'] + '/' + opts['instance'] + '/saml2' + proto = 'https' + if opts['saml2_secure'].lower() == 'no': + proto = 'http' + url = '%s://%s/%s/saml2' % (proto, opts['hostname'], opts['instance']) meta = metadata.Metadata(metadata.IDP_ROLE) meta.set_entity_id(url + '/metadata') meta.add_certs(cert, cert) |