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

Keycloak + WordPress redirect to blank #126

Open
uhlhosting opened this issue Oct 31, 2021 · 2 comments
Open

Keycloak + WordPress redirect to blank #126

uhlhosting opened this issue Oct 31, 2021 · 2 comments

Comments

@uhlhosting
Copy link

uhlhosting commented Oct 31, 2021

After setting up Keycloak tried to login with created users, got this url after login blank

https://uhl.site/wp-login.php?saml_acs

Fatal error: Uncaught OneLogin\Saml2\ValidationError: Found an Attribute element with duplicated Name in /www/wwwroot/uhl.site/wp-content/plugins/onelogin-saml-sso/php/lib/Saml2/Response.php:819 Stack trace: #0 /www/wwwroot/uhl.site/wp-content/plugins/onelogin-saml-sso/php/lib/Saml2/Response.php(781): OneLogin\Saml2\Response->_getAttributesByKeyName() #1 /www/wwwroot/uhl.site/wp-content/plugins/onelogin-saml-sso/php/lib/Saml2/Auth.php(238): OneLogin\Saml2\Response->getAttributes() #2 /www/wwwroot/uhl.site/wp-content/plugins/onelogin-saml-sso/php/functions.php(240): OneLogin\Saml2\Auth->processResponse() #3 /www/wwwroot/uhl.site/wp-content/plugins/onelogin-saml-sso/php/functions.php(20): saml_acs() #4 /www/wwwroot/uhl.site/wp-includes/class-wp-hook.php(303): saml_checker() #5 /www/wwwroot/uhl.site/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters() #6 /www/wwwroot/uhl.site/wp-includes/plugin.php(470): WP_Hook->do_action() #7 /www/wwwroot/uhl.site/wp-settings.php(578): do_action() #8 /www/wwwroot/uhl.site/wp-config in /www/wwwroot/uhl.site/wp-content/plugins/onelogin-saml-sso/php/lib/Saml2/Response.php on line 819

@pitbulk
Copy link
Contributor

pitbulk commented Nov 2, 2021

It seems keycloack is generating duplicate Attributes inside the AttributeStatement.

php-saml has an option to allow this: allowRepeatAttributeName

You need to edit at the wordpress-saml plugin at php/settings.php, Inside the security array

add

"allowRepeatAttributeName" => true,

@uhlhosting
Copy link
Author

I will give it a try, do you have any guides maybe specific to keycloak saml and wordpress I could dig up?

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

No branches or pull requests

2 participants