You are not logged in.
Dear users of this forum,
we are pleased to inform you that we will be updating the software behind this forum in the near future.
Existing posts, users and categories will remain untouched.
Important:
We will keep you informed in the pinned thread.
Kind regards,
Your ReportServer Team
Liebe Nutzer dieses Forums,
wir freuen uns, euch mitteilen zu können, dass wir in naher Zukunft die Software hinter diesem Forum aktualisieren werden.
Existierende Beiträge, Nutzer und Kategorien bleiben weiterhin bestehen!
Wichtig:
Wir halten euch im angepinnten Beitrag auf dem Laufenden!
Mit vielen Grüßen
Euer ReportServer Team
Hi,
I am trying to set up an SSO integration and attempted with a very simple script to test it out. However, the following script does not seem to read parameters passed in URL.
The URL I am using to access report server is this: http://localhost:8080/?ssouser=root
Please note that the script works fine if I directly pass the username as string
The code in my script is this:
import net.datenwerke.security.service.authenticator.ReportServerPAM;
import net.datenwerke.rs.authenticator.client.login.dto.UserPasswordAuthToken;
import net.datenwerke.security.service.authenticator.AuthenticationResult;
import net.datenwerke.security.service.usermanager.UserManagerService;
import net.datenwerke.security.service.authenticator.hooks.PAMHook;
import net.datenwerke.security.service.authenticator.hooks.adapter.PAMHookAdapter;
import javax.servlet.http.HttpServletRequest;def userService = GLOBALS.getInstance(UserManagerService.class);
def requestProvider = GLOBALS.getProvider(HttpServletRequest.class);
HttpServletRequest req = requestProvider.get();
def ssouser = req.getParameter('ssouser');/* the below line works, but not the above dynamic variable */
/* def ssouser = "root" */def customPAM = [
authenticate : { tokens ->
return new AuthenticationResult(true, userService.getUserByName(ssouser)); // login the root
},
getClientModuleName : { return "net.datenwerke.rs.authenticator.client.login.pam.UserPasswordClientPAM"; }
] as ReportServerPAM;def callback = [
afterStaticPamConfig : {pams ->
pams.clear();
pams.add(customPAM);
}
] as PAMHookAdapter;GLOBALS.services.callbackRegistry.attachHook("MY_CUSTOM_AUTHENTICATOR", PAMHook.class, callback);
Any help is greatly appreciated. Thanks
Offline
Hi sateesh.nvl,
I'm afraid url parameters are not available with PAM scripts, as explained here: https://forum.reportserver.net/viewtopic.php?id=297, #7.
Could you use an approach similar as the one stated in #7 ? It should work using redirection.
Best regards,
Eduardo
Offline