Skip to content

Commit

Permalink
rgw: fix printing wrong X-Storage-Url in Swift's TempAuth.
Browse files Browse the repository at this point in the history
If the option "rgw_swift_account_in_url" is being set to true,
both user and subuser IDs will be present in the X-Storage-Url
header generated by the implementation of Swift API's TempAuth.
This patch rectifies this behavior and makes that only the user
identifier will be placed there.

Fixes: http://tracker.ceph.com/issues/15667
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
(cherry picked from commit 88f4c67)
  • Loading branch information
rzarzynski authored and yehudasa committed May 9, 2016
1 parent fdf8dcb commit d93fa13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rgw/rgw_swift_auth.cc
Expand Up @@ -215,7 +215,7 @@ void RGW_SWIFT_Auth_Get::execute()
tenant_path.append(g_conf->rgw_swift_tenant_name);
} else if (g_conf->rgw_swift_account_in_url) {
tenant_path = "/AUTH_";
tenant_path.append(user_str);
tenant_path.append(info.user_id.to_str());
}

STREAM_IO(s)->print("X-Storage-Url: %s/%s/v1%s\r\n", swift_url.c_str(),
Expand Down

0 comments on commit d93fa13

Please sign in to comment.