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

Custom session duration #58

Merged
merged 5 commits into from
Jun 23, 2022
Merged

Custom session duration #58

merged 5 commits into from
Jun 23, 2022

Conversation

sunker
Copy link
Collaborator

@sunker sunker commented Jun 22, 2022

A customer has reported that they're getting SignatureDoesNotMatch errors while running multiple CloudWatch logs queries in parallel. They're using AWS SDK Default auth and they're assuming a role. We have not been able to repro this issue, but the theory is that the logs query is started using temporary STS credentials that lasts for 15 minutes. The query then runs for more than 15 minutes, so once it's completed different credentials are being used compared to when the query started.

Once this is released, the customer will be able to test this by setting the new environment variable AWS_SESSION_DURATION to a duration longer than the default value (currently 15 minutes in STS).

This PR is still in draft mode because we're waiting for approval from the customer to help us test this in future 9.0 patch release.

The customer has confirmed that they're willing to help us test this. https://github.com/grafana/support-escalations/issues/2642

@sunker sunker requested a review from andresmgot June 22, 2022 11:47
@CLAassistant
Copy link

CLAassistant commented Jun 22, 2022

CLA assistant check
All committers have signed the CLA.

@sunker sunker marked this pull request as ready for review June 23, 2022 11:15
Copy link
Contributor

@andresmgot andresmgot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a couple of minor comments

@@ -46,7 +47,11 @@ const AllowedAuthProvidersEnvVarKeyName = "AWS_AUTH_AllowedAuthProviders"
// AssumeRoleEnabledEnvVarKeyName is the string literal for the aws assume role enabled environment variable key name
const AssumeRoleEnabledEnvVarKeyName = "AWS_AUTH_AssumeRoleEnabled"

// SessionDurationEnvVarKeyName is the string literal for the session duration variable key name
const SessionDurationEnvVarKeyName = "AWS_SESSION_DURATION"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to keep the naming consistent I would define this as AWS_AUTH_SessionDuration

pkg/awsds/sessions.go Outdated Show resolved Hide resolved
sunker and others added 2 commits June 23, 2022 13:48
Co-authored-by: Andres Martinez Gotor <andres.mgotor@gmail.com>
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

3 participants