summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@inktank.com>2012-11-08 17:24:53 -0800
committerYehuda Sadeh <yehuda@inktank.com>2012-11-08 17:24:53 -0800
commit1ba969b18000aa0150410860b8305db2d5679e7e (patch)
treee75bcb04a4d9fb4620f49b8ee977eaf897a722e9
parent2475d0143b17ad4470009b62682d0e5845673e8c (diff)
parent3162f13662381c96b3033f445163801acc4f3dd8 (diff)
downloadceph-1ba969b18000aa0150410860b8305db2d5679e7e.tar.gz
Merge remote-tracking branch 'origin/wip-swift-token' into wip-rgw-integration
-rw-r--r--src/common/config_opts.h1
-rw-r--r--src/rgw/rgw_swift_auth.cc2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/common/config_opts.h b/src/common/config_opts.h
index 5db0889dd20..eb35c743d62 100644
--- a/src/common/config_opts.h
+++ b/src/common/config_opts.h
@@ -439,6 +439,7 @@ OPTION(rgw_keystone_token_cache_size, OPT_INT, 10000) // max number of entries
OPTION(rgw_keystone_revocation_interval, OPT_INT, 15 * 60) // seconds between tokens revocation check
OPTION(rgw_admin_entry, OPT_STR, "admin") // entry point for which a url is considered an admin request
OPTION(rgw_enforce_swift_acls, OPT_BOOL, true)
+OPTION(rgw_swift_token_expiration, OPT_INT, 24 * 3600) // time in seconds for swift token expiration
OPTION(rgw_print_continue, OPT_BOOL, true) // enable if 100-Continue works
OPTION(rgw_remote_addr_param, OPT_STR, "REMOTE_ADDR") // e.g. X-Forwarded-For, if you have a reverse proxy
OPTION(rgw_op_thread_timeout, OPT_INT, 10*60)
diff --git a/src/rgw/rgw_swift_auth.cc b/src/rgw/rgw_swift_auth.cc
index 47390fb48c1..b0be5d45938 100644
--- a/src/rgw/rgw_swift_auth.cc
+++ b/src/rgw/rgw_swift_auth.cc
@@ -49,7 +49,7 @@ static int encode_token(CephContext *cct, string& swift_user, string& key, buffe
return ret;
utime_t expiration = ceph_clock_now(cct);
- expiration += RGW_SWIFT_TOKEN_EXPIRATION; // 15 minutes
+ expiration += cct->_conf->rgw_swift_token_expiration;
ret = build_token(swift_user, key, nonce, expiration, bl);