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

Cleaning and fixing security issues #95

Merged
merged 7 commits into from
Aug 9, 2024
Merged

Cleaning and fixing security issues #95

merged 7 commits into from
Aug 9, 2024

Conversation

lebaudantoine
Copy link
Collaborator

@lebaudantoine lebaudantoine commented Aug 3, 2024

Purpose

General cleanup and fixing a few issues.

Proposal

These changes are intended to improve the codebase and resolve several issues. The commit 04f1198 is still not working. I need to pair program with @sampaccoud to address these issues.

@lebaudantoine lebaudantoine changed the title [Wip] clean projects and logs Cleaning and fixing security issues Aug 5, 2024
@lebaudantoine lebaudantoine marked this pull request as ready for review August 5, 2024 15:25
Room model uses a default value for its configuration.
However, I used a wrong default value, it should be a callable.

Align the code with Magnify.
Some outdated references to Terraform and OpenStack were missed during
the project quickstart. These are legacy elements inherited from OpenFun.

This commit cleans up the codebase.
Silenced certain Django security warnings because the application is served
behind a reverse proxy. These warnings are not applicable in our deployment
context, where the reverse proxy handles these security concerns.

This change ensures relevant security measures are appropriately managed
while avoiding unnecessary warnings. Any question? asked @rouja.

/!\ actually, this commit is not working, and should be fixed.
Updated the liveness and readiness probes interval from every 10 seconds to
every 30 seconds. This change reduces the load on the server by decreasing
the frequency of health checks.

Given the current stability of the application, a 30-second interval is
sufficient to ensure that the application remains responsive and healthy.
Few scripts were duplicated between the scripts and the bin folders.
Reorganize the scripts in a common folder, and align filenames to
follow the same rule.
Updated Django's ALLOWED_HOSTS setting from '*' to the specific host of the
server. Setting ALLOWED_HOSTS to '*' is a security risk as it allows any host
to access the application, potentially exposing it to malicious attacks.
Restricting ALLOWED_HOSTS to the server's host ensures only legitimate
requests are processed.

In a Kubernetes environment, we also needed to whitelist the pod's IP address
to allow health checks to pass. This ensures that Kubernetes liveness and
readiness probes can access the application to verify its health.
Addressed missing migrations for the user's language field,
ensuring recent updates are correctly applied.
@lebaudantoine lebaudantoine merged commit 925eb92 into main Aug 9, 2024
7 of 9 checks passed
@lebaudantoine lebaudantoine deleted the clean branch August 9, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants