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

Cloudfront sign cookie expire time not update #2861

Open
2 of 3 tasks
deepenpatel19 opened this issue Oct 30, 2024 · 1 comment
Open
2 of 3 tasks

Cloudfront sign cookie expire time not update #2861

deepenpatel19 opened this issue Oct 30, 2024 · 1 comment
Assignees
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@deepenpatel19
Copy link

deepenpatel19 commented Oct 30, 2024

Acknowledgements

Describe the bug

Usually, we decide when to set cookie expire. So, we are passing expire time in cookie policy statement. But, it's not updating in cookie when generated.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

It should be set expire what we pass in policy statement or cookie options.

Current Behavior

At this moment, it's giving default time.

Reproduction Steps

awsEpochTime := sign.NewAWSEpochTime(expireTimeNew)
	customStatement := sign.Statement{
		Resource: "https://*.<domain>/media/*",
		Condition: sign.Condition{
			DateLessThan: awsEpochTime,
		},
	}
	customPolicy := sign.Policy{
		Statements: []sign.Statement{
			customStatement,
		},
	}

	signedCookies, err := cookieSigner.SignWithPolicy(&customPolicy, func(co *sign.CookieOptions) {
		co.Path = "/"
		co.Domain = ".<domain>"
		co.Secure = true
	})

Here, we are passing date less than for expiry. But, it's not set expiry time in cookie.

Possible Solution

May be we can pass expire in cookie option or pick from policy statement while generating cookie.

Additional Information/Context

No response

AWS Go SDK V2 Module Versions Used

github.com/aws/aws-sdk-go-v2 v1.30.1
github.com/aws/aws-sdk-go-v2/config v1.27.11
github.com/aws/aws-sdk-go-v2/credentials v1.17.11
github.com/aws/aws-sdk-go-v2/service/rekognition v1.43.0
github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1
github.com/aws/aws-sdk-go-v2/service/sqs v1.32.6

Compiler and Version used

1.23.1

Operating System and version

Mac

@deepenpatel19 deepenpatel19 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 30, 2024
@deepenpatel19
Copy link
Author

Possible solution for this
#2862

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants