Skip to content

Conversation

@RonanMorgan
Copy link
Collaborator

@RonanMorgan RonanMorgan commented Aug 28, 2025

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

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

  2. 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 ?

@codecov
Copy link

codecov bot commented Aug 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.34%. Comparing base (3cf6e39) to head (7bccb9b).

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              
Flag Coverage Δ
backend 83.70% <100.00%> (+0.36%) ⬆️
client 93.67% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@frgfm
Copy link
Member

frgfm commented Aug 29, 2025

Thanks for the PR :)
I may be late to the party again, so pardon the questions: why do we need the IP address in the DB?
We ssh via a VPN so we can't use it, right? And any HTTP request from the camera to the backend will reveal the IP

@MateoLostanlen
Copy link
Member

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
At the moment this information is stored in a JSON file on the VM, but we agree it would be cleaner to have it in the API

@MateoLostanlen
Copy link
Member

@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

@frgfm
Copy link
Member

frgfm commented Sep 26, 2025

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 😅 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants