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

clientId not send #1

Closed
f1-outsourcing opened this issue Nov 17, 2024 · 5 comments
Closed

clientId not send #1

f1-outsourcing opened this issue Nov 17, 2024 · 5 comments

Comments

@f1-outsourcing
Copy link

Hi,

Nice work, looks like well above the average wordpress plugin work. Good integration also with this network.

I am testing with keycloak and just created a saml client with id website-testing and put this in your config at "dP Entity Id *", however it looks like it is not being send. This is what keycloak is logging.

type="LOGIN_ERROR", realmId="xxxx", realmName="xxxx", clientId="null", userId="null", ipAddress="xxxxx", error="client_not_found", reason="Cannot_match_source_hash"

Normally I see in clientId this website-testing. However I mostly tested with oidc (last few days) so I probably do something wrong. Do you have some suggestions what I could check?

@f1-outsourcing
Copy link
Author

Fatal error:  Uncaught OneLogin\\Saml2\\ValidationError: Found an Attribute element with duplicated Name in /xxxxxx/wp-conte
nt/plugins/onelogin-saml-sso/php/lib/Saml2/Response.php:819\nStack trace:\n#0 /xxxxxx/wp-content/plugins/onelogin-saml-sso/p
hp/lib/Saml2/Response.php(781): OneLogin\\Saml2\\Response->_getAttributesByKeyName()\n#1 /xxxxxx/wp-content/plugins/onelogin
-saml-sso/php/lib/Saml2/Auth.php(238): OneLogin\\Saml2\\Response->getAttributes()\n#2 /xxxxxx/wp-content/plugins/onelogin-sa
ml-sso/php/functions.php(251): OneLogin\\Saml2\\Auth->processResponse()\n#3 /xxxxxx/wp-content/plugins/onelogin-saml-sso/php
/functions.php(20): saml_acs()\n#4 /xxxxxx/wp-includes/class-wp-hook.php(308): saml_checker()\n#5 /home/login019/www.timetra
cking.eu/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()\n#6 

@f1-outsourcing
Copy link
Author

Normally I see in clientId this website-testing. However I mostly tested with oidc (last few days) so I probably do something wrong. Do you have some suggestions what I could check?

should be in Service Provider Entity Id

@f1-outsourcing
Copy link
Author

I have got it to work somehow by adding username to client scope mapper and entering these objectids[1].

I had to skip this error to continue.

817 if (in_array($attributeKeyName, array_keys($attributes))) {
818 if (!$allowRepeatAttributeName) {
819 //fix???
820 continue;
821 throw new ValidationError(
822 "Found an Attribute element with duplicated ".$keyName,
823 ValidationError::DUPLICATED_ATTRIBUTE_NAME_FOUND
824 );
825 }
826 }

The only problem I know have is I am redirected to home and not eg to wp-admin

[1]
https://github.com/catalyst/moodle-auth_saml2/blob/b622433b77e2df4b88e2cc2134d9f103f21ed171/.extlib/simplesamlphp/attributemap/name2oid.php#L59

@schuhwerk
Copy link
Member

Hi! I don't deserve credit for the plugin. It's just a fork of https://github.com/SAML-Toolkits/wordpress-saml (which fixes an issue: SAML-Toolkits/wordpress-saml#120). Maybe you can ask your question there? Good luck!

@f1-outsourcing
Copy link
Author

They did not accept your pull request?

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