Skip to content

[BUG] Cannot define enrichment attributes if the CorpProvider is OIDC type #226

@ptesny

Description

@ptesny

Is there an existing issue for this?

  • I have searched the existing issues

What version of the Terraform provider are you using?

0.3.0-beta1

What version of the Terraform CLI are you using?

1.14.0

What type of issue are you facing

bug report

Describe the bug

It seems there is now way to define the enrichment attributes when creating an OIDC corporate identity provider.
These attributes would available for SAML corporate identity provider but cannot be set with the OIDC corporate identity provider.
Or, at least I have not found a way to get it done by the provider

Image

Expected Behavior

To be able to define the enrichment attributes regardless of the type of the corp provider

Steps To Reproduce

The below code snippet works nicely but the enrichment attributes that I still need to set manually in the aftermath.

You will notice a hack with the client_secret.
The SCI TF provider will not accept an empty secret even if the secret is not required by the IDP provider being federated

#### github.com corporate idp


locals {
  GITHUB_IDP_NAME = "GITHUB"
  GITHUB_IDP_ISSUER = "https://token.actions.githubusercontent.com"
}

/**/
resource "sci_corporate_idp" "github_idp" {

  display_name = "${local.GITHUB_IDP_NAME}"
  forward_all_sso_requests = false

  identity_federation = {
    allow_local_users_only = true
    apply_local_idp_auth_and_checks = false
    required_groups = [ "GitHub"] 
    use_local_user_store = true
  }
  login_hint_config = {
    login_hint_type = "userInput"
    send_method = "urlParam"
  }

  name = "${local.GITHUB_IDP_NAME}"
//  assertion_attributes = [
//      {
//          name  =  "NameID",
//          value = "<foo.bar>@github.com"
//      }
//  ]

  oidc_config = {
    additional_config = {
      disable_logout_id_token_hint = false
      enforce_issuer_check = false
      enforce_nonce = false
    }

    client_id = "${local.GITHUB_IDP_NAME}"
    client_secret = "secret not required"

    discovery_url = "${local.GITHUB_IDP_ISSUER}"    
    subject_name_identifier = "email"

    enable_pkce = false
    scopes = [
      "openid"
    ]    
  }

  type = "openIdConnect"

  lifecycle {
    ignore_changes = all
  } 

}


output "github_idp" {
  value = sci_corporate_idp.github_idp
}
/**/

Add screenshots to help explain your problem

No response

Additional context

No response

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions