aws-samples / pcluster-manager

Manage AWS ParallelCluster through an easy to use web interface
https://pcluster.cloud
Apache License 2.0
65 stars 27 forks source link

Added security headers to improve application security posture #383

Closed BarcoMasile closed 1 year ago

BarcoMasile commented 1 year ago

Description

This PR introduces an after_request hook to register security headers for every http response returned by PCM to improve the overall security posture.

Changes

A new flask extension has been introduced to register an after request function that manipulates every Response object to add security headers. In development mode CORS is enabled so headers follow suite.

How Has This Been Tested?

This has been tested manually in a local environment and in a cloud environment in my personal account

PR Quality Checklist

In order to increase the likelihood of your contribution being accepted, please make sure you have read both the Contributing Guidelines and the Project Guidelines

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.