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

New authentication system (#1341) (#1992) (#2205) #3081

Merged
merged 5 commits into from
Mar 4, 2024
Merged

New authentication system (#1341) (#1992) (#2205) #3081

merged 5 commits into from
Mar 4, 2024

Conversation

aler9
Copy link
Member

@aler9 aler9 commented Feb 27, 2024

Fixes #2205
Fixes #1992

This is a new authentication system that

  • covers all the features exposed by the server, including playback, API, metrics and PPROF
  • improves internal authentication by adding permissions
  • improves HTTP-based authentication by adding the ability to exclude certain actions from being authenticated
  • adds an additional method (JWT-based authentication) in addition to existing methods (internal credentials and HTTP-based authentication)

Usage: MOVED INTO THE README

TODO:

  • new user format in configuration file
  • authenticate API, metrics and PPROF requests
  • authenticate playback requests
  • authHTTPAddressExclude to exclude things from HTTP-based authentication
  • support JWTs
  • update README

@aler9 aler9 changed the title New authentication system New authentication system (#2205) (#1992) Feb 27, 2024
Copy link

codecov bot commented Feb 27, 2024

Codecov Report

Attention: Patch coverage is 48.72180% with 341 lines in your changes are missing coverage. Please review.

Project coverage is 55.07%. Comparing base (765d29f) to head (9a1e89c).

Files Patch % Lines
internal/auth/manager.go 53.67% 79 Missing and 3 partials ⚠️
internal/conf/conf.go 54.74% 54 Missing and 8 partials ⚠️
internal/conf/path.go 1.85% 52 Missing and 1 partial ⚠️
internal/conf/ip_networks.go 29.41% 34 Missing and 2 partials ⚠️
internal/conf/rtsp_auth_methods.go 29.03% 21 Missing and 1 partial ⚠️
internal/playback/server.go 33.33% 19 Missing and 3 partials ⚠️
internal/conf/auth_method.go 22.72% 17 Missing ⚠️
internal/api/api.go 50.00% 9 Missing and 1 partial ⚠️
internal/conf/auth_action.go 40.00% 8 Missing and 1 partial ⚠️
internal/servers/rtmp/conn.go 33.33% 4 Missing ⚠️
... and 13 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3081      +/-   ##
==========================================
- Coverage   55.25%   55.07%   -0.19%     
==========================================
  Files         149      150       +1     
  Lines       16463    16811     +348     
==========================================
+ Hits         9097     9258     +161     
- Misses       6647     6826     +179     
- Partials      719      727       +8     

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

@aler9 aler9 changed the title New authentication system (#2205) (#1992) New authentication system (#1341) (#1992) (#2205) Feb 27, 2024
@aler9 aler9 force-pushed the feature/auth branch 5 times, most recently from 1006d4e to 40949d4 Compare March 1, 2024 22:02
@aler9 aler9 force-pushed the feature/auth branch 10 times, most recently from ab2debb to d708753 Compare March 4, 2024 13:14
@aler9 aler9 merged commit 9c6ba7e into main Mar 4, 2024
6 of 8 checks passed
@aler9 aler9 deleted the feature/auth branch March 4, 2024 13:20
Copy link
Contributor

github-actions bot commented Mar 4, 2024

This issue is mentioned in release v1.6.0 🚀
Check out the entire changelog by clicking here

@github-actions github-actions bot locked and limited conversation to collaborators Sep 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant