Skip to content

Commit 7571b91

Browse files
committed
simplofy
1 parent e0708ce commit 7571b91

File tree

2 files changed

+7
-31
lines changed

2 files changed

+7
-31
lines changed

registry/coder/modules/kasmvnc/main.tf

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,20 @@ variable "kasm_config" {
6060
description = <<-EOT
6161
Additional KasmVNC configuration in YAML format. Can be used to set DLP policies and other advanced settings.
6262
63-
Example for DLP policies:
63+
Example for DLP policies (according to KasmVNC documentation):
6464
```yaml
6565
data_loss_prevention:
6666
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
6971
printing: false
7072
download: false
7173
```
7274
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
7477
EOT
7578
}
7679

registry/coder/modules/kasmvnc/run.sh

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -254,33 +254,6 @@ fi
254254
if [[ -n "${KASM_CONFIG}" ]]; then
255255
echo "Adding custom KasmVNC configuration."
256256

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-
284257
# Add a comment to mark the start of custom config
285258
echo "" >> "$TEMP_CONFIG_FILE"
286259
echo "# ---- START CUSTOM KASMVNC CONFIG ----" >> "$TEMP_CONFIG_FILE"

0 commit comments

Comments
 (0)