The authtoken middleware has been printing warning log messages to
the API logs for all services, reporting unexpected conf keys. This
was traced back to paste.deploy adding 'here' and '__file__' and
both gnocchi and panko adding 'configkey' keys in wsgi apps though
these do not actually exist in the conf file. This change allows
for those keys without printing a warning that unnecessarily
confuses operators.
But it's kind of a hack, especially the configkey bit. We shouldn't
have to know about gnocchi/panko specifics like this. And it doesn't
address the comment in the bug about what is seen for ironic. So I
think there will still be more to do here.
Change-Id: I678482309c7dd35ce147bebf13ebefc84251fe91
Partial-Bug: 1722444
When the option is unknown to auth_token and it's value can't be
converted, this patch adds a warning log.
Change-Id: I818708cc19488030b80daa2b01b9f8622632f7eb
This doesn't make a huge difference but if we don't pop the local oslo
conf options from the conf dict then they remain around in the paste
overrides dict.
Rearrange them to pop rather than testing there presence.
Change-Id: I9482831d6d415da0a2e38fd3c39f58ba96740842
When oslo_config_project is specified in the paste config, we need to
lookup the configuration file properly. Commit
f8c150a9cc changed the way we looked up
for the default config files, and passed an empty list instead of None,
which means that no look were done anymore. This restores the previous
behavior.
Change-Id: I6aec548cec24dfcd48e4c116c07f53cc097c6059
Closes-Bug: #1594930
Move all the auth_token middleware user_agent calculation into config
and only expose the user_agent property.
Change-Id: Ia6833845262c4de87ef95079de24d264e06f54fc
The _conf_get ugliness in auth_token middleware has been around for a
long time now to handle the abstraction from different oslo.config
options and the paste overrides. This logic is now also being needed in
other middlewares. Extract this into a common config object that has a
better interface and is easier to work with.
Change-Id: I8b8a1427bc527e43bb1baec25a881d93df3f93cc