Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OIDC connections: Specify user mapping #783

Closed
1 task done
MatthiasWinzeler opened this issue Aug 21, 2023 · 3 comments
Closed
1 task done

OIDC connections: Specify user mapping #783

MatthiasWinzeler opened this issue Aug 21, 2023 · 3 comments
Labels
🌱 feature New feature or request

Comments

@MatthiasWinzeler
Copy link

Checklist

Describe the problem you'd like to have solved

Hi folks - we are happy users of the Auth0 provider, but couldn't find a way to set the user mapping on OIDC connections.

In the UI, it can be specified as follows:

image

However, the provider does not offer a field to set it. From browsing through the docs and Github issues, we saw that there is a similar field fields_map for SAML connections.

Interestingly, when applying a setting like the following, it succeeds, but the OIDC connection in the portal doesn't show any fields anymore (leaving the connection in a weird state, so we had to recreate it):

options {
    fields_map = jsonencode({
      "mapping_mode": "use_map",
      "attributes": {
        "name" : "$${context.tokenset.name}"
      }
    })
}

Describe the ideal solution

It would be nice if the auth0_connection resource would allow specifying the mapping. Example:

  options {
    attribute_mapping = jsonencode({
      "mapping_mode": "use_map",
      "attributes": {
        "name" : "$${context.tokenset.name}"
      }
    })
  }

Alternatives and current workarounds

No response

Additional context

No response

@MatthiasWinzeler MatthiasWinzeler added the 🌱 feature New feature or request label Aug 21, 2023
@sergiught
Copy link
Contributor

Hey @MatthiasWinzeler 👋🏻

Thanks for raising this with us, you're correct that at the moment this field is lacking within the provider. We'll aim at adding support for it in the near future, however no ETA as to when. I'll circle back once I have an update. Appreciate your patience!

@sergiught
Copy link
Contributor

Hey @MatthiasWinzeler 👋🏻

We have added support for this within the auth0_connection resource in the latest beta release. Please give it a try, and if you come across any issues, don't hesitate to reach out.

Changelog: https://github.com/auth0/terraform-provider-auth0/releases/tag/v1.0.0-beta.4
Docs: https://registry.terraform.io/providers/auth0/auth0/latest/docs/resources/connection#nested-schema-for-optionsattribute_map
Example: https://registry.terraform.io/providers/auth0/auth0/latest/docs/resources/connection#oidc-connection

✌🏻

@MatthiasWinzeler
Copy link
Author

hi @sergiught that's great news, many thanks - we'll give it a try and let you know if we encounter any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants