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

Site health says oidc keys are invalid, but they aren't #103

Closed
psrpinto opened this issue Oct 10, 2023 · 1 comment · Fixed by #104
Closed

Site health says oidc keys are invalid, but they aren't #103

psrpinto opened this issue Oct 10, 2023 · 1 comment · Fixed by #104
Labels
bug Something isn't working

Comments

@psrpinto
Copy link
Member

psrpinto commented Oct 10, 2023

The plugin is functional, but the site health says the keys are invalid:

Screenshot 2023-10-10 at 16 19 28

This happens with keys produced as per instructions in the readme:

openssl genrsa -out oidc.key 4096
openssl rsa -in oidc.key -pubout -out public.key
@psrpinto psrpinto added the bug Something isn't working label Oct 10, 2023
jeherve added a commit that referenced this issue Oct 25, 2023
Fixes #103

The readme suggests setting up keys in `wp-config.php`, and suggests using comments like `-----BEGIN RSA PUBLIC KEY-----` to clearly mark the beginning and end of your key.

However, that format:

1. Does not match the output of the `openssl` command.
2. Does not match the format we expect in Tools > Site Health: https://github.com/Automattic/wp-openid-connect-server/blob/ee663a12d9e12d0b5c9e8c7745c3b48c716754b2/src/SiteStatusTests.php#L35

Let's update the example format to match what's expected.
@jeherve
Copy link
Member

jeherve commented Oct 25, 2023

I ran into this issue as well. Could you try to update the format of the key you pasted in your site's wp-config.php to use -----BEGIN PUBLIC KEY----- and -----END PUBLIC KEY----- as the markers for the beginning and end of the key.

Hopefully that will help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants