Skip to content

Commit

Permalink
Set default signing_dir based on os USER.
Browse files Browse the repository at this point in the history
Updates the Keystone auth_token middleware so that it sets the
default signing_dir name base on the OS username obtained
from the environment. This should help resolve potential permissions
issues which can occur when multiple OpenStack services attempt
to use the same signing directory name.

Fixes LP Bug #1031022.

Change-Id: I53bceed27f60721b8f61ffec2d1e91ec2ea464ed
  • Loading branch information
dprince committed Jul 30, 2012
1 parent 73556fa commit 4444577
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion keystone/middleware/auth_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ def __init__(self, app, conf):
self.key_file = conf.get('keyfile')

#signing
self.signing_dirname = conf.get('signing_dir', '/tmp/keystone-signing')
default_signing_dir = '/tmp/keystone-signing-%s' % os.environ['USER']
self.signing_dirname = conf.get('signing_dir', default_signing_dir)
if (os.path.exists(self.signing_dirname) and
not os.access(self.signing_dirname, os.W_OK)):
raise "TODO: Need to find an Exception to raise here."
Expand Down

0 comments on commit 4444577

Please sign in to comment.