-
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
[CORE-27] Add CSP Header #334
Conversation
auth { | ||
googleClientId = "" | ||
} | ||
|
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.
Tests were failing due to this missing reference.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #334 +/- ##
===========================================
+ Coverage 55.92% 59.27% +3.35%
===========================================
Files 17 18 +1
Lines 633 636 +3
Branches 69 68 -1
===========================================
+ Hits 354 377 +23
+ Misses 279 259 -20 ☔ View full report in Codecov by Sentry. |
Note: Some of these changes were formatting related to scalafmt! |
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.
This code calls addCSP
in 3 places, once in Main which covers all routes, then 2 other redundant times in ThurloeServiceActor
. I think it need only be called once but it makes more sense to have that be in ThurloeServiceActor
where route
is defined:
def route: Route = addCSP {
swaggerUiService ~ statusRoute ~ fireCloudProtectedRoutes
}
Alternately, we could do this in the apache proxy.
Jira: https://broadworkbench.atlassian.net/browse/CORE-27
Description:
This PR adds a Content Security Policy (CSP) header to the Thurloe Swagger page and endpoints to enhance security by reducing the risk of cross-site scripting (XSS) and data injection attacks.
Testing: