grafana / athena-datasource

Apache License 2.0
38 stars 12 forks source link

When a FIPS endpoint and Assume Role are set, queries return error #296

Closed iwysiu closed 9 months ago

iwysiu commented 10 months ago

What happened: When using a FIPS endpoint with an Assume Role, the resource handlers return the error SerializationError: failed to unmarshal error message\n\tstatus code: 404, request id: 4311b0d7-6450-4068-8e0a-18de87671a32\ncaused by: UnmarshalError: failed to unmarshal error message\n\t00000000 3c 55 6e 6b 6e 6f 77 6e 4f 70 65 72 61 74 69 6f |<UnknownOperatio|\n00000010 6e 45 78 63 65 70 74 69 6f 6e 2f 3e 0a |nException/>.|\n\ncaused by: unknown error response tag, {{ UnknownOperationException} []}. Note that this doesn't happen if we set only an Assume Role or only a FIPS endpoint.

Reported in https://github.com/grafana/support-escalations/issues/8225.

What you expected to happen: I expect the query to succeed and not error.

How to reproduce it (as minimally and precisely as possible): Use the AWS Athena assume role role from plugin-provisioning and set the endpoint to athena-fips.us-east-2.amazonaws.com. If you try to set any of the Athena Details, it will fail to fetch the options with the error above.

Screenshots

Anything else we need to know?:

Environment:

(It was reported on this version, but I can still reproduce it with both on main)

iwysiu commented 9 months ago

Will be fixed once https://github.com/grafana/grafana-aws-sdk/pull/108 is released and we update the version for grafana-aws-sdk in the Athena repo