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

Allow the accepted types to be specified in the resource #15

Closed
mvanholsteijn opened this issue Jan 11, 2019 · 5 comments
Closed

Allow the accepted types to be specified in the resource #15

mvanholsteijn opened this issue Jan 11, 2019 · 5 comments
Assignees

Comments

@mvanholsteijn
Copy link

Hi there,
I would like to download the SAML metadata document and use it in my SAML provider in AWS. Unfortunately the http provider does not allow you to do that.

My suggestion is to use the "Accept" request header value to determine whether or not the data is accepted.

Terraform Version

Terraform v0.11.7
+ provider.auth0 v0.1.11
+ provider.http v1.0.1

Affected Resource(s)

  • http

Terraform Configuration Files

data "http" "auth0-saml-metadata" {
  url = "https://${var.auth0_domain}/samlp/metadata/${auth0_client.oauth-cli.client_id}"
		request_headers {
    "Accept" = "application/xml"
  }
}

resource "aws_iam_saml_provider" "default" {
  name                   = "auth0-${replace(var.auth0_domain,".","-")}-provider"
  saml_metadata_document = "${data.http.auth0-saml-metadata.body}"
}

Expected Behavior

The SAML metadata document is downloaded and its body passed into the IAM SAML provider.

Actual Behavior

* data.http.auth0-saml-metadata: data.http.auth0-saml-metadata: Content-Type is not a text type. Got: application/xml; charset=utf-8

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply
data "http" "auth0-saml-metadata" {
  url = "http://httpbin.org/xml"
}

References

mvanholsteijn added a commit to binxio/terraform-provider-http that referenced this issue Jan 11, 2019
mvanholsteijn added a commit to binxio/terraform-provider-http that referenced this issue Jan 11, 2019
mvanholsteijn added a commit to binxio/terraform-provider-http that referenced this issue Jan 11, 2019
mvanholsteijn added a commit to binxio/terraform-provider-http that referenced this issue Jan 11, 2019
@tmccombs
Copy link

@mvanholsteijn are you planning on opening a PR to address this?

@mvanholsteijn
Copy link
Author

mvanholsteijn commented Oct 30, 2019

@tmccombs I did create a PR -> #16. I added the functionality in the style of the current code but unfortunately, the reviewer wanted to have a completed different implementation.

@seboudry
Copy link

Hi @aicarmic !

Any update about when this feature will be available?

@paultyng
Copy link
Contributor

This should be resolved now in #50

Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants