Ylianst / MeshCentral

A complete web-based remote monitoring and management web site. Once setup you can install agents and perform remote desktop session to devices on the local network or over the Internet.
https://meshcentral.com
Apache License 2.0
3.96k stars 536 forks source link

Can we set the number of device additions? #267

Closed billydu1980 closed 5 years ago

billydu1980 commented 5 years ago

Dear Ylianst and your team: Is there a relatively simple way to limit the number of device additions, including the number of agent and agentless, such as modifying config.json files?

Thanks, Billy DuDu

Ylianst commented 5 years ago

Hi. Yes, MeshCentral supports something like this. In the domain section, add this:

      "Limits": {
        "MaxUserAccounts": 100,
        "MaxUserSessions": 100,
        "MaxAgentSessions": 100,
        "MaxSingleUserSessions": 10
      }

You only need to put the lines you want to limit, so in your case 'MaxAgentSessions' would probably be it. You can also go in the "node_modules/meshcentral/sample-config.json" to look at a big config.json sample that includes this.

If you want to limit the number of total agents in a domain (not just agent sessions) and block "add agent" if the number is reached, I don't have this, but if you let me know exactly what you want, I can look at adding it.

Hope it helps. Ylian

billydu1980 commented 5 years ago

Very thanks.

I've focused on the "Limits" section and verified that the MaxUserAccounts section is fine. Now I want to limit the number of total agents in a domain (include of software agent and intel AMT ) , base on this feature, it can restrict some users behavior, and reduce the risk of system operation.

Best regard, Billy

Ylianst commented 5 years ago

To be clear, a new "MaxDevices" would limit the total number of devices on a domain and so, if a new device shows up on a domain, it would get rejected? I can do that.

billydu1980 commented 5 years ago

Yes, that's what I means.

Thanks,

Ylianst commented 5 years ago

Published MeshCentral v0.3.6-a with new MaxDevices in the domain limits like this:

      "Limits": {
        "MaxDevices": 100,
        "MaxUserAccounts": 100,
        "MaxUserSessions": 100,
        "MaxAgentSessions": 100,
        "MaxSingleUserSessions": 100
      }

Please test and make sure it works. Thanks.

Ylianst commented 5 years ago

I will close this one as I think the new "MaxDevices" should solve this issue. Feel free to re-open if needed.