Repository navigation
Replies: 2 comments 1 reply
|
Hi Franz, I think I understand what you are trying to achieve, but unfortunately there is no single HTTP header, cookie, bearer token, or URL parameter that reliably identifies every request originating from xySat. The main xySat connection is a WebSocket connection to xySat also makes several regular HTTP requests. In the current implementation these include health checks, job input downloads, job output uploads, final job updates, and install or upgrade requests. Authentication is not carried in one common place across all of these. Depending on the operation, it may be part of the WebSocket messages, the request body, or the query string. Some install and upgrade steps are also performed by external tools such as There is one additional complication: jobs running on a satellite are deliberately given the conductor base URL. Marketplace Plugins, the xyOps SDK, and custom job scripts may use that URL to call any xyOps API for which you have supplied a suitable API key. From the reverse proxy's point of view, those requests originate from the same worker host as xySat itself. This means a proxy cannot reliably separate "the xySat process" from "a job launched by xySat" based on the source address or a standard request marker. For reference, a worker-only proxy would need at least the following kinds of traffic today:
I would treat that as an implementation snapshot rather than a permanent API contract. The set can change as xyOps evolves, and the final item is necessarily specific to each installation. All these will be documented in the near future, I just haven't been able to cover it yet. Client certificates have a similar limitation, alas. Node.js TLS options would only cover requests made through the Node.js networking stack. They would not automatically configure the The most practical approaches I can suggest are:
For authorization, I also recommend using separate, least-privileged API keys for jobs and supplying them only through the Secret Vaults that need them. The satellite's own authentication token is used for satellite-specific operations and is not a general administrator credential. Job API access should be controlled by the privileges of the API key assigned to that job, even when both kinds of traffic pass through the same proxy. My practical recommendation would be the separate worker hostname combined with a worker IP or VPN allowlist, while treating each worker host and the jobs it runs as one network trust zone. Then keep job API keys narrowly scoped. If the requirement is to distinguish the xySat daemon from every job process on the same machine at the reverse proxy, xyOps does not currently provide a reliable request-level identity for that. I'm sorry if this doesn't help your issue. |
|
Hi! Thanks for the answer. So if i deny access to
from anywhere other then my management network, noone could get a login page and noone could login. Do you think this can work. I really dont want anyone on the servers where my agents run to be able to login to the coordinator. I do not se a different way to secure the coordinator from the servers because i have to open the web-interface according to your description and firewalling cannot apply here. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Since i would like to have a clearer isolation between the Admin Webinterface and what xySat is allowed to access on the xyOps Coordinator, i would like to do a Caddy Reverseproxy configuration which only allows xySat calls from "unrestricted" networks and restricts all other traffic to management stations (Webadmin, Webhooks, Configuration API,...)
I did not find a list of http: and ws: endpoints which are needed for xySat to work. Would it be possible to get such a list or could you steer me in the right direction so i could work it out myself (if its not very hard).
Since xySat has a activation process which seems to involve some sort of authentication, is there a cockie or some identifiable information in the requests which i could use on the reverse-proxy to identify that its a xySat request. (Bearer Auth, Basic Auth, Cookie, Token or URL parameter)
Another alternative would be if xySat could use a client certificate in its calls (secure=true). we could then validate this certificate on the proxy easily.
Here is how the nodejs ws library can use client certificates: https://github.com/websockets/ws/blob/ae1de54330cef77e487548890fabfeb9aae1d83d/test/websocket.test.js#L4062
All reactions