|
| 1 | +--- |
| 2 | +page_title: "Configuring SIA Settings" |
| 3 | +description: |- |
| 4 | + Configure SIA settings globally or per setting using the Idsec Terraform Provider |
| 5 | +--- |
| 6 | + |
| 7 | +# Motivation |
| 8 | +This workflow describes how to manage SIA Settings with the Idsec Terraform Provider. |
| 9 | +SIA settings define global secure-access behavior, including session timeouts, MFA caching, and connection policies. |
| 10 | + |
| 11 | +Using Terraform to configure these settings provides consistent, versioned, and auditable management of your SIA environment. |
| 12 | + |
| 13 | +--- |
| 14 | +# Two Ways to Manage SIA Settings |
| 15 | +The Idsec Terraform Provider supports configuring SIA settings using: |
| 16 | + |
| 17 | +### 1. Global Settings Resource |
| 18 | +`idsec_sia_settings_settings` |
| 19 | +- Allows updating multiple settings within a single resource. |
| 20 | +- Good for bulk configuration. |
| 21 | + |
| 22 | +### 2. Specific Setting Resources |
| 23 | +Each setting has a dedicated resource: |
| 24 | +- `idsec_sia_settings_certificate_validation` |
| 25 | +- `idsec_sia_settings_ssh_mfa_caching` |
| 26 | +- `idsec_sia_settings_rdp_token_mfa_caching` |
| 27 | +- `idsec_sia_settings_self_hosted_pam` |
| 28 | +- `idsec_sia_settings_logon_sequence` |
| 29 | +- …and more. |
| 30 | +--- |
| 31 | + |
| 32 | +# Workflow |
| 33 | +The workflow will: |
| 34 | +- Authenticate to CyberArk with a user who is a member of the DpaAdmin role. |
| 35 | +- Demonstrate how to update SIA settings using both of the following methods: |
| 36 | + - Global settings update |
| 37 | + - Specific per setting updates |
| 38 | + |
| 39 | +main.tf |
| 40 | +```terraform |
| 41 | +terraform { |
| 42 | + required_version = ">= 0.13" |
| 43 | + required_providers { |
| 44 | + idsec = { |
| 45 | + source = "cyberark/idsec" |
| 46 | + version = ">= 0.1" |
| 47 | + } |
| 48 | + } |
| 49 | +} |
| 50 | +
|
| 51 | +provider "idsec" { |
| 52 | + auth_method = "identity" |
| 53 | + username = var.idsec_username |
| 54 | + secret = var.idsec_secret |
| 55 | +} |
| 56 | +
|
| 57 | +# Update multiple SIA settings in one resource |
| 58 | +resource "idsec_sia_settings_settings" "global" { |
| 59 | + certificate_validation = { |
| 60 | + enabled = true |
| 61 | + } |
| 62 | +
|
| 63 | + ssh_mfa_caching = { |
| 64 | + is_mfa_caching_enabled = true |
| 65 | + key_expiration_time_sec = 3600 |
| 66 | + } |
| 67 | +
|
| 68 | + standing_access = { |
| 69 | + standing_access_available = true |
| 70 | + session_max_duration = 120 |
| 71 | + } |
| 72 | +} |
| 73 | +
|
| 74 | +
|
| 75 | +# Update Settings Using Specific Resources |
| 76 | +resource "idsec_sia_settings_rdp_recording" "recording" { |
| 77 | + enabled = true |
| 78 | +} |
| 79 | +
|
| 80 | +resource "idsec_sia_settings_ssh_mfa_caching" "ssh_mfa" { |
| 81 | + is_mfa_caching_enabled = true |
| 82 | + key_expiration_time_sec = 3600 |
| 83 | + client_ip_enforced = false |
| 84 | +} |
| 85 | +
|
| 86 | +``` |
| 87 | + |
| 88 | +variables.tf |
| 89 | +```terraform |
| 90 | +variable "idsec_username" { |
| 91 | + description = "The username for the Idsec provider." |
| 92 | + type = string |
| 93 | +} |
| 94 | +
|
| 95 | +variable "idsec_secret" { |
| 96 | + description = "The Secret/password for the Idsec provider." |
| 97 | + type = string |
| 98 | + sensitive = true |
| 99 | +} |
| 100 | +
|
| 101 | +``` |
0 commit comments