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':
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)