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

DEV: Update LinkedIn OIDC client secret validation format #27028

Merged
merged 1 commit into from
May 15, 2024

Conversation

Drenmi
Copy link
Contributor

@Drenmi Drenmi commented May 15, 2024

Meta

What is this change?

The LinkedIn OIDC client secret used to look something like:

sHyUiKxnLJKBE1Do

but now they are generating secrets that look like:

WPL_AP0.UIM1fMSfJMdLtHm0.agwMyzJw1xoAcEJ0==

This updates the regular expression used for validation to reflect this.

@discoursebot
Copy link

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/configure-linkedin-openid-connect-login-for-discourse/305366/5

@nattsw
Copy link
Contributor

nattsw commented May 15, 2024

We can't get a regex properly right? I mean by looking at LinkedIn's docs or something to ensure there are no additional special characters

Right - https://learn.microsoft.com/en-us/linkedin/shared/authentication/client-credentials-flow - they don't share what it can "look" like 😮‍💨

@@ -512,7 +512,7 @@ login:
regex: "^[a-z0-9]+$"
linkedin_oidc_client_secret:
default: ""
regex: "^[a-zA-Z0-9]+$"
regex: "^[a-zA-Z0-9_=\\.]+$"
Copy link
Contributor

@nattsw nattsw May 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it have a \ char?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to use double escape because it's in a YAML file. The first one escapes the second in YAML, the second one escapes the dot in the regular expression. (You can search \\. in site_settings.yml for other examples.

@Drenmi Drenmi merged commit e1953f7 into main May 15, 2024
16 checks passed
@Drenmi Drenmi deleted the dev/linkedin-oidc-secret-format branch May 15, 2024 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants