StVideo Server

While the StanagOnDemand server is capable of serving video content by itself, the process can be resource-intensive and may impact its ability to handle other critical tasks. By using a proxy to serve video content, the external video server can handle the task of streaming the video to the end-user, taking the load off of the StanagOnDemand server. This not only ensures a smoother video playback experience for the end-user but also frees up resources on the StanagOnDemand server to focus on other critical tasks. Furthermore, a reverse proxy can cache the video content, enabling faster delivery to subsequent requests for the same content. Overall, using a dedicated video server can greatly improve the performance, scalability, and reliability of a system.
stvideo-server uses JWT tokens to secure access to resources, including video content and other resources that belong to missions or sensors. With JWTs, access to these resources is restricted to only authorized users, and unauthorized access is denied. The JWT contains a digitally signed payload, which includes information about the user's identity and their access privileges. Only users with a valid JWT that includes the necessary authorization claims will be able to access the content. However, it is important to note that if the stserver does not have the secret key in the confg file, the stvideo server will allow unauthorized access to the content.

stvideo-server uses JWT access token secret, which is automatically generated on the first server run. It will be placed in the /data/config.json file. User can delete it (by removing accessTokenSecret key:value) to allow unrestricted access to the content, or generate a new one.

  "serverInfo": {
    "serverId": "6425297f8f7d1af1c156d1b4",
    "accessTokenSecret": "1474c9a48b4a818ade0f5e3cfa7648fb5c8fa56dfad947fefb6da3602ff39248"
  }
}

You can regenerate the accessTokenSecret by setting the value to "". The server will automatically create a new secret.

Or, to manualy generate the secret token one can run a simple nodejs code:

node
require('crypto').randomBytes(32).toString('hex')

or any similar rundom key generator.