Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

ShibbolethAuthLimeSurvey plugin authentication is not working correctly

  • mberva
  • mberva's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 7 months ago - 1 year 7 months ago #243282 by mberva
Hi,
I installed the ShibbolethAuthLimeSurvey plugin but after successfully requesting and entering the credentials (our idp interface), limesurvey asks again for authentication showing the Authdb interfacethe.

apache conf is:
<Location /limesurveyDEV>
AuthType shibboleth
ShibRequireSession On
require valid-user
</Location>

ShibbolethAuthLimeSurvey setting is:
Shibboleth attribute of User ID = sAMAccountName
Shibboleth attribute of User first name = givenName
Shibboleth attribute of User surname = sn
Shibboleth attribute of User email address = mail

limesurvey ver 6.0.6
What am I doing wrong?Thank you in advance!
Last edit: 1 year 7 months ago by mberva.

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 7 months ago #243342 by holch
Do you have a link where you got the plugin from?

I found at least 2 different Shibboleth plugins, just to make sure which one is which.

However, I think none of these plugins is officially from Limesurvey, so it is probably best to get in touch with the respective developer.

github.com/leandrobhbr/ShibbolethAuthLimeSurvey/
This one for example says LS4+, but hasn't received any update since 2020. We now have LS5 and 6 so it might be a problem with the new versions. Just because the developer says LS4+ doesn't mean that it will work with any future release.

github.com/atlet/LimeSurvey-ShibbolethAuth

This one says LS 3.4+, so it might be the same issue.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 7 months ago #243343 by holch
Maybe this helps? No idea, but worth a shot.

forums.limesurvey.org/forum/plugins/1280...oleth-authentication

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

  • mberva
  • mberva's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 7 months ago #243355 by mberva
My plugin is github.com/leandrobhbr/ShibbolethAuthLimeSurvey/

I kept to tested and I discovered that the problem is given by the "username" attribute... If I setting the attribute name to sAMAccountName (as it should be) doesn't work. But if you set the attribute name to mail value the problem is solved.
Is it as if the plugin doesn't know sAMAccountName ?

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
1 year 7 months ago #243358 by DenisChenu
You mean you update the plugin to add 6.X compatibility , but don't create a pull request ?

Else : did you try samacountname : i have a Auth plugin with windows where need to use lowcase.

Windows think LowCase === lowcase … it's false in PHP

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.

Please Log in to join the conversation.

  • mberva
  • mberva's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 7 months ago #243526 by mberva
I don't know how to create a pull request.

I would like to modify the code like this

....
....
// If is set "autocreateuser" in page admin settings - option then create the new user
if($this->get('autocreateuser',null,null,$this->settings))
{
$this->setUsername($sUser);
$this->displayName = $_SERVER[$authusergivenName].' '.$_SERVER[$authusergivenSurname];
$this->mail = ($_SERVER[$mailattribute] && $_SERVER[$mailattribute] != '') ? $_SERVER[$mailattribute] : 'noreply@my.example.com';
$this->setAuthPlugin(); // This plugin handles authentication, halt further execution of auth plugins
}
elseif($this->get('is_default',null,null,$this->settings))
{
throw new CHttpException(401,'Wrong credentials for LimeSurvey administration: "' . $sUser . '".');
}

MY ENTRY
else {
$this->setUsername($sUser);
$this->displayName = $_SERVER[$authusergivenName].' '.$_SERVER[$authusergivenSurname];
$this->mail = ($_SERVER[$mailattribute] && $_SERVER[$mailattribute] != '') ? $_SERVER[$mailattribute] : 'noreply@my.example.com';
$this->setAuthPlugin(); // This plugin handles authentication, halt further execution of auth plugins
}

...
...

And in config.xml:
....
....
<compatibility>
<version>4.0</version>
<version>5.0</version>
<version>6.0</version>
</compatibility>

....

what should I do?

Please Log in to join the conversation.

Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose