numerous-tent-25319
07/16/2022, 11:32 AMdatahub-datahub-gms
not able to connect with elasticsearch. Getting following error in the log
2022/07/16 11:25:03 Received 403 from <https://vpc--datahubes-vsqu3edgv5tsiyshvnq.ap-south-1.es.amazonaws.com:443>. Sleeping 1s
2022/07/16 11:25:04 Received 403 from <https://vpc-datahubes-vsqu3edgv5tsiyshvnq.ap-south-1.es.amazonaws.com:443>. Sleeping 1s
While we have attached the serviceAccount with the pods and the AWS IAM role is also whitelisted in the resource policy with proper permission.
I want to confirm that does datahub support AWS signature version 4 to make connection with AWS elasticsearch.fancy-thailand-73281
07/18/2022, 9:13 PMlittle-megabyte-1074
fancy-thailand-73281
07/20/2022, 10:25 PM{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": "es:*",
"Resource": "arn:aws:es:us-east-1:{aws_account_number}:domain/{elastic_search_name}/*"
}
]
}
numerous-tent-25319
07/22/2022, 5:28 AMfancy-thailand-73281
07/22/2022, 2:28 PMchilly-daybreak-28356
02/22/2023, 10:53 AM{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::{account_id:role/{my_role}"
},
"Action": "es:*",
"Resource": "arn:aws:es:{region}:{account_id}:domain/{my_domain}/*"
}
]
}
@numerous-tent-25319 were you able to get this working using a resource policy with a role ARN specified as the principal?victorious-spoon-76468
03/14/2023, 6:24 PMchilly-daybreak-28356
03/21/2023, 11:06 AMgreen-honey-91903
04/06/2023, 11:57 PMdatahub-gms
service and created an opensearch client from within it. This container has the same exact env vars, certs, uses the same serviceAccount, etc as datahub-gms
. Using a python opensearch client and boto3, we’re able to reach opensearch with only role specific access policies applied.
This leads me to believe the clients used by datahub-gms
and datahub-elasticsearch-setup-job
are configured to only access elasticsearch/opensearch with username:password.
happy to help the datahub team investigate this further if needed (or be corrected)!