Merge lp:~itohm/nova/enable-rightaws into lp:~hudson-openstack/nova/trunk
Proposed by
Masanori Itoh
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Vish Ishaya | ||||
Approved revision: | 967 | ||||
Merged at revision: | 1061 | ||||
Proposed branch: | lp:~itohm/nova/enable-rightaws | ||||
Merge into: | lp:~hudson-openstack/nova/trunk | ||||
Diff against target: |
162 lines (+108/-9) 4 files modified
nova/auth/manager.py (+16/-6) nova/tests/test_auth.py (+37/-3) nova/tests/test_utils.py (+25/-0) nova/utils.py (+30/-0) |
||||
To merge this branch: | bzr merge lp:~itohm/nova/enable-rightaws | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Dan Prince (community) | Approve | ||
Vish Ishaya (community) | Approve | ||
Matt Dietz (community) | Needs Fixing | ||
Rick Harris (community) | Approve | ||
Review via email: mp+57370@code.launchpad.net |
Commit message
Enable RightAWS style signature checking using server_string without port number, add test cases for authenticate() and a new helper routine, and fix lp753660.
Description of the change
Enable RightAWS style signing on server_string without port number and fixes lp753660.
In short, when nova detected signature unmatch failure, try one more signature generated
using server_string without port number. e.g., drop ':8773' of '10.1.2.3:8773'
For more details, I wrote explanation why this patch is needed and pasted some evidences in the bug report.
I hope this fix makes sense for people.
To post a comment you must log in.
Looks good, nice work Masanori.
Just some *really* small style points:
> 4 + LOG.debug( 'host_only_ signature: %s', host_only_ signature)
Needs i18n treatment.
> 50 + [address, sep, port] = server_ str.partition( ':')
Might be cleaner to use `split` since the separator is ignored as well as unpacking to a tuple since that's more conventional:
(address, port) = server_ str.split( ':')
Side note: I think when/if we move to 2.7 we can eventually replace the host-extraction code with urlparse (which supports IPv6 addresses and differentiating the host and port portion of the netloc).