badarsebard / terraform-provider-xsoar

Apache License 2.0
9 stars 3 forks source link

Add headers from env #13

Open rwblokzijl opened 1 year ago

rwblokzijl commented 1 year ago

This PR add the ability to add headers to the XSOAR requests from live environment variables. This allows the requests to the XSOAR servers to pass through Authenticated Proxies. The reason we use environment variables is that authentication tokens are short lived and might need be different between an apply and plan depending on how far apart they are in time. Our use case was the google IAP, but we implemented this in a general way in order to be able to commit back upstream. Code example:

provider "xsoar" { 
  ...
  http_headers_from_env = {
    Proxy-Authorization = "IAP_AUTH_HEADER"
  }
}
rwblokzijl commented 1 year ago

@jrauen @badarsebard would you consider merging this? I think its a good feature to have :)