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

Enhancement/backend/location based auth #330

Merged
merged 3 commits into from
Aug 21, 2024

Conversation

waveyboym
Copy link
Member

@waveyboym waveyboym commented Aug 21, 2024

Description

This pr adds a small but important feature that would range lock new ip address additions against the users previous ip address when logging in. This will enable further security enhancements

Fixes # (issue)
#329

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Wrote some unit tests to verify that the range checker does indeed function as expected
  • Cannot write database related function as backend is switching form bigcache to go-redis now

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@waveyboym waveyboym self-assigned this Aug 21, 2024
@waveyboym waveyboym linked an issue Aug 21, 2024 that may be closed by this pull request
1 task
@waveyboym waveyboym added type: feature A new feature type: fix Introduces a fix for a previous issue type: security This is a security related issue/pr For: api This is mainly for the api For: backend This is mainly for the backend code priority: medium This does/did not need to be addressed soon but should have plans in place to be addressed status: pending This is awaiting approval effort: 3 This can be/was resolved in minutes be requires/required deep engagement type: testing This affects one or more tests labels Aug 21, 2024
@waveyboym waveyboym added this to the Week 1 Sprint 4 milestone Aug 21, 2024
@waveyboym waveyboym merged commit 94f5a4d into develop Aug 21, 2024
5 checks passed
@waveyboym waveyboym deleted the enhancement/backend/location-based-auth branch August 21, 2024 15:42
Copy link

codecov bot commented Aug 21, 2024

Codecov Report

Attention: Patch coverage is 58.33333% with 15 lines in your changes missing coverage. Please review.

Project coverage is 73.30%. Comparing base (d923624) to head (9ec741f).
Report is 24 commits behind head on develop.

Files Patch % Lines
occupi-backend/pkg/database/database.go 21.05% 15 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #330      +/-   ##
===========================================
+ Coverage    73.28%   73.30%   +0.01%     
===========================================
  Files           52       10      -42     
  Lines         3126     1888    -1238     
  Branches        76        0      -76     
===========================================
- Hits          2291     1384     -907     
+ Misses         762      458     -304     
+ Partials        73       46      -27     

☔ 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
effort: 3 This can be/was resolved in minutes be requires/required deep engagement For: api This is mainly for the api For: backend This is mainly for the backend code priority: medium This does/did not need to be addressed soon but should have plans in place to be addressed status: pending This is awaiting approval type: feature A new feature type: fix Introduces a fix for a previous issue type: security This is a security related issue/pr type: testing This affects one or more tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TASK] Location range limiting for new ip-addresses
1 participant