Skip to content

Commit 77bac5b

Browse files
Backport some of Zack's PRs to 3.0 branch (#3139)
* Backport some of Zack's PRs to 3.0 branch Review and compress images Do a little copyediting here and there * Update IPv6.md reword line 21 to remove possessive case * Update words-to-ignore.txt * Update words-to-ignore.txt --------- Co-authored-by: MicJ <[email protected]> Co-authored-by: MicJ <[email protected]>
1 parent cd088c1 commit 77bac5b

27 files changed

+351
-158
lines changed

content/AdminGuide/Admin/LDAPServers.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@ Click the gear icon in the upper toolbar and select **Administration**. Scroll d
2020
|---------|-------------|
2121
| **Hostname** | Host name of LDAP/AD server, with optional port. e.g. example.com:636. |
2222
| **Domain** | LDAP base domain. e.g. dc=example,dc=com. |
23-
| **Group Domain** | Optional for admins that want to avoid issues with unwanted groups by forcing group searches to start at a deeper domain. |
23+
| **Group Search Domain** | Optional for admins who want to avoid issues with unwanted groups by forcing group searches to start at a deeper domain. |
2424
| **User ID Field** | Class mapped to login username. The default is uid. |
2525
| **Group ID Field** | Class for finding groups associated with a user. The default is cn. |
2626
| **BIND User Domain** | Full user domain for binding before finding user fully qualified ID (FQID). Optional. |
27+
| **BIND Password** | If the bind user is set, use this password when performing a simple bind on user search. |
2728
| **Realm** | The realm that performs authentication against the LDAP server. |
28-
| **BIND Password** | If bind user is set, use this password when performing a simple bind on user search. |
2929
| **KDC** | The Kerberos Key Distribution Center that supplies session tickets and temporary session keys to users and computers within the LDAP server. |
30+
| **Enable SSL** | Enable LDAPS/TLS connection. Uses the globally configured verification settings. |
3031
{{< /truetable >}}
3132

3233
After you fill the form according to your server, click **ADD SERVER**.
@@ -35,7 +36,8 @@ Click **CONFIGURE** in the **Configuration** widget and enable **Allow LDAP user
3536

3637
## Updating the LDAP Server
3738

38-
TrueCommand only checks for usernames and passwords when authenticating LDAP credentials. You may add entries for email, phone number, or URLs, but TrueCommand does not check for them.
39+
TrueCommand only checks for usernames, passwords, and groups while authenticating LDAP credentials.
40+
You can add entries for email, phone number, or URLs, but TrueCommand does not check for them.
3941

4042
The LDAP server uses an LDAP Data Interchange Format (LDIF) file to add or modify entries in the server.
4143

@@ -67,3 +69,30 @@ changetype: modify
6769
add: password
6870
6971
```
72+
73+
### LDAP Groups
74+
75+
For finding associated groups, TrueCommand looks for `groupOfUniqueNames`, `groupOfNames`, `posixGroup`, and `Group` object classes and users matching the `uniquemember`, `member`, `owner`, or `memberUid` attributes.
76+
77+
Teams configured under **LDAP Default Teams** are added to new users automatically, while group names can be mapped to one or more teams under **LDAP Group Mappings**.
78+
79+
![AddLDAPDefault](/images/TrueCommand/Administration/AddLDAPDefault.png "Add Default Teams")
80+
81+
![AddLDAPGroup](/images/TrueCommand/Administration/AddLDAPGroup.png "Add LDAP Group")
82+
83+
![AddLDAPGroupToTeam](/images/TrueCommand/Administration/AddLDAPGroupToTeam.png "Tie LDAP Group to Team")
84+
85+
### Troubleshooting
86+
87+
The two most prominent error codes for LDAP are 254 (connection failure) and 49 (invalid credentials).
88+
In the event of a connection failure, ensure **Enable SSL** is set when only LDAPS is available.
89+
90+
For credential failures, ensure the right authentication mode, either BIND Password or Kerberos, is enabled.
91+
When Kerberos is enabled, its use is preferred.
92+
93+
When password servers are required, move the autogenerated **krb5.conf** within the container from `/etc/krb5.conf` to `/data` and enable its use by setting `--env KRB5_CONFIG=/data/krb5.conf` on a new container run.
94+
See the Middleware log for further debugging.
95+
Some AD servers require manual SASL settings to avoid an "illegal packet length" error by setting the environment variable `--env LDAPSASL_SECPROPS=minssf=0,maxssf=0` to disable security factor limitations.
96+
Other **ldap.conf** settings can be configured this way, or setting the LDAPCONF environment variable to `/data/ldap.conf` and writing a custom conf there.
97+
98+
TrueCommand sets `TLS_REQCERT` and `TLS_REQSAN` to **allow** or **demand** depending on global TLS settings, as well as TLS_CERT and TLS_KEY to the MW managed self-signed certificate in `/data/truecommand`.

content/AdminGuide/Admin/SAML/SAMLGA.md

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ After you configure SAML in Google Admin, you configure and start the TrueComman
5252

5353
{{< trueimage src="/images/SAML/GAAddServiceProviderDetailsCropped.png" alt="GA Add Service Provider Details Cropped" id="GA Add Service Provider Details Cropped" >}}
5454

55-
a. Enter the TrueCommand login URL http://*IP:PORT*/saml/acs in the **ACS Url** field.
56-
*IP:PORT* is your TrueCommand system IP and port address.
57-
55+
a. Enter the TrueCommand login URL `https://*IP:PORT*/saml/acs` in the **ACS Url** field.
56+
*IP:PORT* is your TrueCommand system IP with HTTPS port.
57+
5858
b. Type any name you want into the **Entity ID** field (ex. truecommand-saml).
59-
60-
c. Type the https://*IP:PORT*/saml/helloURL into the **Start URL** field.
61-
*IP:PORT* is your TrueCommand system IP and port address.
59+
60+
c. Type the `https://*IP:PORT*/saml/hello` into the **Start URL** field.
61+
*IP:PORT* is your TrueCommand system IP with HTTPS port.
6262

6363
d. Set **Name ID** format to **PERSISTENT**.
6464

@@ -76,54 +76,57 @@ After you configure SAML in Google Admin, you configure and start the TrueComman
7676
{{< truetable >}}
7777
| Parameter | Value |
7878
|-----------|-------|
79-
| E-Mail-Addresses | email |
80-
| Display-Name | given_name |
81-
| User-Principal-Name | unique_name |
82-
| Telephone-Number | telephoneNumber |
79+
| Primary email | email |
80+
| First name | given_name |
81+
| Employee ID | unique_name |
82+
| Phone number | telephone_number |
8383
| Title | title |
8484
{{< /truetable >}}
8585
86+
Adjust the parameters according to your own organization, where `unique_name` corresponds to the TrueCommand `username` and is the only required attribute.
87+
`Primary email` might be desired instead of and if an `Employee ID` is not available.
88+
8689
h. Click **FINISH**.
8790

88-
5. Verify the information is correct.
91+
5. Verify the information is correct.
8992
Select **TEST SAML LOGIN** in the **tcsaml** area on the left side of the screen to open the **TrueCommand SAML Test** screen.
9093

9194
{{< trueimage src="/images/SAML/GAAddCustomSAMLAppTrueCommandSAMLTestCropped.png" alt="GA Add Custom SAML App TrueCommand SAML Test Cropped" id="GA Add Custom SAML App TrueCommand SAML Test Cropped" >}}
92-
95+
9396
6. Download the metadata.
94-
97+
9598
{{< trueimage src="/images/SAML/GAAddCustomSAMLAppDownloadMetaDataWindowCropped.png" alt="GA SAML App Download Metadata Cropped" id="GA SAML App Download Metadata Cropped" >}}
96-
97-
a. Select **DOWNLOAD METADATA** to open the **Download Metadata** window.
98-
99+
100+
a. Select **DOWNLOAD METADATA** to open the **Download Metadata** window.
101+
99102
b. Click **DOWNLOAD METADATA** again. When complete, click **CLOSE**.
100-
101-
7. Verify user access details.
102-
103+
104+
7. Verify user access details.
105+
103106
a. Click **View Details** under **User access** to display the **Service status** details.
104-
107+
105108
{{< trueimage src="/images/SAML/GASAMLAppClickViewDetailsCropped.png" alt="GA SAML App Click View Details Cropped" id="GA SAML App Click View Details Cropped" >}}
106-
109+
107110
b. Select **ON for everyone** and click **SAVE**.
108-
111+
109112
{{< trueimage src="/images/SAML/GASAMLAppSetServiceStatusOnForEveryoneCropped.png" alt="GA SAML App Set Service Status On For Everyone Cropped" id="GA SAML App Set Service Status On For Everyone Cropped" >}}
110-
113+
111114
If you want granular user control, use this area to set it.
112-
113-
8. Wait up for approximately 10-20 minutes for Google to populate all settings through its servers
115+
116+
8. Wait for approximately 10-20 minutes for Google to populate all settings through its servers.
114117

115118
## Configuring and Starting TrueCommand SAML Service
116119

117120
1. Log into TrueCommand as an administrator.
118121

119-
2. Click the <i class="material-icons" aria-hidden="true" title="Settings">settings</i> button on the top toolbar.
120-
Click **Administration**. Click **Configure** in the **Configuration** widget.
121-
The **Configuration** screen with the editable settings displays. Scroll down to **SAML settings**.
122+
2. Click the <i class="material-icons" aria-hidden="true" title="Settings">settings</i> button on the top toolbar.
123+
Click **Administration**. Click **Configure** in the **Configuration** widget.
124+
The **Configuration** screen with the editable settings displays. Scroll down to **SAML settings**.
122125

123126
3. Enter the Google Admin XML metadata file into the **SAML Identity Provider Metadata XML Upload** field, then click **Save**.
124127

125-
5. Select **Start the SAML service** to enable the service, and click **Save** again.
128+
4. Select **Start the SAML service** to enable the service, and click **Save** again.
126129

127-
6. Log out of TrueCommand UI.
130+
5. Log out of the TrueCommand UI.
128131

129-
7. Login now using the **SAML Login** option.
132+
6. Login now using the **SAML Login** option.

content/Recommendations/IPv6.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: "TrueCommand IPv6 Configuration"
3+
description: "Steps for enabling IPv6 communication between TrueCommand and a TrueNAS."
4+
---
5+
6+
## Docker Host Setup
7+
8+
First, create a non-default network with IPv6 explicitly enabled:
9+
10+
```
11+
joe@joe-minty:~$ docker network create --ipv6 NAME
12+
joe@joe-minty:~$ docker run --network NAME --detach -v "/DockerDir:/data" -p 9004:80 -p 9005:443 ghcr.io/ixsystems/truecommand:latest
13+
```
14+
15+
Linux hosts are also required for the Docker daemon to support IPv6.
16+
The default bridge can be configured to support IPv6 if desired with a fixed address for dynamic allocation.
17+
18+
Configure both the host and NAS with IPv6 addresses, either through a dynamic protocol like SLAAC or by assigning a static IP, so the TrueCommand container has a route to the NAS.
19+
Input the address, without URL brackets, when adding a new system or editing an existing system.
20+
21+
For more information, see <a href="https://docs.docker.com/config/daemon/ipv6/">guide to enable IPv6 support provided by Docker</a> and the [TrueNAS IPv6 setup document](https://www.truenas.com/docs/scale/scaletutorials/network/configureipv6/).
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
---
2+
title: "TrueCommand Performance Specification"
3+
description: "Performance data for a self-hosted TrueCommand container."
4+
---
5+
6+
### Base Usage
7+
8+
Without any connected systems, TrueCommand uses ~20 MiB memory and 600 KiB disk for the sqlite settings database and slightly more for logs.
9+
10+
{{< truetable >}}
11+
| Resource | Usage |
12+
|-----------|-------------|
13+
|Memory | 20 MiB|
14+
|Storage | < 1 MiB|
15+
|Container | 1.1 GiB|
16+
|Network | Nothing with UI closed, 10 KiB/min serving UI|
17+
{{< /truetable >}}
18+
19+
### System Usage
20+
21+
TrueCommand scales for each system added.
22+
Each connected TrueNAS uses the following resources:
23+
24+
{{< truetable >}}
25+
|Resource | Usage|
26+
|-----------|-------------|
27+
|Memory | ~5-10 MiB|
28+
|Storage | ~100 MiB|
29+
|Disk | 1 MiB reads/hour, 4 MiB writes/hour|
30+
|CPU | ~5s/hour, ~22ms/15s, 0.1 to 1.5%|
31+
|Network | Rx 5-10 KiB/min<br>Tx < 1 KiB/min|
32+
{{< /truetable >}}
33+
34+
Storage usage includes a fixed 80M MiB disk storage for metrics and 2 to 5 MiB for NAS configuration backups.
35+
Backup retention and metric storage duration can be changed, although resizing metrics can result in larger files even after reversion.
36+
Network transmitted bytes are very low for each system, as TrueCommand only sends requests to the NAS.
37+
Typically the ratio of received bytes to transmitted is about 20:1.
38+
39+
## Methodology
40+
41+
cAdvisor, Prometheus, and Grafana were used to generate this data. See the following configuration files to reproduce.
42+
43+
### Prometheus Config
44+
45+
{{< highlight yaml "" >}}
46+
global:
47+
scrape_interval: 15s
48+
evaluation_interval: 15s
49+
# scrape_timeout is set to the global default (10s).
50+
51+
scrape_configs:
52+
- job_name: docker
53+
static_configs:
54+
- targets: ["DOCKERHOST:8090"]
55+
metrics_path: "/metrics"
56+
params:
57+
format: ['prometheus']
58+
{{< /highlight >}}
59+
60+
This enables Prometheus to collect metrics about itself, the docker engine directly, if `metrics-addr` is configured for the daemon, and cAdvisor.
61+
See the compose file below to configure the exposed port and provide a route from the Prometheus container to its sibling cAdvisor container.
62+
63+
### Compose Stack
64+
65+
{{< highlight yaml "" >}}
66+
name: cadvisor_prometheus
67+
services:
68+
prometheus:
69+
image: prom/prometheus:v2.53.1
70+
volumes:
71+
- type: bind
72+
source: ./prometheus.yml
73+
target: /etc/prometheus/prometheus.yml
74+
read_only: true
75+
ports:
76+
- 9090:9090
77+
grafana:
78+
image: grafana/grafana-oss:11.0.1
79+
volumes:
80+
- type: volume
81+
source: grafana-storage
82+
target: /var/lib/grafana
83+
ports:
84+
- 3000:3000
85+
cadvisor:
86+
image: gcr.io/cadvisor/cadvisor:v0.47.2
87+
volumes:
88+
- type: bind
89+
source: /
90+
target: /rootfs
91+
read_only: true
92+
- type: bind
93+
source: /var/run
94+
target: /var/run
95+
read_only: true
96+
- type: bind
97+
source: /var/lib/docker
98+
target: /var/lib/docker
99+
read_only: true
100+
- type: bind
101+
source: /sys
102+
target: /sys
103+
read_only: true
104+
ports:
105+
- 8090:8080
106+
userns_mode: "host"
107+
security_opt:
108+
- seccomp=default.json
109+
command: --docker=unix:///var/run/user/1000/docker.sock --listen_ip=0.0.0.0
110+
volumes:
111+
grafana-storage:
112+
{{< /highlight >}}
113+
114+
Run `docker compose up` to deploy the three containers.
115+
cAdvisor reads from the cgroup and reports container-level metrics to Prometheus.
116+
Grafana can then be used to display these metrics, as seen in the following dashboard:
117+
118+
{{< trueimage src="/images/TrueCommand/tc-three-system-perf.png" alt="Grafana dashboard with TrueCommand running and connected to three TrueNAS systems" id="Grafana dashboard with TrueCommand running and connected to three TrueNAS systems" >}}

content/Recommendations/Syslog.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
title: "TrueCommand Syslog Configuration"
3+
description: "Steps for sending TrueCommand logs via the syslog protocol."
4+
---
5+
6+
Remote logging capabilities through syslog are available in TrueCommand version 2.3 or later.
7+
8+
To enable, first edit the internal configuration file `/etc/config.yaml`.
9+
Overwrite the TC_CONFIG_PATH or create an additional tied volume for this file to preserve changes.
10+
11+
{{< highlight yaml "" >}}
12+
logger:
13+
remote_log:
14+
enabled: false
15+
log_level: error
16+
host: 127.0.0.1 # rsyslog server address
17+
port: 6514 # port based on the protocol
18+
protocol: tcp # tcp or udp
19+
identifier: TrueCommand # will be added as tag in the logs
20+
{{< / highlight >}}
21+
22+
Restart the container.
23+
24+
## Server Setup
25+
26+
An Rsyslog server can easily be setup with Docker.
27+
28+
### rsyslog.conf
29+
30+
```
31+
$ModLoad imudp
32+
$UDPServerRun 5514
33+
$ModLoad imtcp
34+
$InputTCPServerRun 6514
35+
$template RemoteStore, "/var/log/remote/%$year%/%$Month%/%$Day%.log"
36+
:source, !isequal, "localhost" -?RemoteStore
37+
:source, isequal, "last" ~
38+
```
39+
40+
### Dockerfile
41+
42+
{{< highlight yaml "" >}}
43+
FROM ubuntu:latest
44+
RUN apt update && apt install rsyslog -y
45+
ADD rsyslog.conf /etc/.
46+
ENTRYPOINT ["rsyslogd", "-n"]
47+
{{< / highlight >}}
48+
49+
### Docker Build & Run
50+
51+
```
52+
joe@joe-minty:~$ docker build -t rsyslog-server
53+
joe@joe-minty:~$ docker run --rm -d -p 6514:6514 -p 5514:5514/udp --name rsyslog rsyslog-server
54+
```
55+
56+
Logs are stored under the `/var/log/remote/YEAR/MONTH/DAY.log` path.

0 commit comments

Comments
 (0)