code4romania / teacher-workout-backend

Teacher Workout backend (API for mobile apps & for the web client)
Mozilla Public License 2.0
8 stars 35 forks source link

53 signup login #73

Closed decembrya closed 2 years ago

decembrya commented 2 years ago

What does it fix?

Part of #53

Add endpoints to register, login and delete a user account along with Swagger for these for easy dev use. Adding JWT Bearer authentication on GraphQL. In order to allow easier setting of Auth header for devs added GraphQL Playground instead of GraphiQl

Still need to do in a separate PR: Google, FB auth

How has it been tested?

Tested manually, updated and ran available specs ran using docker-compose

gitguardian[bot] commented 2 years 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.

🔎 Details of the secret
| Secret | Commit | Filename | Detected At | | | ------------------------- | ---------------- | --------------- | -------------------- | -------------------- | | Generic High Entropy Secret | 988c9da12b999b2f49f9cc3628898bf10f9dc213 | TeacherWorkout.Api/appsettings.Development.json | 10:25 February 15th, 2022 | [View secret](https://github.com/code4romania/teacher-workout-backend/commit/988c9da12b999b2f49f9cc3628898bf10f9dc213#diff-a7c9cc65d4a0d842a087632eeb85c82cL15) | | Generic High Entropy Secret | 988c9da12b999b2f49f9cc3628898bf10f9dc213 | TeacherWorkout.Api/appsettings.Test.json | 10:25 February 15th, 2022 | [View secret](https://github.com/code4romania/teacher-workout-backend/commit/988c9da12b999b2f49f9cc3628898bf10f9dc213#diff-32dfeb63fad87e72d706da35ea58ef25L14) | | Generic High Entropy Secret | 76c11a19a224c6eade43de8d928b7fa06bc71d75 | TeacherWorkout.Api/appsettings.json | 10:25 February 15th, 2022 | [View secret](https://github.com/code4romania/teacher-workout-backend/commit/76c11a19a224c6eade43de8d928b7fa06bc71d75#diff-8d69afe192a57c9a09f4d0f587e6cc62L16) | | Generic High Entropy Secret | fc93adfe007fdcc8b83106e29466aa1853d2a4a7 | TeacherWorkout.Api/appsettings.Development.json | 10:25 February 15th, 2022 | [View secret](https://github.com/code4romania/teacher-workout-backend/commit/fc93adfe007fdcc8b83106e29466aa1853d2a4a7#diff-a7c9cc65d4a0d842a087632eeb85c82cR15) | | Generic High Entropy Secret | fc93adfe007fdcc8b83106e29466aa1853d2a4a7 | TeacherWorkout.Api/appsettings.Test.json | 10:25 February 15th, 2022 | [View secret](https://github.com/code4romania/teacher-workout-backend/commit/fc93adfe007fdcc8b83106e29466aa1853d2a4a7#diff-32dfeb63fad87e72d706da35ea58ef25R14) | | Generic High Entropy Secret | fc93adfe007fdcc8b83106e29466aa1853d2a4a7 | TeacherWorkout.Api/appsettings.json | 10:25 February 15th, 2022 | [View secret](https://github.com/code4romania/teacher-workout-backend/commit/fc93adfe007fdcc8b83106e29466aa1853d2a4a7#diff-8d69afe192a57c9a09f4d0f587e6cc62R16) | | Generic High Entropy Secret | 66bdca9132105172d2ef3beff91246fba9d66d50 | .env.example | 10:25 February 15th, 2022 | [View secret](https://github.com/code4romania/teacher-workout-backend/commit/66bdca9132105172d2ef3beff91246fba9d66d50#diff-cbfd64a28982a1818f2b5f16e7f9d634L15) | | Generic High Entropy Secret | 66bdca9132105172d2ef3beff91246fba9d66d50 | TeacherWorkout.Api/appsettings.Development.json | 10:25 February 15th, 2022 | [View secret](https://github.com/code4romania/teacher-workout-backend/commit/66bdca9132105172d2ef3beff91246fba9d66d50#diff-a7c9cc65d4a0d842a087632eeb85c82cL15) |
🛠 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://docs.gitguardian.com/internal-repositories-monitoring/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 is an automated secrets detection service.We help developers and security teams secure the modern software development process.

 

Our GitHub checks need improvements? Share your feedbacks
pirvudoru commented 2 years ago

WOW

decembrya commented 2 years ago

Closing so we can reimplement using identity server