Skip to content

Ft add authorization#19

Merged
LanternNassi merged 3 commits intoStagingfrom
ft-add-authorization
Jan 8, 2025
Merged

Ft add authorization#19
LanternNassi merged 3 commits intoStagingfrom
ft-add-authorization

Conversation

@LanternNassi
Copy link
Owner

This pull request includes several changes to improve the CI pipeline, Docker setup, database schema, and add new functionality for user management. The most important changes are listed below:

CI Pipeline and Docker Setup:

  • Updated the CI pipeline to trigger on the main branch instead of Staging in .github/workflows/docker-build.yml.
  • Modified Dockerfile to expose port 10000 in the builder stage and removed the redundant EXPOSE command in the final stage.
  • Enhanced docker-compose.yml by adding a health check for the db service, creating a new test_db service, and renaming go_test to go_app. [1] [2]

Database Schema and Models:

  • Added a new User model and updated related database operations in internal/database/database_user.go.
  • Updated Backup, Bill, and Client models to include foreign key constraints and relationships. [1] [2] [3]

User Management:

  • Introduced new methods for user management in the DataBaseClient and Server interfaces in internal/Interfaces/controllers.go. [1] [2]
  • Implemented user-related database operations such as AddUser, GetUsers, UpdateUser, GetUserById, and DeleteUser in internal/database/database_user.go.

Middleware and Authorization:

  • Added an AuthenticationMiddleware for token-based authentication in internal/middleware/Authorization.go.

Test Adjustments:

  • Renamed and adjusted test functions for backups and bills in internal/database/tests/database_test_backup.go and internal/database/tests/database_test_bill.go. [1] [2]

These changes collectively enhance the application's functionality, security, and maintainability.

@gitguardian
Copy link

gitguardian bot commented Jan 8, 2025

⚠️ GitGuardian has uncovered 1 secret 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 secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
13423413 Triggered Generic Password 4172300 docker-compose.yml View secret
🛠 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 secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. 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


🦉 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.

@LanternNassi LanternNassi merged commit fbbdc95 into Staging Jan 8, 2025
1 of 3 checks passed
@codecov
Copy link

codecov bot commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (aafa239) to head (724f27b).
Report is 4 commits behind head on Staging.

Additional details and impacted files
@@           Coverage Diff           @@
##           Staging     #19   +/-   ##
=======================================
  Coverage     0.00%   0.00%           
=======================================
  Files            1       1           
  Lines           49      49           
=======================================
  Misses          49      49           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

1 participant