diff --git a/registry/coder/modules/kasmvnc/main.tf b/registry/coder/modules/kasmvnc/main.tf index 18638148..3174e9d0 100644 --- a/registry/coder/modules/kasmvnc/main.tf +++ b/registry/coder/modules/kasmvnc/main.tf @@ -60,17 +60,20 @@ variable "kasm_config" { description = <<-EOT Additional KasmVNC configuration in YAML format. Can be used to set DLP policies and other advanced settings. - Example for DLP policies: + Example for DLP policies (according to KasmVNC documentation): ```yaml data_loss_prevention: clipboard: - server_to_client: false - client_to_server: false + server_to_client: + enabled: false + client_to_server: + enabled: false printing: false download: false ``` - See https://kasmweb.com/docs/develop/how_to/kasmvnc_dlp_policies.html for details. + For more advanced configuration options, see the KasmVNC documentation: + https://kasmweb.com/docs/latest/how_to/kasmvnc_dlp_policies.html EOT } diff --git a/registry/coder/modules/kasmvnc/run.sh b/registry/coder/modules/kasmvnc/run.sh index 66e6bdd6..a244c912 100644 --- a/registry/coder/modules/kasmvnc/run.sh +++ b/registry/coder/modules/kasmvnc/run.sh @@ -254,33 +254,6 @@ fi if [[ -n "${KASM_CONFIG}" ]]; then echo "Adding custom KasmVNC configuration." - # Check for common configuration errors - if echo "${KASM_CONFIG}" | grep -q "^policies:"; then - echo "WARNING: Found 'policies:' at the top level of your configuration." - echo "WARNING: DLP policies should be under the 'data_loss_prevention:' section." - echo "WARNING: Example:" - echo "WARNING: data_loss_prevention:" - echo "WARNING: clipboard:" - echo "WARNING: server_to_client: false" - echo "WARNING: client_to_server: false" - echo "WARNING: printing: false" - echo "WARNING: download: false" - - # Create a temporary file for the fixed configuration - FIXED_CONFIG_FILE=$(mktemp) - - # Replace 'policies:' with 'data_loss_prevention:' - echo "${KASM_CONFIG}" | sed 's/^policies:/data_loss_prevention:/' > "$FIXED_CONFIG_FILE" - - # Use the fixed configuration - KASM_CONFIG=$(cat "$FIXED_CONFIG_FILE") - - # Clean up - rm "$FIXED_CONFIG_FILE" - - echo "WARNING: Automatically fixed configuration. Please update your Terraform code." - fi - # Add a comment to mark the start of custom config echo "" >> "$TEMP_CONFIG_FILE" echo "# ---- START CUSTOM KASMVNC CONFIG ----" >> "$TEMP_CONFIG_FILE"