- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 9
 
Add ip_address and livestream_activated columns in camera table #499
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
base: main
Are you sure you want to change the base?
Conversation
          Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@            Coverage Diff             @@
##             main     #499      +/-   ##
==========================================
+ Coverage   84.02%   84.34%   +0.32%     
==========================================
  Files          39       39              
  Lines        1208     1233      +25     
==========================================
+ Hits         1015     1040      +25     
  Misses        193      193              
 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
  | 
    
| 
           Thanks for the PR :)  | 
    
| 
           Hi @frgfm , sorry, a bit of context. With the arrival of livestream (remote camera control), the system now works as follows To make this work, we need to know the IP of each Pi (on the VPN) in order to send commands  | 
    
| 
           @RonanMorgan, I think the IP is not really sensitive information. It’s kind of a local IP, so without VPN access there’s nothing that can be done with it However, what’s missing here is a route to get a user’s role in order to know whether they have the right to stream or not (admin, agent): ok user (not ok). So let's create get_role  | 
    
| 
           Thanks for the precision! I understand this, but can't this be a good VPN/alias setup instead? Static IPs seem a bit unstable or at best not very secure (we need to encrypt them otherwise if the database gets stolen, we'll get DDoS at vitam eternam 😅 )  | 
    
This has been done to avoid the usage of a .json configuration file with the plateforme
@MateoLostanlen I didn't implement a new endpoint yet, maybe the get_camera endpoint would be enough ? But this means you have to manager the "rights" yourself since the endpoint is available for UserRole.ADMIN, UserRole.AGENT, UserRole.USER
If we consider the "ip_adress" very sensible I can :
=> create a new endpoint which return only the ip_adress
=> don't return the ip_address in the get_camera endpoint
While we are on it we should check all the information needed in the configuration.json file of the engine and add them in the camera table
what do you think ?