-
Notifications
You must be signed in to change notification settings - Fork 0
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
Beissea 85 pen test fixes #248
base: dev
Are you sure you want to change the base?
Conversation
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.
CSP stuff look great, I just want to check that the change you've made to cookies is the right one.
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.
Lovely stuff 👍
Just realised: PLEASE DON'T ACTUALLY MERGE THIS! |
Just to note, while this should technically work, The way it's set up on the new platform means we're always in a dev environment. So I think we should sort out BEISSEA-86 before we merge this. I'll ask Jeni if I can prioritise that after doing the data capture ticket |
Ha, I was just going to write an identical comment. Sounds good to me. |
b836cd3
to
05ad816
Compare
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.
Making the anti forgery cookie secure broke HER, so we'll need to make an additional change to avoid that. I've put more details in a comment.
SeaPublicWebsite/Startup.cs
Outdated
private void ConfigureAntiForgeryCookieOptions(AntiforgeryOptions options) | ||
{ | ||
options.Cookie.Name = "Antiforgery"; | ||
options.Cookie.SecurePolicy = webHostEnvironment.IsDevelopment() ? CookieSecurePolicy.None : CookieSecurePolicy.Always; | ||
} | ||
|
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.
Turns out HER has this exact change and it's breaking the health check since the health check is apparently over HTTP, not HTTPS. We'll need to add in an exception to the health check endpoint that it doesn't use an anti forgery cookie.
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.
Sounds good, thanks for checking
This commit contains WIP code that should probably be removed. I have made a note on each section with a "TODO: BEISSEA-85"
No description provided.