Skip to content

Commit f22a9ca

Browse files
authored
Merge pull request #117 from annkots/master
TCR-643: Missing get-users-script.sh information in the Imunify360 St…
2 parents 5587a82 + 4024b2e commit f22a9ca

File tree

1 file changed

+64
-2
lines changed

1 file changed

+64
-2
lines changed

docs/control_panel_integration/README.md

Lines changed: 64 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ The Imunify360 Stand-alone version requires the following integrations before in
8181
* 2.4 Integration with Authentication Service
8282
* 2.5 Integration with Malware Scanner
8383

84-
All integrations set in the integration config file like <span class="notranslate">`/etc/sysconfig/imunify360/integration.conf`</span>. You can find more details on the config file [here](/control_panel_integration/#integration-config-file), get a [template](https://github.com/cloudlinux/imunify360-documentation/blob/master/docs/control_panel_integration/integration.conf) or check the [Knoledgebase article](https://cloudlinux.zendesk.com/hc/en-us/articles/4716287786396).
84+
All integrations set in the integration config file like <span class="notranslate">`/etc/sysconfig/imunify360/integration.conf`</span>. You can find more details on the config file [here](/control_panel_integration/#integration-config-file), get a [template](https://github.com/cloudlinux/imunify360-documentation/blob/master/docs/control_panel_integration/integration.conf) or check the [Knowledgebase article](https://cloudlinux.zendesk.com/hc/en-us/articles/4716287786396).
8585

8686
#### 2.1 Specifying panel information
8787

@@ -669,7 +669,69 @@ real_ip_header CF-Connecting-IP;
669669

670670
#### Use a specific list of users in Imunify360
671671

672-
By default, Imunify360 will use Linux system users, limited by <span class="notranslate">`uid_min`</span> and <span class="notranslate">`uid_max`</span> from the <span class="notranslate">`/etc/login.defs`</span>.
672+
By default, Imunify360 will use Linux system users, limited by <span class="notranslate">`uid_min`</span> and <span class="notranslate">`uid_max`</span> from the <span class="notranslate">`/etc/login.defs`</span>.
673+
674+
**Configuring a custom user list (optional)**
675+
676+
If you need to restrict (or expand) that scope — for example, to include only hosting panel users, or to skip system accounts created by third-party software, — you can point Imunify360 to **your own users script**. Enable the script in `integration.conf`:
677+
678+
```
679+
# /etc/sysconfig/imunify360/integration.conf
680+
681+
[integration_scripts]
682+
users = /path/to/get-users-script.sh
683+
```
684+
685+
It should point to an executable file that generates a JSON file similar to the following (see details [here](/control_panel_integration/#_2-download-and-edit-integration-conf-file-to-set-required-integrations)):
686+
687+
688+
<div class="notranslate">
689+
690+
```
691+
{
692+
"data": [
693+
{
694+
"id": 1000,
695+
"username": "demo1",
696+
"owner": "root",
697+
"domain": "demo1.com", // optional
698+
"package": { // optional
699+
"name": "basic",
700+
"owner": "root"
701+
},
702+
"email": "[email protected]",
703+
"locale_code": "en_US"
704+
},
705+
{
706+
"id": 1001,
707+
"username": "demo2",
708+
"owner": "root",
709+
"email": "[email protected]",
710+
"locale_code": "en_US"
711+
}
712+
],
713+
"metadata": {
714+
"result": "ok"
715+
}
716+
}
717+
```
718+
</div>
719+
720+
**Testing**
721+
722+
Run once to ensure the script works:
723+
724+
```
725+
sudo -u imunify360 /path/to/get-users-script.sh | jq .
726+
```
727+
728+
If the JSON looks correct, restart the agent:
729+
730+
```
731+
systemctl restart imunify360
732+
```
733+
734+
Imunify360 will now protect **only** the users returned by your script.
673735

674736
#### Data description
675737

0 commit comments

Comments
 (0)