Skip to content

Commit 6224500

Browse files
add PQC flag to site ssl config resource (#613)
* add PQC flag to site ssl config resource * add PQC flag to site ssl config resource --------- Co-authored-by: eilon.shai <eilon.shai@imperva.com>
1 parent 22d0e18 commit 6224500

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

incapsula/client_site_ssl_settings.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ type TLSConfiguration struct {
2828
type SSLSettingsDTO struct {
2929
HstsConfiguration *HSTSConfiguration `json:"hstsConfiguration,omitempty"`
3030
InboundTLSSettingsConfiguration *InboundTLSSettingsConfiguration `json:"inboundTlsSettings,omitempty"`
31+
DisablePQCSupport bool `json:"disablePQCSupport"`
3132
}
3233

3334
type SSLSettingsResponse struct {

incapsula/client_site_ssl_settings_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ func getUpdateSiteSSLSettingsDTO() SSLSettingsResponse {
300300
},
301301
},
302302
},
303-
// add more setting types here
303+
DisablePQCSupport: true,
304304
},
305305
},
306306
}

incapsula/resource_site_ssl_settings.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ package incapsula
22

33
import (
44
"fmt"
5-
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
65
"log"
76
"strconv"
87
"strings"
8+
9+
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
910
)
1011

1112
var hstsConfigResource = schema.Resource{
@@ -126,6 +127,12 @@ func resourceSiteSSLSettings() *schema.Resource {
126127
Elem: &inboundTLSSettingsResource,
127128
Set: schema.HashResource(&inboundTLSSettingsResource),
128129
},
130+
"disable_pqc_support": {
131+
Type: schema.TypeBool,
132+
Description: "Disable Post-Quantum Cryptography support for SNI traffic",
133+
Optional: true,
134+
Default: false,
135+
},
129136
},
130137
}
131138
}
@@ -165,6 +172,7 @@ func resourceSiteSSLSettingsRead(d *schema.ResourceData, m interface{}) error {
165172

166173
mapHSTSResponseToHSTSResource(d, settingsData)
167174
mapInboundTLSSettingsResponseToResource(d, settingsData)
175+
d.Set("disable_pqc_support", settingsData.Data[0].DisablePQCSupport)
168176
// map other settings here
169177

170178
return nil
@@ -334,7 +342,7 @@ func getSSLSettingsDTO(d *schema.ResourceData) SSLSettingsResponse {
334342
{
335343
HstsConfiguration: hstsSettings,
336344
InboundTLSSettingsConfiguration: inboundTLSSettings,
337-
// add more setting types here
345+
DisablePQCSupport: d.Get("disable_pqc_support").(bool),
338346
},
339347
},
340348
}

website/docs/r/site_ssl_settings.html.markdown

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ resource "incapsula_site_ssl_settings" "example" {
5252
"TLS_AES_256_GCM_SHA384",
5353
]
5454
}
55-
}
55+
},
56+
disable_pqc_support: false
5657
}
5758
```
5859

@@ -66,6 +67,9 @@ The following arguments are supported:
6667
- Type: `set` of `hsts_config` resource (defined below)
6768
* `inbound_tls_settings` - (Optional): Transport Layer Security (TLS) configuration settings for the site.
6869
- Type: `set` of `inbound_tls_settings` resource (defined below)
70+
* `disable_pqc_support` - (Optional): Disable Post-Quantum Cryptography support for SNI traffic.
71+
- Type: `bool`
72+
- Default: `false`
6973

7074
## Schema of `hsts_config` resource
7175

0 commit comments

Comments
 (0)