-
Notifications
You must be signed in to change notification settings - Fork 13
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
Can't find external ID upon using Grafana Assume Role #306
Comments
Notes: In addition to recreating this in Grafana Cloud, I can now reliably recreate this locally by doing the following: and then ensure assume_role_enabled is not set. Then create a new athena datasource, select grafana assume role, and you'll get a 500 with the error That error is coming from grafana-aws-sdk for go in sessions.go It seems like maybe we made a bad assumption that assume_role_enabled was true by default in cloud? Or maybe something recently changed to unset that default? In addition we seem to be forcing a backup auth type into the "default" which doesn't make sense because that is not an allowed auth type in cloud. I don't know that it makes sense to me that this only happens in athena and not cloudwatch, maybe Athena has a default query that selects SDK default by default or as a fallback? Going to keep debugging |
Ok I think the reason this happens in Athena and not Cloudwatch is because Athena uses the sqlds package which first tries to connect to the database before calling the sqlds New Datasource function that adds the custom routes of external Id This feels like a not obvious bug to fix. We have a couple of different possibilities that I can think of:
In my ideal world athena:
But all of this will take time to work out a plan. In the mean time there is a work around for this particular bug of a feature that's still in private preview for users. They need to save the (broken/empty) datasource first, then refresh the page in their browser, and then try to see the external id. Doing so will set an auth type of grafana_assume_role rather than "default", and it should work as expected. It's a wonky UI but hopefully not too burdensome as it's a one time annoyance on set up. I think the fact that this is not an easy problem to fix, is probably reflective of some bigger architectural challenges, and we have a couple of bigger projects coming up: Multi-tenancy and upgrading the new aws-sdk for go v2 that I think will end up forcing us to change a lot of this architecture, and hopefully make it easier to solve this. I think so long as the work around works, it might be better to hold off figuring out how to rewrite this until then, so we do not duplicate efforts. Going to put this in the backlog for now. |
What happened:
External ID is not displayed while creating grafana-athena-datasource when the Authentication Provider is selected as Grafana Assume Role. Tt seems like this is only a problem with new Athena datasources that enable Grafana Assume role. I tried it with a new Cloudwatch datasource in the customer's account and that one works fine. More info in the linked issue and comments!
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Screenshots
Anything else we need to know?:
Environment:
The text was updated successfully, but these errors were encountered: