Quantcast
Viewing all articles
Browse latest Browse all 3876

How can I process an SSO Logon Ticket in ColdFusion 9?

Hi,

 

We want to integrate some CouldFusion templates on the SAP portal and I try to process the SSO Logon Ticket using the following code:

 

<cfif IsDefined("Cookie.MYSAPSSO2") AND Cookie.MYSAPSSO2 neq "">

<cfscript>

    ticket = Cookie.MYSAPSSO2;

    sso = createObject("java", "SSO2Ticket");

    version = sso.getVersion();

    Application.CertPath = "/opt/coldfusion9/lib/verify.pse";

</cfscript>

 

<h2>Ticket cookie:</h2>

<cfdump var="#ticket#">

 

<h2>Version:</h2>

<cfdump var="#version#">

 

<h2>Certification path:</h2>

<cfdump var="#Application.CertPath#">

 

<cfscript>

    result = sso.evalLogonTicket (ticket, Application.CertPath,"");

    sapUser   = result[1]; //First element is the SAP system user

    sysID  = result[2]; //Second element is the id of the issuing system

    client = result[3]; //Third element is the client of the issuing system

    portalUser = result[5]; //Portal user

    validityInSeconds = result[7]; //Validity in seconds

</cfscript>

   

<h2>Ticket content:</h2>

<cfdump var="#result#">

 

<cfelse>

    SAP Logon Ticket not found - Extranet content can only be accessed through SAP Portal.   

</cfif>

 

The certificate verify.pse and the current version of the libraries libsapcrypto.so, libsapssoext.so and libslcryptokernel.so are stored at the same location.

After logging in into a SAP portal I get following error when executing the script:

 

Ticket cookie:

  AjExMDAgAAxwb3J0YWw6VG90aEyIABNiYXNpY2F1dGhlbnRpY2F0aW9uAQAFVE9USEwCAAMwMDADAANEUDIEAAwyMDE0MDYyNTEzNTMFAAQAAAAICgAFVE9USEz/AQUwggEBBgkqhkiG9w0BBwKggfMwgfACAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHATGB0DCBzQIBATAiMB0xDDAKBgNVBAMTA0RQMjENMAsGA1UECxMESjJFRQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTQwNjI1MTM1MzQ3WjAjBgkqhkiG9w0BCQQxFgQU2lImEL6oxLc/4ZdXYTDJudUNhOIwCQYHKoZIzjgEAwQvMC0CFQC4ftTFs8COV0ThRZH5lJxY9ITqfQIUMSugOMEkhmQHqBZD!ZHQ1Tb9e90= 

Version:

SAPSSOEXT 4 

Certification path:

/opt/coldfusion9/lib/verify.pse 

 

The web site you are accessing has experienced an unexpected error.
Please contact the website administrator. 

 

  

The following information is meant for the website developer for debugging purposes.
Error Occurred While Processing Request
  

MySapEvalLogonTicketEx failed: standard error= 9, ssf error= 0

 
  The error occurred in /opt/coldfusion9/wwwroot/ExtranetMod/authTest.cfm: line 20
  
18 : 19 : <cfscript> 20 : result = sso.evalLogonTicket (ticket, Application.CertPath,""); 21 :     sapUser   = result[1]; //First element is the SAP system user 22 :     sysID  = result[2]; //Second element is the id of the issuing system 

Resources:
Browser  Mozilla/5.0 (Windows NT 5.1; rv:30.0) Gecko/20100101 Firefox/30.0
Remote Address  172.20.231.111
Referrer 
Date/Time  25-Jun-14 04:23 PM
Stack Trace
at cfauthTest2ecfm1658987646.runPage(/opt/coldfusion9/wwwroot/ExtranetMod/authTest.cfm:20)

java.lang.Exception: MySapEvalLogonTicketEx failed: standard error= 9, ssf error= 0 at SSO2Ticket.evalLogonTicket(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at coldfusion.runtime.java.JavaProxy.invoke(JavaProxy.java:97) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360) at cfauthTest2ecfm1658987646.runPage(/opt/coldfusion9/wwwroot/ExtranetMod/authTest.cfm:20) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416) at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:360) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:94) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62) at coldfusion.CfmServlet.service(CfmServlet.java:200) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at jrun.servlet.FilterChain.service(FilterChain.java:101) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) 

 

I would be most thankful for any hints that could bring me further...

 

Many thanks

Lajos


Viewing all articles
Browse latest Browse all 3876

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>