mrparkers / terraform-provider-keycloak

Terraform provider for Keycloak
https://registry.terraform.io/providers/mrparkers/keycloak/latest/docs
Apache License 2.0
636 stars 312 forks source link

Expand BrowserSecurityHeaders to set the referrer-policy #557

Closed burkhat closed 3 years ago

burkhat commented 3 years ago

Hello together,

since Keycloak 12.x it is necessary to set the referrer-policy in the BrowserSecurityHeaders of a REALM. At the moment it is only possible to set it via the REST-API, see https://issues.redhat.com/browse/KEYCLOAK-17306?_sscc=t

It would be very helpful if it is possible to expand the terraform REALM modul that this policy can be set via terraform.

type BrowserSecurityHeaders struct { ContentSecurityPolicy string json:"contentSecurityPolicy" ContentSecurityPolicyReportOnly string json:"contentSecurityPolicyReportOnly" StrictTransportSecurity string json:"strictTransportSecurity" XContentTypeOptions string json:"xContentTypeOptions" XFrameOptions string json:"xFrameOptions" XRobotsTag string json:"xRobotsTag" XXSSProtection string json:"xXSSProtection" }

Regards Tobias

mrparkers commented 3 years ago

Hey @burkhat, this should be available via the security_defenses argument: https://registry.terraform.io/providers/mrparkers/keycloak/latest/docs/resources/realm#security-defenses. Let me know if you're looking for something else and we can re-open this issue.