terraform-provider-opensearch
terraform-provider-opensearch copied to clipboard
[BUG] HTTP 403 when basic authentication is configured
What is the bug?
If you configure the provider to use basic authentication you will receive HTTP 403s unless you explicitly disable sign_aws_requests
. The error message is quite confusing since the credentials are correct.
│ Error: HTTP 403 Forbidden: Permission denied. Please ensure that the correct credentials are being used to access the cluster.
How can one reproduce the bug?
provider "opensearch" {
url = "..."
username = "..."
password = "..."
healthcheck = false
# sign_aws_requests = false
}
What is the expected behavior?
The provider should work by just specify a username and password for HTTP basic auth.
I'm thinking about filing a pull request which just uses a normal HTTP client when basic auth is configured.
[Untriage]
Thanks @Sovietaced, a document PR went in https://github.com/opensearch-project/terraform-provider-opensearch/pull/114 and an open PR https://github.com/opensearch-project/terraform-provider-opensearch/pull/117 to auto disable sign_aws_requests
when using basic auth, pending adding some unit tests and review.
Thank you
Adding @bbarani @rblcoder