-
Notifications
You must be signed in to change notification settings - Fork 134
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
Error: HTTP 403 Forbidden: Permission denied. Please ensure that the correct credentials are being used to access the cluster #318
Comments
Hi,
and the error I am getting is |
Hello, what steps have you taken so far to debug the issue? The error message is descriptive in this case: the provider does not have permission to access the cluster. You can also search this repository for similar issues in the past: https://github.com/phillbaker/terraform-provider-elasticsearch/issues?q=is%3Aissue+403 Please include the following information:
Note: Issues on this repository are for reporting bugs and feature requests for this provider, not providing support for unique environments. In order to investigate this, a reproducible case should be provided, if that can't be provided, we'll have to close this issue to focus on widely impacting issues. |
Hello, |
Hi @phillbaker I think I am running into this issue as well (or something similar). As far as I can tell what is happening is the provider detects AWS from the url even if you specify a username and password, then tries to authenticate with AWS. This creates some confusion where the provider attempts to use AWS credentials even though they may not be configured properly for that specific opensearch/elasticsearch instance. Could we add a setting to select auth method? The offending line is here: https://github.com/phillbaker/terraform-provider-elasticsearch/blob/master/es/provider.go#L323 I can create a PR if you think this is the appropriate solution, thanks. |
I use this to connect to AWS, notice the after this, all started to work
|
@jlyon12345 sorry for the slow response, but a PR would be great!
…On Wed, Jan 4, 2023 at 9:58 PM higuita ***@***.***> wrote:
I use this to connect to AWS, notice the sign_aws_requests = false , that
looks like is required in AWS when using plain username/password
after this, all started to work
provider "elasticsearch" {
url = "https://vpc-logs-staging-rnux7f6m.eu-west-1.es.amazonaws.com:443/"
kibana_url = "https://vpc-logs-staging-rnux7f6m.eu-west-1.es.amazonaws.com/_dashboards"
sign_aws_requests = false
username = "admin"
password = data.pass_password.admin_pass.password
healthcheck = false
sniff = false
}
—
Reply to this email directly, view it on GitHub
<#318 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAXCKOU5IQAADJBA7SPUTLWQY2FZANCNFSM6AAAAAAQ5V5HTU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Facing similar issue when Fine Grain Access Control is enabled for opensearch domain. I tried curl from the same machine and it worked.
Below is the configuration which I have
The error I am getting
|
@rishabhToshniwal were you able to resolve your issue? I am seeing the same problem. I can curl it manually just fine but I get 403 through the terraform module. |
again, read my comment: #318 (comment) This works fine for me:
|
Dear, I'm getting the following error
Error: HTTP 403 Forbidden: Permission denied. Please ensure that the correct credentials are being used to access the cluster
There was a test with the master user and with another user created, both have the same error.
Could you please help me? Thanks
The text was updated successfully, but these errors were encountered: