File tree Expand file tree Collapse file tree 2 files changed +7
-31
lines changed
registry/coder/modules/kasmvnc Expand file tree Collapse file tree 2 files changed +7
-31
lines changed Original file line number Diff line number Diff line change @@ -60,17 +60,20 @@ variable "kasm_config" {
60
60
description = <<- EOT
61
61
Additional KasmVNC configuration in YAML format. Can be used to set DLP policies and other advanced settings.
62
62
63
- Example for DLP policies:
63
+ Example for DLP policies (according to KasmVNC documentation) :
64
64
```yaml
65
65
data_loss_prevention:
66
66
clipboard:
67
- server_to_client: false
68
- client_to_server: false
67
+ server_to_client:
68
+ enabled: false
69
+ client_to_server:
70
+ enabled: false
69
71
printing: false
70
72
download: false
71
73
```
72
74
73
- See https://kasmweb.com/docs/develop/how_to/kasmvnc_dlp_policies.html for details.
75
+ For more advanced configuration options, see the KasmVNC documentation:
76
+ https://kasmweb.com/docs/latest/how_to/kasmvnc_dlp_policies.html
74
77
EOT
75
78
}
76
79
Original file line number Diff line number Diff line change 254
254
if [[ -n " ${KASM_CONFIG} " ]]; then
255
255
echo " Adding custom KasmVNC configuration."
256
256
257
- # Check for common configuration errors
258
- if echo " ${KASM_CONFIG} " | grep -q " ^policies:" ; then
259
- echo " WARNING: Found 'policies:' at the top level of your configuration."
260
- echo " WARNING: DLP policies should be under the 'data_loss_prevention:' section."
261
- echo " WARNING: Example:"
262
- echo " WARNING: data_loss_prevention:"
263
- echo " WARNING: clipboard:"
264
- echo " WARNING: server_to_client: false"
265
- echo " WARNING: client_to_server: false"
266
- echo " WARNING: printing: false"
267
- echo " WARNING: download: false"
268
-
269
- # Create a temporary file for the fixed configuration
270
- FIXED_CONFIG_FILE=$( mktemp)
271
-
272
- # Replace 'policies:' with 'data_loss_prevention:'
273
- echo " ${KASM_CONFIG} " | sed ' s/^policies:/data_loss_prevention:/' > " $FIXED_CONFIG_FILE "
274
-
275
- # Use the fixed configuration
276
- KASM_CONFIG=$( cat " $FIXED_CONFIG_FILE " )
277
-
278
- # Clean up
279
- rm " $FIXED_CONFIG_FILE "
280
-
281
- echo " WARNING: Automatically fixed configuration. Please update your Terraform code."
282
- fi
283
-
284
257
# Add a comment to mark the start of custom config
285
258
echo " " >> " $TEMP_CONFIG_FILE "
286
259
echo " # ---- START CUSTOM KASMVNC CONFIG ----" >> " $TEMP_CONFIG_FILE "
You can’t perform that action at this time.
0 commit comments