Skip to content
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

Add Support for Temporary Credentials in Grafana Cloud #84

Merged
merged 5 commits into from
Jul 26, 2023

Conversation

sarahzinger
Copy link
Member

@sarahzinger sarahzinger commented Jul 7, 2023

Adding support for experimental/beta feature to allow the use of AWS Temporary Credentials in Grafana Cloud.

To test locally :

  • in main grafana enable the feature toggle awsDatasourcesTempCredentials
  • npm link to the latest version of main of https://github.com/grafana/grafana-aws-sdk-react (assuming it hasn't been published yet)
  • pull these changes locally in your version of grafana-aws-sdk
  • add a line to go.mod in main grafana to connect to your local version of the sdk like so replace github.com/grafana/grafana-aws-sd => /Users/yourfilepathtothegrafana-aws-sdk
  • add a long term aws user's access key and secret key to a .aws/credentials file under the profile name [assume_role_credentials] (sarah or ida can point you to an existing one if you need)
  • make sure that user has sts permissions
  • create a role (not user!) in aws with the required cloudwatch permissions. Create a trust relationship with the AWS account that has the long term credentials. Choose an externalId. (Alternatively if you want to use one Sarah and Ida have been using we can point you to it)
  • Set that externalId in the custom.ini

You should now be able to auth with the new GrafanaAssumeRole feature.

pkg/awsds/sessions.go Outdated Show resolved Hide resolved
@sarahzinger sarahzinger changed the title WIP: Temp Credentials Add Support for Temporary Credentials in Grafana Cloud Jul 21, 2023
@idastambuk
Copy link
Contributor

Tested it in local and it works with the creds file and externalId. Let's see tomorrow what we can do about the backend feature toggle check though!

@sarahzinger sarahzinger merged commit 0d9653e into main Jul 26, 2023
3 checks passed
@sarahzinger sarahzinger deleted the temp-credentials branch July 26, 2023 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants