Base solution for your next web application
Open Closed

Developing a stand-alone client for communicating with local network devices #11607


User avatar
0
ips-jm created

Hello,

we have a requirement to connect and communicate with local network devices of our users. To facilitate this, we are considering developing a separate standalone client that could run on Mac, Windows, and potentially Linux.

Could you provide us with some guidance on how to approach this? The standalone client would need to execute certain actions triggered by the backend, such as sending requests to local devices and returning the responses from these devices to the backend, among other tasks. The users can add local devices via a simple ui.

We would appreciate any advice or resources you can share to help us achieve this.

Thank you in advance.


4 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    If your client needs to authenticate to send data to backend, you can take a look at https://docs.aspnetzero.com/en/aspnet-core-angular/latest/Features-Angular-Token-Based-Authentication.

    You need to design your app according to ASP.NET Boilerplate's module system, see https://aspnetboilerplate.com/Pages/Documents/Module-System.

    You also need a distributed event bus which is not probided by ASP.NET Zero. You can use RabbitMQ, Kafka or Rebus.

  • User Avatar
    0
    ips-jm created

    Hey @ismcagdas,

    Thank you for these tips and suggestions! We plan to implement this in the near future and may reach out again if further questions arise.

  • User Avatar
    0
    ips-jm created

    Hey,

    Sorry for bringing this ticket back to life, but we have a follow-up question regarding the “client registration” process. Specifically, we are generating clients in our Angular UI and assigning a unique ClientId to each client during the registration process.

    Context:
    In the local client, we aim to avoid relying on tenant or user accounts for login. Instead, we would like to use a “one-time view” token for initial setup and insertion into the client. Our plan is to include the ClientId as a claim in the token.

    The clients can be considered as "service clients", they have no relationship to users.

    Questions:

    1. If we add the ClientId to the token claims, is it possible to use this ClientId to generate meaningful audit logs (e.g., identifying actions performed by this specific client)?

    2. If this is achievable, could you guide us on how to configure the audit logging system to recognize and log this ClientId?

    3. What is the recommended approach for generating this “one-time view” token?

    4. Should it follow a specific structure or configuration to ensure compatibility with the audit logging framework?

    Key Requirements:

    • The token should be lightweight and restricted in scope.

    • The ClientId should act as the primary identifier for all interactions performed by the client, and these interactions should be logged for traceability.

    We would greatly appreciate detailed guidance on this or any examples/documentation you could provide.

    Thanks in advance for your support, and let us know if you need any additional context!

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @ips-jm

    With the current design of AspNet Zero, it is very hard (maybe not possible) to ignore User information. So, to get an auth token, there must be a user. You can create a user record for each client and authenticate them like that.