• Home
  • Raw
  • Download

Lines Matching +full:github +full:- +full:token

7 #      http://www.apache.org/licenses/LICENSE-2.0
34 SERVICE_ACCOUNT_EMAIL = "service-1234@service-name.iam.gserviceaccount.com"
36 "https://us-east1-iamcredentials.googleapis.com/v1/projects/-"
41 TOKEN_URL = "https://sts.googleapis.com/v1/token"
42 SUBJECT_TOKEN_TYPE = "urn:ietf:params:aws:token-type:aws4_request"
44 REGION_URL = "http://169.254.169.254/latest/meta-data/placement/availability-zone"
45 SECURITY_CREDS_URL = "http://169.254.169.254/latest/meta-data/iam/security-credentials"
47 "https://sts.{region}.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15"
49 # Sample AWS security credentials to be used with tests that require a session token.
52 TOKEN = "IQoJb3JpZ2luX2VjEIz//////////wEaCXVzLWVhc3QtMiJGMEQCIH7MHX/Oy/OB8OlLQa9GrqU1B914+iMikqWQW7… variable
60 …# https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/a…
61 …# https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/a…
63 "us-east-1",
64 "2011-09-09T23:36:00Z",
78 …"Authorization": "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, Si…
85 …# https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/a…
86 …# https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/a…
88 "us-east-1",
89 "2011-09-09T23:36:00Z",
103 …"Authorization": "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, Si…
110 …# https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/a…
111 …# https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/a…
113 "us-east-1",
114 "2011-09-09T23:36:00Z",
128 …"Authorization": "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, Si…
135 …# https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/a…
136 …# https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/a…
138 "us-east-1",
139 "2011-09-09T23:36:00Z",
153 …"Authorization": "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, Si…
160 …# https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/a…
161 …# https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/a…
163 "us-east-1",
164 "2011-09-09T23:36:00Z",
178 …"Authorization": "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, Si…
185 …# https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/a…
186 …# https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/a…
188 "us-east-1",
189 "2011-09-09T23:36:00Z",
203 …"Authorization": "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, Si…
210 …# https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/a…
211 …# https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/a…
213 "us-east-1",
214 "2011-09-09T23:36:00Z",
228 …"Authorization": "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, Si…
235 …# https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/a…
236 …# https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/a…
238 "us-east-1",
239 "2011-09-09T23:36:00Z",
257 …"Authorization": "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, Si…
264 …# https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/a…
265 …# https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/a…
267 "us-east-1",
268 "2011-09-09T23:36:00Z",
282 …"Authorization": "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, Si…
290 …# https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/a…
291 …# https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/a…
293 "us-east-1",
294 "2011-09-09T23:36:00Z",
308 …"Authorization": "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, Si…
316 …# https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/a…
317 …# https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/a…
319 "us-east-1",
320 "2011-09-09T23:36:00Z",
334 …"Authorization": "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, Si…
342 …# https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/a…
343 …# https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/a…
345 "us-east-1",
346 "2011-09-09T23:36:00Z",
355 "Content-Type": "application/x-www-form-urlencoded",
364 …"Authorization": "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, Si…
366 "Content-Type": "application/x-www-form-urlencoded",
373 …# https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/a…
374 …# https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/a…
376 "us-east-1",
377 "2011-09-09T23:36:00Z",
391 …"Authorization": "AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, Si…
397 # GET request with session token credentials.
399 "us-east-2",
400 "2020-08-11T06:55:22Z",
404 "security_token": TOKEN,
408 "url": "https://ec2.us-east-2.amazonaws.com?Action=DescribeRegions&Version=2013-10-15",
411 "url": "https://ec2.us-east-2.amazonaws.com?Action=DescribeRegions&Version=2013-10-15",
414 "Authorization": "AWS4-HMAC-SHA256 Credential="
416 …+ "/20200811/us-east-2/ec2/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signa…
417 "host": "ec2.us-east-2.amazonaws.com",
418 "x-amz-date": "20200811T065522Z",
419 "x-amz-security-token": TOKEN,
423 # POST request with session token credentials.
425 "us-east-2",
426 "2020-08-11T06:55:22Z",
430 "security_token": TOKEN,
434 … "url": "https://sts.us-east-2.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15",
437 … "url": "https://sts.us-east-2.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15",
440 "Authorization": "AWS4-HMAC-SHA256 Credential="
442 …+ "/20200811/us-east-2/sts/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signa…
443 "host": "sts.us-east-2.amazonaws.com",
444 "x-amz-date": "20200811T065522Z",
445 "x-amz-security-token": TOKEN,
449 # POST request with computed x-amz-date and no data.
451 "us-east-2",
452 "2020-08-11T06:55:22Z",
456 … "url": "https://sts.us-east-2.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15",
459 … "url": "https://sts.us-east-2.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15",
462 "Authorization": "AWS4-HMAC-SHA256 Credential="
464 …+ "/20200811/us-east-2/sts/aws4_request, SignedHeaders=host;x-amz-date, Signature=d095ba304919cd0d…
465 "host": "sts.us-east-2.amazonaws.com",
466 "x-amz-date": "20200811T065522Z",
470 # POST request with session token and additional headers/data.
472 "us-east-2",
473 "2020-08-11T06:55:22Z",
477 "security_token": TOKEN,
481 "url": "https://dynamodb.us-east-2.amazonaws.com/",
483 "Content-Type": "application/x-amz-json-1.0",
484 "x-amz-target": "DynamoDB_20120810.CreateTable",
489 "url": "https://dynamodb.us-east-2.amazonaws.com/",
492 "Authorization": "AWS4-HMAC-SHA256 Credential="
494 …+ "/20200811/us-east-2/dynamodb/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-sec…
495 "host": "dynamodb.us-east-2.amazonaws.com",
496 "x-amz-date": "20200811T065522Z",
497 "Content-Type": "application/x-amz-json-1.0",
498 "x-amz-target": "DynamoDB_20120810.CreateTable",
499 "x-amz-security-token": TOKEN,
515 utcnow.return_value = datetime.datetime.strptime(time, "%Y-%m-%dT%H:%M:%SZ")
528 request_signer = aws.RequestSigner("us-east-2")
543 request_signer = aws.RequestSigner("us-east-2")
558 request_signer = aws.RequestSigner("us-east-2")
574 AWS_REGION = "us-east-2"
575 AWS_ROLE = "gcp-aws-role"
579 "Token": TOKEN,
581 AWS_SIGNATURE_TIME = "2020-08-11T06:55:22Z"
590 "issued_token_type": "urn:ietf:params:oauth:token-type:access_token",
600 region_name="us-east-2",
601 url="https://sts.us-east-2.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15",
621 "key": "x-amz-date",
622 "value": signed_request.get("headers").get("x-amz-date"),
626 # Include security token if available.
630 "key": "x-amz-security-token",
631 "value": signed_request.get("headers").get("x-amz-security-token"),
634 # Append x-goog-cloud-target-resource header.
636 {"key": "x-goog-cloud-target-resource", "value": AUDIENCE}
660 various endpoints will respond while generating a Google Access token
669 region_response.data = "{}b".format(region_name).encode("utf-8")
677 role_response.data = role_name.encode("utf-8")
689 ).encode("utf-8")
693 # GCP token exchange request.
696 token_response.data = json.dumps(token_data).encode("utf-8")
705 impersonation_response.data = json.dumps(impersonation_data).encode("utf-8")
760 assert v.decode("utf-8") == request_data[k.decode("utf-8")]
774 body_json = json.loads(request_kwargs["body"].decode("utf-8"))
952 self.AWS_SIGNATURE_TIME, "%Y-%m-%dT%H:%M:%SZ"
970 "security_token": TOKEN,
985 {"Content-Type": "application/json"},
1008 {"Content-Type": "application/json"},
1015 # Simualte a permanent credential without a session token is
1016 # returned by the security-credentials endpoint.
1018 security_creds_response.pop("Token")
1020 self.AWS_SIGNATURE_TIME, "%Y-%m-%dT%H:%M:%SZ"
1042 monkeypatch.setenv(environment_vars.AWS_SESSION_TOKEN, TOKEN)
1045 self.AWS_SIGNATURE_TIME, "%Y-%m-%dT%H:%M:%SZ"
1055 "security_token": TOKEN,
1065 monkeypatch.setenv(environment_vars.AWS_SESSION_TOKEN, TOKEN)
1068 self.AWS_SIGNATURE_TIME, "%Y-%m-%dT%H:%M:%SZ"
1078 "security_token": TOKEN,
1088 monkeypatch.setenv(environment_vars.AWS_SESSION_TOKEN, TOKEN)
1095 self.AWS_SIGNATURE_TIME, "%Y-%m-%dT%H:%M:%SZ"
1105 "security_token": TOKEN,
1117 self.AWS_SIGNATURE_TIME, "%Y-%m-%dT%H:%M:%SZ"
1133 monkeypatch.setenv(environment_vars.AWS_SESSION_TOKEN, TOKEN)
1135 self.AWS_SIGNATURE_TIME, "%Y-%m-%dT%H:%M:%SZ"
1149 "security_token": TOKEN,
1178 # Simulate the security-credentials url is missing. This is needed for
1213 self.AWS_SIGNATURE_TIME, "%Y-%m-%dT%H:%M:%SZ"
1219 "security_token": TOKEN,
1223 "Content-Type": "application/x-www-form-urlencoded",
1227 "grant_type": "urn:ietf:params:oauth:grant-type:token-exchange",
1229 "requested_token_type": "urn:ietf:params:oauth:token-type:access_token",
1261 assert credentials.token == self.SUCCESS_RESPONSE["access_token"]
1269 self.AWS_SIGNATURE_TIME, "%Y-%m-%dT%H:%M:%SZ"
1275 "security_token": TOKEN,
1279 "Content-Type": "application/x-www-form-urlencoded",
1283 "grant_type": "urn:ietf:params:oauth:grant-type:token-exchange",
1285 "requested_token_type": "urn:ietf:params:oauth:token-type:access_token",
1317 assert credentials.token == self.SUCCESS_RESPONSE["access_token"]
1325 self.AWS_SIGNATURE_TIME, "%Y-%m-%dT%H:%M:%SZ"
1334 "security_token": TOKEN,
1338 "Content-Type": "application/x-www-form-urlencoded",
1342 "grant_type": "urn:ietf:params:oauth:grant-type:token-exchange",
1344 "requested_token_type": "urn:ietf:params:oauth:token-type:access_token",
1355 "Content-Type": "application/json",
1357 "x-goog-user-project": QUOTA_PROJECT_ID,
1401 assert credentials.token == impersonation_response["accessToken"]
1409 self.AWS_SIGNATURE_TIME, "%Y-%m-%dT%H:%M:%SZ"
1418 "security_token": TOKEN,
1422 "Content-Type": "application/x-www-form-urlencoded",
1426 "grant_type": "urn:ietf:params:oauth:grant-type:token-exchange",
1428 "requested_token_type": "urn:ietf:params:oauth:token-type:access_token",
1439 "Content-Type": "application/json",
1441 "x-goog-user-project": QUOTA_PROJECT_ID,
1485 assert credentials.token == impersonation_response["accessToken"]