def _register_app_opts(): available_backends = get_available_backends() auth_opts = [ cfg.StrOpt('host', default='0.0.0.0', help='Host on which the service should listen on.'), cfg.IntOpt('port', default=9100, help='Port on which the service should listen on.'), cfg.BoolOpt('use_ssl', default=False, help='Specify to enable SSL / TLS mode'), cfg.StrOpt('cert', default='/etc/apache2/ssl/mycert.crt', help='Path to the SSL certificate file. Only used when "use_ssl" is specified.'), cfg.StrOpt('key', default='/etc/apache2/ssl/mycert.key', help='Path to the SSL private key file. Only used when "use_ssl" is specified.'), cfg.StrOpt('logging', default='conf/logging.conf', help='Path to the logging config.'), cfg.BoolOpt('debug', default=False, help='Specify to enable debug mode.'), cfg.StrOpt('mode', default=DEFAULT_MODE, help='Authentication mode (%s)' % (','.join(VALID_MODES))), cfg.StrOpt('backend', default=DEFAULT_BACKEND, help=('Authentication backend to use in a standalone mode. Available ' 'backends: %s.' % (', '.join(available_backends)))), cfg.StrOpt('backend_kwargs', default=None, help='JSON serialized arguments which are passed to the authentication backend' ' in a standalone mode.') ] cfg.CONF.register_cli_opts(auth_opts, group='auth')
def _register_app_opts(): available_backends = get_available_backends() auth_opts = [ cfg.StrOpt('host', default='0.0.0.0', help='Host on which the service should listen on.'), cfg.IntOpt('port', default=9100, help='Port on which the service should listen on.'), cfg.BoolOpt('use_ssl', default=False, help='Specify to enable SSL / TLS mode'), cfg.StrOpt('cert', default='/etc/apache2/ssl/mycert.crt', help='Path to the SSL certificate file. Only used when "use_ssl" is specified.'), cfg.StrOpt('key', default='/etc/apache2/ssl/mycert.key', help='Path to the SSL private key file. Only used when "use_ssl" is specified.'), cfg.StrOpt('logging', default='conf/logging.conf', help='Path to the logging config.'), cfg.BoolOpt('debug', default=False, help='Specify to enable debug mode.'), cfg.StrOpt('mode', default=DEFAULT_MODE, help='Authentication mode (%s)' % (','.join(VALID_MODES))), cfg.StrOpt('backend', default=DEFAULT_BACKEND, help=('Authentication backend to use in a standalone mode. Available ' 'backends: %s.' % (', '.join(available_backends)))), cfg.StrOpt('backend_kwargs', default=None, help='JSON serialized arguments which are passed to the authentication backend' ' in a standalone mode.') ] cfg.CONF.register_cli_opts(auth_opts, group='auth') api_opts = [ cfg.ListOpt('allow_origin', default=['http://localhost:3000'], help='List of origins allowed'), ] cfg.CONF.register_cli_opts(api_opts, group='api')
def _register_app_opts(): available_backends = get_available_backends() auth_opts = [ cfg.StrOpt("host", default="0.0.0.0", help="Host on which the service should listen on."), cfg.IntOpt("port", default=9100, help="Port on which the service should listen on."), cfg.BoolOpt("use_ssl", default=False, help="Specify to enable SSL / TLS mode"), cfg.StrOpt( "cert", default="/etc/apache2/ssl/mycert.crt", help='Path to the SSL certificate file. Only used when "use_ssl" is specified.', ), cfg.StrOpt( "key", default="/etc/apache2/ssl/mycert.key", help='Path to the SSL private key file. Only used when "use_ssl" is specified.', ), cfg.StrOpt("logging", default="conf/logging.conf", help="Path to the logging config."), cfg.BoolOpt("debug", default=False, help="Specify to enable debug mode."), cfg.StrOpt("mode", default=DEFAULT_MODE, help="Authentication mode (%s)" % (",".join(VALID_MODES))), cfg.StrOpt( "backend", default=DEFAULT_BACKEND, help=( "Authentication backend to use in a standalone mode. Available " "backends: %s." % (", ".join(available_backends)) ), ), cfg.StrOpt( "backend_kwargs", default=None, help="JSON serialized arguments which are passed to the authentication backend" " in a standalone mode.", ), ] cfg.CONF.register_cli_opts(auth_opts, group="auth") api_opts = [cfg.ListOpt("allow_origin", default=["http://localhost:3000"], help="List of origins allowed")] cfg.CONF.register_cli_opts(api_opts, group="api")
def test_flat_file_backend_is_available_by_default(self): available_backends = get_available_backends() self.assertIn('flat_file', available_backends)
def _register_app_opts(): available_backends = auth_backends.get_available_backends() auth_opts = [ cfg.StrOpt( "host", default="127.0.0.1", help="Host on which the service should listen on.", ), cfg.IntOpt("port", default=9100, help="Port on which the service should listen on."), cfg.BoolOpt("use_ssl", default=False, help="Specify to enable SSL / TLS mode"), cfg.StrOpt( "cert", default="/etc/apache2/ssl/mycert.crt", help= 'Path to the SSL certificate file. Only used when "use_ssl" is specified.', ), cfg.StrOpt( "key", default="/etc/apache2/ssl/mycert.key", help= 'Path to the SSL private key file. Only used when "use_ssl" is specified.', ), cfg.StrOpt( "logging", default="/etc/st2/logging.auth.conf", help="Path to the logging config.", ), cfg.BoolOpt("debug", default=False, help="Specify to enable debug mode."), cfg.StrOpt( "mode", default=DEFAULT_MODE, help="Authentication mode (%s)" % (",".join(VALID_MODES)), ), cfg.StrOpt( "backend", default=DEFAULT_BACKEND, help="Authentication backend to use in a standalone mode. Available " "backends: %s." % (", ".join(available_backends)), ), cfg.StrOpt( "backend_kwargs", default=None, help= "JSON serialized arguments which are passed to the authentication " "backend in a standalone mode.", ), cfg.BoolOpt("sso", default=False, help="Enable Single Sign On for GUI if true."), cfg.StrOpt( "sso_backend", default=DEFAULT_SSO_BACKEND, help="Single Sign On backend to use when SSO is enabled. Available " "backends: noop, saml2.", ), cfg.StrOpt( "sso_backend_kwargs", default=None, help= "JSON serialized arguments which are passed to the SSO backend.", ), ] cfg.CONF.register_cli_opts(auth_opts, group="auth")
def _register_app_opts(): available_backends = auth_backends.get_available_backends() auth_opts = [ cfg.StrOpt('host', default='127.0.0.1', help='Host on which the service should listen on.'), cfg.IntOpt('port', default=9100, help='Port on which the service should listen on.'), cfg.BoolOpt('use_ssl', default=False, help='Specify to enable SSL / TLS mode'), cfg.StrOpt( 'cert', default='/etc/apache2/ssl/mycert.crt', help= 'Path to the SSL certificate file. Only used when "use_ssl" is specified.' ), cfg.StrOpt( 'key', default='/etc/apache2/ssl/mycert.key', help= 'Path to the SSL private key file. Only used when "use_ssl" is specified.' ), cfg.StrOpt('logging', default='/etc/st2/logging.auth.conf', help='Path to the logging config.'), cfg.BoolOpt('debug', default=False, help='Specify to enable debug mode.'), cfg.StrOpt('mode', default=DEFAULT_MODE, help='Authentication mode (%s)' % (','.join(VALID_MODES))), cfg.StrOpt( 'backend', default=DEFAULT_BACKEND, help='Authentication backend to use in a standalone mode. Available ' 'backends: %s.' % (', '.join(available_backends))), cfg.StrOpt( 'backend_kwargs', default=None, help= 'JSON serialized arguments which are passed to the authentication ' 'backend in a standalone mode.'), cfg.BoolOpt('sso', default=False, help='Enable Single Sign On for GUI if true.'), cfg.StrOpt( 'sso_backend', default=DEFAULT_SSO_BACKEND, help='Single Sign On backend to use when SSO is enabled. Available ' 'backends: noop, saml2.'), cfg.StrOpt( 'sso_backend_kwargs', default=None, help= 'JSON serialized arguments which are passed to the SSO backend.') ] cfg.CONF.register_cli_opts(auth_opts, group='auth')