-
Notifications
You must be signed in to change notification settings - Fork 12
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
User login loops in WP 5.5 multisite #69
Comments
It looks like you're getting the wrong .htaccess directives. Can you make sure you have the latest plugin installed? It should look something like this:
|
Thank you. I just updated the .htaccess file with the code you have provided. I have the latest plugin installed. After the update, it is still looping. |
My first guess would be that the Shibboleth attributes might not be using the right mapping. You can sometimes get a list of the attributes from https://comdev.org.ohio-state.edu/Shibboleth.sso/Session (you may need to log in first via https://comdev.org.ohio-state.edu/Shibboleth.sso/Login ) |
You may also want to create a small test file to make sure PHP has access to the attribute like: <?php
echo "<pre>
eppn: {$_SERVER['eppn']}
REMOTE_USER: {$_SERVER['REMOTE_USER']}
</pre>"; If that doesn't give you anything, then you might need to be DANGERous for a couple seconds just to figure out what the name is supposed to be: <?php
echo "<pre>";
var_dump($_SERVER);
echo "</pre>"; Definitely delete that after you run it. |
Thank you~ I did the https://comdev.org.ohio-state.edu/Shibboleth.sso/Session you suggested and here is the output.
|
Thank you @jrchamp. I am so sorry if it was obvious but I wanted to make sure. To make the test file like you have suggested. Do I just create a test.php file with the code you have suggested below and put it in the main theme folder to see if it generates output?
|
Yes, that should work. If you end up using the dangerous option, use a filename that only you know, because there is sometimes private information in $_SERVER. |
eppn looks to be the right attribute for your environment if you are using scoped usernames (recommended). If you are using unscoped usernames, I'm not sure which value you would use, because the documentation makes OSUID seem like an employee number and not a username. |
Thank you @jrchamp. I just did the test file and here's what it returned.
|
What is username attribute set to in the Shibboleth plugin configuration? |
It is set to "eppn" and Managed.
|
Alright, please send me a note at michael (at) michaelryanmcneill (dot) com with temporary credentials and I'll take a look at it. Can you also provide local WordPress credentials and install the Query Monitor plugin so I can review the configuration? |
Thank you Michael, should I set you up with super admin for the network so you can see the Shib settings?
|
Yes please. |
Thank you @michaelryanmcneill ! Thank you a ton! |
So, just some quick information: I'm going to have to dig into this more tomorrow, but I'll see what I can do to help. |
Thank you @michaelryanmcneill Yes, you are correct about it working for the main site. It only does the looping on the multisite under it. Really appreciate you looking into this! |
@michaelryanmcneill One thing to check is if automatic account provisioning is enabled. It might be related to that issue we were seeing before where the subsite was not creating the account. Maybe #54 |
I thought that too @jrchamp but turns out that is not it. After some additional debugging the issue is that |
Thank you @michaelryanmcneill I am reaching out to OSU and see if I can forward your request to the person in charge of Shibboleth there. |
That would be me - I'm the web admin. Hopefully this will reopen this issue. I'm not sure there's much we can do on our end. REDIRECT_ is painfully undocumented but a good explanation can be found here: https://stackoverflow.com/questions/3050444/when-setting-environment-variables-in-apache-rewriterule-directives-what-causes We don't run the URLs through any mod_rewrite rules before it gets to the custom ones in their .htaccess file. You may try looking for clues in the .htaccess file in the top-level directory, though - something there might be causing a rewrite event. It also looks like multiple rewrite events can create multiple levels of REDIRECT_ in front of the variable names. Rather than just looking for one or the other you may be better off regex matching. (i.e. looking for '(REDIRECT_)*VARNAME' instead of VARNAME xor REDIRECT_VARNAME) |
On 2nd thought, if you do search for multiple variants, make sure you prioritize so someone can't override their proper eppn with another one and hijack the account. |
@eshicks4 thanks for the follow-up. We did implement a fix that does solve this problem. I've never seen a |
Hello, I am reopening the issue I had posted before.
This time, I wiped everything and started from scratch. Installed WP 5.5, setup multisite. Created a single multisite to test. No custom theme nor other plugins running besides Shib 2.2.2. Shib was installed using the WP Add New Plugin interface, so everything was setup automatically.
https://comdev.org.ohio-state.edu/test1/ is the site in question.
I can provide login info privately through email for you to troubleshoot if you wish to see the behavior of the looping.
Below is what is in the .htaccess file currently:
The text was updated successfully, but these errors were encountered: