You are not logged in.
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