You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-1Lines changed: 28 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -193,8 +193,11 @@ Default configure file `overlaybd.json` is installed to `/etc/overlaybd/`.
193
193
| gzipCacheConfig.cacheSizeGB | The max size of cache, in GB. |
194
194
| gzipCacheConfig.refillSize | The refill size from source, in byte. `262144` is default (256 KB). |
195
195
| credentialFilePath(legacy) | The credential used for fetching images on registry. `/opt/overlaybd/cred.json` is the default value. |
196
-
| credentialConfig.mode | Authentication mode for lazy-loading. <br> - `file` means reading credential from `credentialConfig.path`. <br> - `http` means sending an http request to `credentialConfig.path`|
196
+
| credentialConfig.mode | Authentication mode for lazy-loading. <br> - `file` means reading credential from `credentialConfig.path`. <br> - `http` means sending an http request to `credentialConfig.path`<br> - `https` means sending an https request with mTLS (mutual TLS) to `credentialConfig.path`|
197
197
| credentialConfig.path | credential file path or url which is determined by `mode`|
198
+
| credentialConfig.client_cert_path | Path to the client certificate file for mTLS (used by `https` mode) |
199
+
| credentialConfig.client_key_path | Path to the client private key file for mTLS (used by `https` mode) |
200
+
| credentialConfig.server_ca_path | Path to the CA certificate used to verify the server for mTLS (used by `https` mode) |
198
201
| download.enable | Whether background downloading is enabled or not. |
199
202
| download.delay | The seconds waiting to start downloading task after the overlaybd device launched. |
200
203
| download.delayExtra | A random extra delay is attached to delay, avoiding too many tasks started at the same time. |
@@ -293,6 +296,30 @@ Overlaybd supports serveral credential mode. Here are some example `credentialCo
293
296
```
294
297
we write a sample http server in `test/simple_auth_server.cpp`
295
298
299
+
- mode **https**
300
+
301
+
the `credentialConfig.path` should be an HTTPS server listening address. This mode uses mTLS (mutual TLS) for secure communication with the auth server. The client presents its certificate and key, and verifies the server against a trusted CA certificate.
302
+
303
+
```json
304
+
#### /etc/overlaybd/config.json ####
305
+
{
306
+
"logLevel": 1,
307
+
"logPath": "/var/log/overlaybd.log",
308
+
...
309
+
"credentialConfig": {
310
+
"mode": "https",
311
+
"path": "https://localhost:19876/auth",
312
+
"client_cert_path": "/etc/overlaybd/client.crt",
313
+
"client_key_path": "/etc/overlaybd/client.key",
314
+
"server_ca_path": "/etc/overlaybd/ca.crt"
315
+
},
316
+
...
317
+
}
318
+
```
319
+
overlaybd will send an https request with mTLS to the server with `remote_url` like this:
320
+
> GET "https://localhost:19876/auth?remote_url=https://hub.docker.com/v2/overlaybd/ubuntu/blobs/sha256:47e63559a8487efb55b2f1ccea9cfc04110a185c49785fdf1329d1ea462ce5f0"
321
+
the server response format is the same as the `http` mode.
0 commit comments