aboutsummaryrefslogtreecommitdiff
path: root/lib/reqsign.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2015-01-19 11:26:48 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2015-01-19 11:35:21 +0200
commit4d1258de786a83888d123f4e8f791f1ad6ecf605 (patch)
treee172edcda699af4b7db72f42e30f4399866b339b /lib/reqsign.c
parent0766417065bfec9747bf0f41f9b68c27e378f817 (diff)
downloadeclat-4d1258de786a83888d123f4e8f791f1ad6ecf605.tar.gz
eclat-4d1258de786a83888d123f4e8f791f1ad6ecf605.tar.bz2
Initial support for IAM
* NEWS: Update. * doc/eclat.1man: Update. * lib/.gitignore: Update. * lib/Makefile.am (libeclat_a_SOURCES): Add new files. * lib/json.h: New file. * lib/jsongrm.y: New file. * lib/jsonlex.l: New file. * lib/yytrans: New file. * lib/libeclat.h (ec2_query) <token>: New member (eclat_query_create): Change signature. * lib/qcreat.c (eclat_query_create): Take security token as 5th argument. * lib/reqsign.c (querysign2): Add security token. * src/cmdline.opt: Update copyright years * src/ec2map.c (ec2_map_get): Pass security token to eclat_query_create. * src/eclat.c (security_token): New variable. (eclat_do_command): Pass security token to eclat_query_create. (main): Get authentication credentials from the instance store, if not found in the access file. * src/eclat.h (security_token): New extern. (eclat_get_instance_creds): New proto. * src/util.c (eclat_get_instance_zone): Use json parser. (eclat_get_instance_creds): New function. * tests/Makefile.am (noinst_PROGRAMS): add tjson * tests/tjson.c: New file.
Diffstat (limited to 'lib/reqsign.c')
-rw-r--r--lib/reqsign.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/reqsign.c b/lib/reqsign.c
index 397f6c8..4250907 100644
--- a/lib/reqsign.c
+++ b/lib/reqsign.c
@@ -64,6 +64,8 @@ querysign2(struct ec2_query *req, char *secret)
eclat_query_add_param(req, "AWSAccessKeyId", req->access_key);
eclat_query_add_param(req, "SignatureMethod", "HmacSHA256");
eclat_query_add_param(req, "SignatureVersion", "2");
+ if (req->token)
+ eclat_query_add_param(req, "SecurityToken", req->token);
time(&t);
strftime(tsbuf, sizeof(tsbuf), "%Y-%m-%dT%H:%M:%SZ", gmtime(&t));

Return to:

Send suggestions and report system problems to the System administrator.