Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IAM: Escape SAML metadata XML document when creating a SAML provider #8114

Merged

Conversation

infame-io
Copy link
Contributor

G'day,

When passing an XML document the characters in the XML are causing the response value to return with a different value.

Error: reading IAM SAML Provider (arn:aws:iam::123456789012:saml-provider/sso-test): operation error IAM: GetSAMLProvider, https response error StatusCode: 200, RequestID: aZ44KsVPnA1fs9yDDYUHUddNxQrOiUyu8scM4elFE6CUdtCNCI1O, deserialization failed, failed to decode response body, expected value for SAMLMetadataDocument element, got xml.StartElement type {{urn:oasis:names:tc:SAML:2.0:metadata EntityDescriptor} [{{ xmlns} urn:oasis:names:tc:SAML:2.0:metadata} {{xmlns saml} urn:oasis:names:tc:SAML:2.0:assertion} {{xmlns ds} http://www.w3.org/2000/09/xmldsig#} {{ entityID} urn:amazon:webservices} {{ validUntil} 2025-08-30T00:00:00Z}]} instead

Sample metadata included to replicate the issue.

Terraform v1.9.5
on darwin_arm64
+ provider registry.terraform.io/hashicorp/aws v5.66.0

@bblommers bblommers added this to the 5.0.15 milestone Sep 12, 2024
Copy link
Collaborator

@bblommers bblommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thank you for the fix @infame-io!

@bblommers bblommers merged commit 5c31074 into getmoto:master Sep 12, 2024
38 of 49 checks passed
Copy link
Contributor

This is now part of moto >= 5.0.15.dev8

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants