<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Retrieving unique id for ICF security session in http handler? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-unique-id-for-icf-security-session-in-http-handler/m-p/11009615#M1897104</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P style="font-family: courier; color: black;"&gt;&lt;SPAN style="color: #0000ff;"&gt;data&lt;/SPAN&gt; ls_context &lt;SPAN style="color: #0000ff;"&gt;type&lt;/SPAN&gt; security_context&lt;SPAN style="color: #800080;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-family: courier; color: black;"&gt;&lt;/P&gt;
&lt;P style="font-family: courier; color: black;"&gt;&lt;SPAN style="color: #0000ff;"&gt;try&lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-family: courier; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;call&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;method&lt;/SPAN&gt; cl_http_security_session_admin=&lt;SPAN style="color: #800097;"&gt;&amp;gt;&lt;/SPAN&gt;get_current_session_context&lt;/P&gt;
&lt;P style="font-family: courier; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;receiving&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-family: courier; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;context&lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt; = &lt;/SPAN&gt;ls_context&lt;SPAN style="color: #800080;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-family: courier; color: black;"&gt;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;catch&lt;/SPAN&gt; cx_http_security_session_admin &lt;SPAN style="color: #800080;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-family: courier; color: black;"&gt;&lt;SPAN style="color: #0000ff;"&gt;endtry&lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Apr 2015 16:21:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2015-04-21T16:21:52Z</dc:date>
    <item>
      <title>Retrieving unique id for ICF security session in http handler?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-unique-id-for-icf-security-session-in-http-handler/m-p/11009614#M1897103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We're implementing a check in an http handler which should only be executed once for an ICF security session. &lt;/P&gt;&lt;P&gt;HTTP Security Session Management is activated in the system (ref &lt;A href="http://help.sap.com/saphelp_nw73ehp1/helpdata/en/bb/1bcf2122fd4a76948816b1342f20d7/content.htm" title="http://help.sap.com/saphelp_nw73ehp1/helpdata/en/bb/1bcf2122fd4a76948816b1342f20d7/content.htm"&gt;Activating HTTP Security Session Management on AS ABAP - User Authentication and Single Sign-On - SAP Library&lt;/A&gt; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We need to get a unique id for the security session so that we can store a value indication that the check has been performed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The HTTP handler where our code is running has as input an object implementing the IF_HTTP_SERVER interface (runtime class is CL_HTTP_SERVER_NET).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's our findings so far:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;The client sends a unique id in the cookie SAP_SESSIONID_&amp;lt;sid&amp;gt;_client , but this is not accessible in the HTTP handler.&lt;BR /&gt;(which is good due to security considerations)&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;CL_HTTP_SERVER_NET has the security session id in an attribute M_SECURITY_SESSION_COOKIE, but this is protected and therefore not accessible&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;IF_HTTP_SERVER has a session_id, but this changes on every request (the icf application is stateless and session_id here is not the ICF security session id)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Function module TH_GET_SESSION_ID has a session_id, but this changes on every request (so is not the ICF security session)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;The ICF security session is stored in table security_context. Here the field ID is a context id that has been converted from sessionid.It's therefore a unique id for the session id and fit for our purpose. However, there may theoretically be more than one session pr user.Is there a direct way of getting the current context id from the current session?&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any input?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Dagfinn&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2015 14:09:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-unique-id-for-icf-security-session-in-http-handler/m-p/11009614#M1897103</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-04-21T14:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving unique id for ICF security session in http handler?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-unique-id-for-icf-security-session-in-http-handler/m-p/11009615#M1897104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P style="font-family: courier; color: black;"&gt;&lt;SPAN style="color: #0000ff;"&gt;data&lt;/SPAN&gt; ls_context &lt;SPAN style="color: #0000ff;"&gt;type&lt;/SPAN&gt; security_context&lt;SPAN style="color: #800080;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-family: courier; color: black;"&gt;&lt;/P&gt;
&lt;P style="font-family: courier; color: black;"&gt;&lt;SPAN style="color: #0000ff;"&gt;try&lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-family: courier; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;call&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;method&lt;/SPAN&gt; cl_http_security_session_admin=&lt;SPAN style="color: #800097;"&gt;&amp;gt;&lt;/SPAN&gt;get_current_session_context&lt;/P&gt;
&lt;P style="font-family: courier; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;receiving&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-family: courier; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;context&lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt; = &lt;/SPAN&gt;ls_context&lt;SPAN style="color: #800080;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-family: courier; color: black;"&gt;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;catch&lt;/SPAN&gt; cx_http_security_session_admin &lt;SPAN style="color: #800080;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-family: courier; color: black;"&gt;&lt;SPAN style="color: #0000ff;"&gt;endtry&lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2015 16:21:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-unique-id-for-icf-security-session-in-http-handler/m-p/11009615#M1897104</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-04-21T16:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving unique id for ICF security session in http handler?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-unique-id-for-icf-security-session-in-http-handler/m-p/11009616#M1897105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This seems to be what we where looking for. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2015 18:11:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-unique-id-for-icf-security-session-in-http-handler/m-p/11009616#M1897105</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-04-21T18:11:26Z</dc:date>
    </item>
  </channel>
</rss>

