Skip to content

Resolve issues where the ISO3166 countries regex doesn't match. - #541

Open
plambrechtsen wants to merge 2 commits into
patrickcping:mainfrom
plambrechtsen:notification_policy_countries
Open

Resolve issues where the ISO3166 countries regex doesn't match.#541
plambrechtsen wants to merge 2 commits into
patrickcping:mainfrom
plambrechtsen:notification_policy_countries

Conversation

@plambrechtsen

Copy link
Copy Markdown

There are 4 country codes that are missing from the regex that is used by addresses and notification templates.

  • BQ
  • CW
  • SS
  • SX

Also AN should be removed from the list

I found this while extracting the current configuration and attempting to import it using Terraform.

Also corrected a few sorting values to get them in order.

There are 3 locations that the country code is specified.

schema/NotificationsPolicy/countryLimit/countries
schema/NotificationsPolicy/providerConfiguration/countries
And
schema/User/address/countryCode

To me it would make sense to replace all 3 with an enum ref, and use a simplified regex of:

^(A[DEFGILMOQRSTUWXZ]|B[ABDEFGHIJLMNOQRSTVWYZ]|C[ACDFGHIKLMNORUVWXYZ]|D[EJKMOZ]|E[CEGHRST]|F[IJKMOR]|G[ABDEFGHILMNPQRSTUVWY]|H[KMNRTU]|I[DEILMNOQRST]|J[EMOP]|K[EGHIKMNPRWYZ]|L[ABCIKLRSTUVY]|M[ACDEFGHKLMNOPQRSTUVWXYZ]|N[ACEFGILNOPRUZ]|OM|P[AEFGHKLMNPRSTWY]|QA|R[EOSUW]|S[ABCDEGHIJKLMNORSTVXYZ]|T[CDFGHJKLMNORTVWZ]|U[AGMSYZ]|V[ACEGINU]|W[FS]|Y[ET]|Z[AMW])$

But when I tried that it created double quotes around one of the strings in the openapi yaml that gets generated so rolled that back.

@henryrecker-pingidentity

Copy link
Copy Markdown
Collaborator

Thanks for reporting this issue. We've created an internal issue tracking this and will look at including it in a future release of the provider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants