lumeohq / onvif-rs

A native Rust ONVIF client library.
MIT License
114 stars 61 forks source link

Add time delta for WSSE for most Axis cams #79

Open stalkerg opened 3 years ago

stalkerg commented 3 years ago

Basically, if your time will not strictly the same as the camera the WSSE will be wrong with just the current time. Algorithm to solve it next:

  1. You should try to connect to the camera without auth and get devicemgmt.GetSystemDateAndTime
  2. If it fails try to use existence username/password to get GetSystemDateAndTime.
  3. Calculate the time delta between your time and camera and apply it to "created" in WSSE for each request.

Most AXIS and some ROBOTIX cameras will have issues without it. (I have it)

stalkerg commented 2 years ago

This project is still alive?

jplatte commented 2 years ago

We're mostly just focused on other things currently. But maybe now that you commented again somebody who knows more about ONVIF will reply in the next days.

DmitrySamoylov commented 2 years ago

@stalkerg Thanks for the feedback. Can you give more details about pre-conditions for this bug? What is the delta between local time and camera time in your case? Do you specify explicitly to use UsernameToken auth, or it is just "digest" auth is disabled somehow in the camera?

From my understanding clocks at the server and client should be the same and we shouldn't calculate the server's time at the client. Are there any mentions of this in ONVIF or WS spec?