725ce9dfa3
Put osprofiler middleware as a almost first middleware. This allows us to: 1) Get more preciese duration. We are measuring duration of all middlewares. 2) authenticate middleware is requesting keystone, so if we init osprofiler before this middleware, we will get trace infomration from keystone as well. Change-Id: I11c5d21e6e6b0bd514dee295da410b208d7c798c
31 lines
1008 B
INI
31 lines
1008 B
INI
# Use this pipeline for no auth - DEFAULT
|
|
[pipeline:glance-registry]
|
|
pipeline = osprofiler unauthenticated-context registryapp
|
|
|
|
# Use this pipeline for keystone auth
|
|
[pipeline:glance-registry-keystone]
|
|
pipeline = osprofiler authtoken context registryapp
|
|
|
|
# Use this pipeline for authZ only. This means that the registry will treat a
|
|
# user as authenticated without making requests to keystone to reauthenticate
|
|
# the user.
|
|
[pipeline:glance-registry-trusted-auth]
|
|
pipeline = osprofiler context registryapp
|
|
|
|
[app:registryapp]
|
|
paste.app_factory = glance.registry.api:API.factory
|
|
|
|
[filter:context]
|
|
paste.filter_factory = glance.api.middleware.context:ContextMiddleware.factory
|
|
|
|
[filter:unauthenticated-context]
|
|
paste.filter_factory = glance.api.middleware.context:UnauthenticatedContextMiddleware.factory
|
|
|
|
[filter:authtoken]
|
|
paste.filter_factory = keystonemiddleware.auth_token:filter_factory
|
|
|
|
[filter:osprofiler]
|
|
paste.filter_factory = osprofiler.web:WsgiMiddleware.factory
|
|
hmac_keys = SECRET_KEY
|
|
enabled = yes
|