7c7a1222d2
* Retrieve SAML Attribute by Name instead of relying on order which is too fragile * Handle case when SAML Attribute SessionDuration is not provided, as it is not a required attribute from SAML response When session duration not provided, AWS consider by default a duration of one hour as cited in the following documentation: "If this attribute is not present, then the credential last for one hour (the default value of the DurationSeconds parameter of the AssumeRoleWithSAML API)." https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_assertions.html#saml_role-session-duration Traceback was: [...] File "/Users/benjamin.brabant/Projects/PERSO/moto/moto/sts/responses.py", line 79, in assume_role_with_saml role = sts_backend.assume_role_with_saml( File "/Users/benjamin.brabant/Projects/PERSO/moto/moto/sts/models.py", line 99, in assume_role_with_saml role = AssumedRole(**kwargs) TypeError: __init__() missing 1 required positional argument: 'duration' * Process saml xml namespaces properly instead of relying on textual prefix that can vary between identity providers * Handle when SAML response AttributeValue xml tag contains attributes that force xmltodict to build a dictionary as for complex types instead of directly returning string value Leverage force_cdata option of xmltodict parser that always return a complex dictionary even if xml tag contains only text and no attributes. * Improve existing test_assume_role_with_saml to be coherent with other assume_role_with_saml tests and remove dead code at the same time |
||
---|---|---|
.. | ||
test_acm | ||
test_apigateway | ||
test_applicationautoscaling | ||
test_athena | ||
test_autoscaling | ||
test_awslambda | ||
test_batch | ||
test_cloudformation | ||
test_cloudwatch | ||
test_codecommit | ||
test_codepipeline | ||
test_cognitoidentity | ||
test_cognitoidp | ||
test_config | ||
test_core | ||
test_datapipeline | ||
test_datasync | ||
test_dynamodb | ||
test_dynamodb2 | ||
test_dynamodbstreams | ||
test_ec2 | ||
test_ec2instanceconnect | ||
test_ecr | ||
test_ecs | ||
test_elasticbeanstalk | ||
test_elb | ||
test_elbv2 | ||
test_emr | ||
test_events | ||
test_forecast | ||
test_glacier | ||
test_glue | ||
test_iam | ||
test_iot | ||
test_iotdata | ||
test_kinesis | ||
test_kinesisvideo | ||
test_kinesisvideoarchivedmedia | ||
test_kms | ||
test_logs | ||
test_managedblockchain | ||
test_opsworks | ||
test_organizations | ||
test_packages | ||
test_polly | ||
test_ram | ||
test_rds | ||
test_rds2 | ||
test_redshift | ||
test_resourcegroups | ||
test_resourcegroupstaggingapi | ||
test_route53 | ||
test_s3 | ||
test_s3bucket_path | ||
test_sagemaker | ||
test_secretsmanager | ||
test_ses | ||
test_sns | ||
test_sqs | ||
test_ssm | ||
test_stepfunctions | ||
test_sts | ||
test_swf | ||
test_transcribe | ||
test_utilities | ||
test_xray | ||
__init__.py | ||
helpers.py |