"Fossies" - the Fresh Open Source Software Archive

Member "keystone-18.0.0/keystone/conf/wsgi.py" (14 Oct 2020, 1789 Bytes) of package /linux/misc/openstack/keystone-18.0.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "wsgi.py" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 17.0.0_vs_18.0.0.

    1 # Licensed under the Apache License, Version 2.0 (the "License"); you may
    2 # not use this file except in compliance with the License. You may obtain
    3 # a copy of the License at
    4 #
    5 #      http://www.apache.org/licenses/LICENSE-2.0
    6 #
    7 # Unless required by applicable law or agreed to in writing, software
    8 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
    9 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
   10 # License for the specific language governing permissions and limitations
   11 # under the License.
   12 
   13 from oslo_config import cfg
   14 
   15 from keystone.conf import utils
   16 
   17 
   18 debug_middleware = cfg.BoolOpt(
   19     'debug_middleware',
   20     default=False,
   21     help=utils.fmt("""
   22 If set to true, this enables the oslo debug middleware in Keystone. This
   23 Middleware prints a lot of information about the request and the response. It
   24 is useful for getting information about the data on the wire (decoded) and
   25 passed to the WSGI application pipeline. This middleware has no effect on
   26 the "debug" setting in the [DEFAULT] section of the config file or setting
   27 Keystone's log-level to "DEBUG"; it is specific to debugging the WSGI data
   28 as it enters and leaves Keystone (specific request-related data). This option
   29 is used for introspection on the request and response data between the web
   30 server (apache, nginx, etc) and Keystone.
   31 
   32 This middleware is inserted as the first element in the middleware chain
   33 and will show the data closest to the wire.
   34 
   35 WARNING: NOT INTENDED FOR USE IN PRODUCTION. THIS MIDDLEWARE CAN AND WILL EMIT
   36 SENSITIVE/PRIVILEGED DATA.
   37 """))
   38 
   39 GROUP_NAME = __name__.split('.')[-1]
   40 ALL_OPTS = [
   41     debug_middleware,
   42 ]
   43 
   44 
   45 def register_opts(conf):
   46     conf.register_opts(ALL_OPTS, group=GROUP_NAME)
   47 
   48 
   49 def list_opts():
   50     return {GROUP_NAME: ALL_OPTS}