jfrog / terraform-provider-platform

Terraform provider to manage JFrog Platform
https://jfrog.com
Apache License 2.0
1 stars 1 forks source link

platform_saml_settings/no_auto_user_creation not working as expected #133

Open renjfk opened 6 days ago

renjfk commented 6 days ago

Describe the bug When platform_saml_settings is used with "Default" profile on Artifactory instances that support single SAML SSO settings, no_auto_user_creation has no effect on Auto Create Users feature as it simply unsets the setting on GUI no matter what you define on Terraform.

Requirements for and issue

Expected behavior no_auto_user_creation works as expected on on Artifactory instances that support single SAML SSO settings.

Additional context

resource "platform_saml_settings" "saml_settings" {
  name                         = "default"
  enable                       = true
  login_url                    = "https://login.microsoftonline.com/***/saml2"
  logout_url                   = "https://***/ui/login"
  service_provider_name        = "https://***/ui/login"
  certificate                  = file("${path.module}/JFrog Platform.cer")
  email_attribute              = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"
  group_attribute              = "http://schemas.microsoft.com/ws/2008/06/identity/claims/role"
  sync_groups                  = true
  allow_user_to_access_profile = true
  verify_audience_restriction  = true
  no_auto_user_creation        = false
}

image

NAME            NAMESPACE                   REVISION    UPDATED                                 STATUS      CHART                   APP VERSION
jfrog-platform  jfrog-platform-namespace    6           2024-09-25 14:39:46.419462 +0300 EEST   deployed    jfrog-platform-10.19.5  7.90.10
terraform --version
Terraform v1.9.6
on darwin_arm64
+ provider registry.terraform.io/hashicorp/http v3.4.5
+ provider registry.terraform.io/jfrog/artifactory v12.1.0
+ provider registry.terraform.io/jfrog/platform v1.12.0
+ provider registry.terraform.io/jfrog/project v1.8.0
renjfk commented 6 days ago

Btw I've also tried artifactory_saml_settings both creating and importing but no use since it's deprecated.

│ Error: artifactory_saml_settings deprecated. Use platform_saml_settings instead
│ 
│   with artifactory_saml_settings.saml,
│   on general.tf line 14, in resource "artifactory_saml_settings" "saml":
│   14: resource "artifactory_saml_settings" "saml" {
│ Error: resource artifactory_saml_settings doesn't support import
alexhung commented 3 days ago

@renjfk Thanks for the report! Looks like it's a bug in the provider. I've added this to our plan to fix.