-
Notifications
You must be signed in to change notification settings - Fork 66
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
Set secure flag on session cookie when running on https #3877
Conversation
Going to verify this works as I expect it to on the prestaging setup as I don't have a full https enabled localfs setup. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3877 +/- ##
==========================================
- Coverage 79.26% 79.25% -0.01%
==========================================
Files 281 281
Lines 12723 12722 -1
Branches 2838 2838
==========================================
- Hits 10085 10083 -2
- Misses 2638 2639 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I'll have another look at how hard it would be to do HTTPs on localfs, in theory we should be able to share a single certificate between the forge app and the all the instances, since the certs don't care about port numbers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved as logically it looks good, but not merged while waiting on pre-staging testing results.
Have verified the cookie has the secure flag set in the prestaging env. Will merge in the morning. |
Part of https://github.com/FlowFuse/security/issues/88
Description
If we know we're running with https configured, we should set the secure flag on the session cookie. We cannot set it always on as that will break localfs installs without https configured.
I believe the test on
base_url
is the right one to do here. I've checked our helm chart sets that with ahttps
prefix if thehttps
flag is set.