saladenicoise / SOEN-487-Galactus

Final Project for SOEN 487
4 stars 1 forks source link

Issue#52 task scheduler #53

Closed eyeshield2110 closed 1 year ago

eyeshield2110 commented 1 year ago

First version of the job scheduler process in the Notification service as came up by @allfatherWednesday.

High level idea:

Note about the Data service: We should implement a job scheduler in the Data service that periodically updates the Redis cache's weather in the background, instead of relying on User Browser requests to update the cached weather. This would make the Notification service actually real-time (because an Alert system that's triggered by browser request is not really real-time)

gitguardian[bot] commented 1 year ago

⚠️ GitGuardian has uncovered 8 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
| GitGuardian id | Secret | Commit | Filename | | | -------------- | ------------------------- | ---------------- | --------------- | -------------------- | | [6164697](https://dashboard.gitguardian.com/incidents/6164697?occurrence=89225072) | Generic High Entropy Secret | 2761449cfeb4d9675bb9811be15636b355aabb6d | notify-nexus/send_test_notification.js | [View secret](https://github.com/saladenicoise/SOEN-487-Galactus/commit/2761449cfeb4d9675bb9811be15636b355aabb6d#diff-188b496882e299f59e973a55adf4b06876a696b9ac5e2aad56e77fd835663addR5) | | [6164697](https://dashboard.gitguardian.com/incidents/6164697?occurrence=89494028) | Generic High Entropy Secret | bbf5dc18e6715804ca5a36c34757fdfadc139b02 | notify-nexus/send_test_notification.js | [View secret](https://github.com/saladenicoise/SOEN-487-Galactus/commit/bbf5dc18e6715804ca5a36c34757fdfadc139b02#diff-188b496882e299f59e973a55adf4b06876a696b9ac5e2aad56e77fd835663addL5) | | [6171532](https://dashboard.gitguardian.com/incidents/6171532?occurrence=89512735) | AMQP Credentials | 7b24adfed5eec0206180251dcaa4339c677828ff | data-demon/producer.js | [View secret](https://github.com/saladenicoise/SOEN-487-Galactus/commit/7b24adfed5eec0206180251dcaa4339c677828ff#diff-1dc9a1e3d01eb8507c47927855ef622ce976ef9e519c1f16bf35301215d54a62R3) | | [6171532](https://dashboard.gitguardian.com/incidents/6171532?occurrence=89512736) | AMQP Credentials | 7b24adfed5eec0206180251dcaa4339c677828ff | notify-nexus/consumer.js | [View secret](https://github.com/saladenicoise/SOEN-487-Galactus/commit/7b24adfed5eec0206180251dcaa4339c677828ff#diff-9b103a33244bff2b6ceccb8bc935fd1e5aeafc84329ed9b2ac166088ac88c34aR3) | | [6171532](https://dashboard.gitguardian.com/incidents/6171532?occurrence=89512737) | AMQP Credentials | 7b24adfed5eec0206180251dcaa4339c677828ff | notify-nexus/producer.js | [View secret](https://github.com/saladenicoise/SOEN-487-Galactus/commit/7b24adfed5eec0206180251dcaa4339c677828ff#diff-8e9c0c6ad6dc1f78301f7ec740fa850fbee448eb1d688f8f6cf7f5e7cb7ea815R3) | | [6186110](https://dashboard.gitguardian.com/incidents/6186110?occurrence=89494503) | Bearer Token | f5a1c5d7f2f0424c1c55a4688bd06fa1eb74bc7e | notify-nexus/scheduler/jobs/alert_scheduler.sh | [View secret](https://github.com/saladenicoise/SOEN-487-Galactus/commit/f5a1c5d7f2f0424c1c55a4688bd06fa1eb74bc7e#diff-03ce87e337f023ec776a01690dc0da8e0fc54e38ee8aaf6e414f824e646ac372R3) | | [6186110](https://dashboard.gitguardian.com/incidents/6186110?occurrence=89494504) | Bearer Token | f5a1c5d7f2f0424c1c55a4688bd06fa1eb74bc7e | notify-nexus/scheduler/jobs/alert_template.sh | [View secret](https://github.com/saladenicoise/SOEN-487-Galactus/commit/f5a1c5d7f2f0424c1c55a4688bd06fa1eb74bc7e#diff-962c2924c3ea0bc01ea86f7cce1d214c6b63115d46b8b6228eb3c1a9b365eb7dR8) | | [6186111](https://dashboard.gitguardian.com/incidents/6186111?occurrence=89494502) | Generic High Entropy Secret | f5a1c5d7f2f0424c1c55a4688bd06fa1eb74bc7e | notify-nexus/testing_notification.js | [View secret](https://github.com/saladenicoise/SOEN-487-Galactus/commit/f5a1c5d7f2f0424c1c55a4688bd06fa1eb74bc7e#diff-a1422e16841c82500e2fee4be58559b3143c7b30bcec47a1e317930955c47f6fR5) |
🛠 Guidelines to remediate hardcoded secrets
1. Understand the implications of revoking this secret by investigating where it is used in your code. 2. Replace and store your secrets safely. [Learn here](https://blog.gitguardian.com/secrets-api-management?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) the best practices. 3. Revoke and [rotate these secrets](https://docs.gitguardian.com/secrets-detection/detectors/generics/generic_high_entropy_secret#revoke-the-secret?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment). 4. If possible, [rewrite git history](https://blog.gitguardian.com/rewriting-git-history-cheatsheet?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment). Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data. To avoid such incidents in the future consider - following these [best practices](https://blog.gitguardian.com/secrets-api-management/?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) for managing and storing secrets including API keys and other credentials - install [secret detection on pre-commit](https://https://docs.gitguardian.com/ggshield-docs/integrations/git-hooks/pre-commit?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) to catch secret before it leaves your machine and ease remediation.

🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

riri404 commented 1 year ago

Is the scheduler using 5 min or 5 sec intervals? because the example indicates 5 secs but you mentioned using 5 min intervals