Skip to content

Commit 31cdaa0

Browse files
committed
domdownload-server documentation update
1 parent de0f650 commit 31cdaa0

File tree

1 file changed

+206
-0
lines changed

1 file changed

+206
-0
lines changed

domdownload-server/README.md

Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
# Domino Download Server
2+
3+
The Domino Download Server provides download functionality for different type of clients intended for company internal downloads
4+
5+
- Downloading software by filename via Curl command line or browser
6+
- Domino Download Script
7+
- Domino AutoUpdate
8+
9+
The container image implements the MyHCLSoftware compatible end-points to allow downloads from Domino AutoUpdate.
10+
It also provides `product.jwt` and `software.jwt` which is required for Domino AutoUpdate.
11+
A Domino AutoUpdate server can be pointed directly to the server using the official DNS names by setting them in the hostfile of the Domino server.
12+
13+
The container image is self contained. It just requires mounts for storing data and optionally a corporate certificate (or operates with it's own MicroCA).
14+
15+
16+
## Technology used
17+
18+
The server is based on an [Alpine](https://alpinelinux.org/) container running NGINX (openresty).
19+
[openresty](https://openresty.org) is used because the logic is implemented in [LUA](https://www.lua.org/) programming language.
20+
Is leveraging the Domino Download script, which is invoked from NGINX via LUA blocks.
21+
22+
23+
## How to build the Container Image
24+
25+
Run the following command to build the image
26+
27+
```
28+
./build.sh
29+
```
30+
31+
The resulting image is called **nashcom/domdownload:latest** by default
32+
33+
34+
## domdownloadctl - Domino Download Control Script
35+
36+
The **domdownloadctl** is a script to provide a single entrypoint for start, stop and maintain the container.
37+
38+
The script can be installed via `./domdownloadctl install`
39+
40+
Once configured the server can be started via
41+
42+
```
43+
domdownloadctl start
44+
```
45+
46+
47+
### Additional Commands
48+
49+
```
50+
Usage: domdownloadctl [Options]
51+
52+
start start the container
53+
stop stop the container
54+
bash start a bash in the container with the standard 'nginx' user
55+
bash root start a bash with root
56+
rm remove the container (even when running)
57+
58+
log show the NGINX server log (container output)
59+
cfg edit configuration
60+
info show information about the configuration
61+
du|ncdu snow the space used SOFTWARE_DIR. Either a 'du' summary or 'ncdu'
62+
allow edit the allow list
63+
adduser add a new HTTP user
64+
access show access lines. Optionally specify the number of lines or 'f' to follow the log
65+
```
66+
67+
## Request Endpoints
68+
69+
All endpoints are protected either by IP address or basic authentication.
70+
The **/about** endpoint prints the version of Domino Download.
71+
72+
If MyHCLSoftware API integrated is enabled the following additional endpoints are available:
73+
74+
- /v1/apitokens/exchange
75+
- /v1/files/
76+
- /software.jwt
77+
- /product.jwt
78+
79+
All other requests are passed to the software directory, which is the data root of the NGINX server.
80+
81+
82+
## Configuration
83+
84+
85+
## Configure Access
86+
87+
By default the server provides access for the loopback IP **127.0.0.1** only.
88+
Additional IP addresses and ranges can be configured via **allow.access**.
89+
The configuration can be specified using the `domdownloadctl allow` command.
90+
91+
In addition a HTTP password file can be configured using the `domdownloadctl adduser` command (htpasswd).
92+
93+
94+
## Mount points
95+
96+
All mount points can be configured in the DomDownloadServer configuration and ship with a reasonable default (See "Host" in the list below).
97+
98+
- **DOMDOWNLOADSRV_DIR**
99+
Configuration directory holding configuration data for the server and **domdownload**
100+
Host: `/local/software`
101+
Container: `/etc/nginx/conf.d` and `/home/nginx/.DominoDownload`
102+
103+
- **SOFTWARE_DIR**
104+
Software directory to store web-kits
105+
Host: `/local/software`
106+
Container: `/local/software`
107+
108+
- **DOMDOWNLOADSRV_LOG**
109+
Server log directory containing NGINX logs including access.log
110+
Host: `/var/log/domdownloadsrv`
111+
Container: `/tmp/nginx`
112+
113+
114+
## Configuration
115+
116+
- **CONTAINER_HOSTNAME**
117+
Container Host name
118+
If no host name is specified Linux hostname is used
119+
120+
- **CONTAINER_NAME**
121+
Container name
122+
default: domdownload
123+
124+
- **CONTAINER_IMAGE**
125+
Container image name. Should not be needed to change
126+
default: nashcom/domdownload:latest
127+
128+
- **CONTAINER_NETWORK_NAME**
129+
Container network name. By default the container uses the host mode to have access to request IP addresses
130+
131+
- **USE_DOCKER**
132+
Override container environment to use Docker if also Podman is installed
133+
134+
- **NGINX_LOG_LEVEL**=notice
135+
NGINX server log level
136+
137+
138+
### NGINX Log Levels
139+
140+
- **debug** - Useful debugging information to help determine where the problem lies
141+
- **info** - Informational messages that aren't necessary to read but may be good to know
142+
- **notice** - Something normal happened that is worth noting
143+
- **warn** - Something unexpected happened, however is not a cause for concern
144+
- **error** - Something was unsuccessful
145+
- **crit** - There are problems that need to be critically addressed
146+
- **alert** - Prompt action is required
147+
- **emerg** - The system is in an unusable state and requires immediate attention
148+
149+
150+
## Hostname and Port and Network
151+
152+
The default hostname is the hostname of the Linux container. The port used is `8888`.
153+
The recommended configuration uses the container host mode to have full access to the true IP address to allow IP based authentication.
154+
If no IP based authentication is required and a server in front of it (like another NGINX server) the server can also use a container network and map the default port `8888` to another port.
155+
156+
157+
## TLS/SSL Certificate
158+
159+
The server can use a PEM based certificate and key specified in the configuration volume.
160+
If not certificate is specified the server generates it's own MicroCA and a TLS certificate for the server.
161+
162+
For the MyHCLSoftware integration a wild card certificate for `*.hcltechsw.com` is generated to provide a local instance of the MyHCLSoftware portal.
163+
The root certificate generated by the container automatically is displayed on startup and need to be imported into the Domino directory as a trusted root.
164+
165+
166+
## Authentication/Authorization
167+
168+
Download requests must be always authorized. This is specially important in case the server is internet facing.
169+
But also internally the server should only allow authorized access.
170+
171+
The server currently supports access control using basic authentication or IP address.
172+
By default only **127.0.0.1** is allowed. You can either add another load balancer for example NGINX in front of it or run it natively.
173+
174+
175+
## Configure AutoUpdate to use the Domino Download Server
176+
177+
178+
### Configure the Container
179+
180+
The functionality is disabled by default, because it requires port 443.
181+
A separate configuration is available in the GitHub project to enable the required redirecty on port 443.
182+
183+
To enable the functionality copy `hcltechsw.cfg` into the configuration directory.
184+
Once available the `/entrypoint.sh` script automatically generates a wild card certificate for `*.hcltechsw.com`.
185+
186+
In case other services require **port 443** the configuration can be extended or moved into a different NGINX instance.
187+
This integration only provides the required redirect functionality to provide the required endpoints to provide MyHCLSoftware functionality.
188+
189+
190+
### Configure the Domino AutoUpdate Server
191+
192+
Point your Domino server running Domino AutoUpdate to the IP of the Domino Download Server for the following two DNS names:
193+
194+
- api.hcltechsw.com
195+
- ds-infolib.hcltechsw.com
196+
197+
Import the trusted root for the MicroCA created by the server automatically into Domino Directory into Internet Certificates
198+
199+
Add the IP address of your Domino AutoUpdate Server to the allow list of the NGINX server configuration.
200+
No other configuration option is needed.
201+
202+
To get the integration configured create a customized `hcltechsw.conf` in the configuration directory.
203+
The default name `domdownload.myserver.lab` needs to be replaced with your server name.
204+
205+
206+

0 commit comments

Comments
 (0)