From 12d8500ce5e318d07e01d4982596444f8bdcc4b8 Mon Sep 17 00:00:00 2001
From: Sam Betts <sam@code-smash.net>
Date: Fri, 5 Jan 2018 18:15:28 +0000
Subject: [PATCH] Fix initialization of auth token AuthProtocol

AuthProtocol expects the conf paramter to be in the form
{"oslo_config_config": cfg.CONF} if you want to use your own oslo config
object. This change ensures we init AuthProtocol with the right form of
configuration.

Change-Id: I7f8abf200c6fcbf83c5a7d5c867fdb56d95923c3
---
 ironic/api/app.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ironic/api/app.py b/ironic/api/app.py
index 05d3d38927..9cd9036b78 100644
--- a/ironic/api/app.py
+++ b/ironic/api/app.py
@@ -91,7 +91,7 @@ def setup_app(pecan_config=None, extra_hooks=None):
 
     if CONF.auth_strategy == "keystone":
         app = auth_token.AuthTokenMiddleware(
-            app, dict(cfg.CONF),
+            app, {"oslo_config_config": cfg.CONF},
             public_api_routes=pecan_config.app.acl_public_routes)
 
     if CONF.profiler.enabled: