simplofy
This commit is contained in:
parent
e0708ce041
commit
7571b91780
@ -60,17 +60,20 @@ variable "kasm_config" {
|
|||||||
description = <<-EOT
|
description = <<-EOT
|
||||||
Additional KasmVNC configuration in YAML format. Can be used to set DLP policies and other advanced settings.
|
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
|
```yaml
|
||||||
data_loss_prevention:
|
data_loss_prevention:
|
||||||
clipboard:
|
clipboard:
|
||||||
server_to_client: false
|
server_to_client:
|
||||||
client_to_server: false
|
enabled: false
|
||||||
|
client_to_server:
|
||||||
|
enabled: false
|
||||||
printing: false
|
printing: false
|
||||||
download: 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
|
EOT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -254,33 +254,6 @@ fi
|
|||||||
if [[ -n "${KASM_CONFIG}" ]]; then
|
if [[ -n "${KASM_CONFIG}" ]]; then
|
||||||
echo "Adding custom KasmVNC configuration."
|
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
|
# Add a comment to mark the start of custom config
|
||||||
echo "" >> "$TEMP_CONFIG_FILE"
|
echo "" >> "$TEMP_CONFIG_FILE"
|
||||||
echo "# ---- START CUSTOM KASMVNC CONFIG ----" >> "$TEMP_CONFIG_FILE"
|
echo "# ---- START CUSTOM KASMVNC CONFIG ----" >> "$TEMP_CONFIG_FILE"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user