<?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: Cisco ISE and Oracle DB integration. Fetch Attribute Function in Network Access Control</title>
    <link>https://community.cisco.com/t5/network-access-control/cisco-ise-and-oracle-db-integration-fetch-attribute-function/m-p/4834189#M581707</link>
    <description>&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;To retrieve the "framed-ip-address" attribute from the "USERS" table, you can modify the "SELECT" statement in the function as follows:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;FONT color="#008000"&gt;SELECT FRAMED_IP_ADDRESS as "framed-ip-address" FROM USERS WHERE USERNAME = ise_username;&lt;/FONT&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;This statement will select the "framed-ip-address" attribute from the "USERS" table where the "USERNAME" matches the "ise_username" parameter.&lt;BR /&gt;&lt;BR /&gt;You can then modify the "OPEN" statement to return the "resultSet" cursor with the "framed-ip-address" attribute as follows:&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&lt;FONT color="#008000"&gt;OPEN resultSet FOR SELECT FRAMED_IP_ADDRESS as "framed-ip-address" FROM USERS WHERE USERNAME = ise_username;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;The "c" variable can remain an integer as it is used to check if the username exists in the table.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;So the modified function would look something like this:&lt;BR /&gt;&lt;FONT color="#008000"&gt;CREATE OR REPLACE FUNCTION Retrieve_ATTRIBUTE (&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ise_username IN VARCHAR2,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ise_result OUT INT&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp;) RETURN SYS_REFCURSOR AS&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; resultSet SYS_REFCURSOR;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;BEGIN&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DECLARE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;c INTEGER;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BEGIN&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT COUNT(*) INTO c FROM USERS WHERE USERNAME = ise_username;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; IF c &amp;gt; 0 THEN&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ise_result := 0;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; OPEN resultSet FOR SELECT FRAMED_IP_ADDRESS as "framed-ip-address" FROM USERS WHERE USERNAME =&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ise_username;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ELSE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ise_result := 3;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;OPEN resultSet FOR SELECT 0 FROM dual WHERE 1 = 2;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;END IF;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;RETURN resultSet;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp;END;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;END;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;M.&lt;/P&gt;</description>
    <pubDate>Fri, 12 May 2023 08:49:14 GMT</pubDate>
    <dc:creator>Mark Elsen</dc:creator>
    <dc:date>2023-05-12T08:49:14Z</dc:date>
    <item>
      <title>Cisco ISE and Oracle DB integration. Fetch Attribute Function</title>
      <link>https://community.cisco.com/t5/network-access-control/cisco-ise-and-oracle-db-integration-fetch-attribute-function/m-p/4834045#M581706</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;
&lt;P&gt;I try to make external identity ODBC integration with Oracle and ISE. and we have a table like following. According to this table i need to get framed-ip-address as attribute for return to the atuhenticated users. how it should be fetch attribute function or procedure in oracle db.&amp;nbsp; How should i change example function on the ISE according to example table ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;table ;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="murat001_0-1683873342832.png" style="width: 400px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/184470i7249A71536A523F2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="murat001_0-1683873342832.png" alt="murat001_0-1683873342832.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Examle Fetch Atrribute.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;create or replace function &lt;STRONG&gt;Retrieve-ATTRIBUTE&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;(&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ise_username IN VARCHAR2,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;ise_result OUT int&lt;/P&gt;
&lt;P&gt;) return sys_refcursor as&lt;/P&gt;
&lt;P&gt;BEGIN&lt;/P&gt;
&lt;P&gt;&amp;nbsp; declare&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;c integer;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt; //&amp;nbsp; &amp;nbsp; &amp;nbsp;should the c variable be integer or different (like boolen etc.)&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/STRONG&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; resultSet SYS_REFCURSOR;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; begin&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select count(*) into c from USERS where USERS.USERNAME = ise_username;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;// according the&amp;nbsp; screenshot of example table is this line correct?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if c &amp;gt; 0 then&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ise_result := 0;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; open resultSet for select 'green' as 'eye_color', 1 as 'floor', 'true' as 'is_certified' from dual;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;//&amp;nbsp; how can i change this line for i can get framed-ip-address column as attribute ?&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ELSE&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ise_result := 3;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; open resultSet for select 0 from dual where 1=2;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; END IF;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return resultSet;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;
&lt;P&gt;END ;&lt;/P&gt;
&lt;P&gt;thanks for your help ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 06:52:36 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/cisco-ise-and-oracle-db-integration-fetch-attribute-function/m-p/4834045#M581706</guid>
      <dc:creator>murat001</dc:creator>
      <dc:date>2023-05-12T06:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco ISE and Oracle DB integration. Fetch Attribute Function</title>
      <link>https://community.cisco.com/t5/network-access-control/cisco-ise-and-oracle-db-integration-fetch-attribute-function/m-p/4834189#M581707</link>
      <description>&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;To retrieve the "framed-ip-address" attribute from the "USERS" table, you can modify the "SELECT" statement in the function as follows:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;FONT color="#008000"&gt;SELECT FRAMED_IP_ADDRESS as "framed-ip-address" FROM USERS WHERE USERNAME = ise_username;&lt;/FONT&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;This statement will select the "framed-ip-address" attribute from the "USERS" table where the "USERNAME" matches the "ise_username" parameter.&lt;BR /&gt;&lt;BR /&gt;You can then modify the "OPEN" statement to return the "resultSet" cursor with the "framed-ip-address" attribute as follows:&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&lt;FONT color="#008000"&gt;OPEN resultSet FOR SELECT FRAMED_IP_ADDRESS as "framed-ip-address" FROM USERS WHERE USERNAME = ise_username;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;The "c" variable can remain an integer as it is used to check if the username exists in the table.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;So the modified function would look something like this:&lt;BR /&gt;&lt;FONT color="#008000"&gt;CREATE OR REPLACE FUNCTION Retrieve_ATTRIBUTE (&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ise_username IN VARCHAR2,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ise_result OUT INT&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp;) RETURN SYS_REFCURSOR AS&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; resultSet SYS_REFCURSOR;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;BEGIN&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DECLARE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;c INTEGER;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BEGIN&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT COUNT(*) INTO c FROM USERS WHERE USERNAME = ise_username;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; IF c &amp;gt; 0 THEN&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ise_result := 0;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; OPEN resultSet FOR SELECT FRAMED_IP_ADDRESS as "framed-ip-address" FROM USERS WHERE USERNAME =&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ise_username;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ELSE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ise_result := 3;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;OPEN resultSet FOR SELECT 0 FROM dual WHERE 1 = 2;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;END IF;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;RETURN resultSet;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &amp;nbsp;END;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;END;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;M.&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 08:49:14 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/cisco-ise-and-oracle-db-integration-fetch-attribute-function/m-p/4834189#M581707</guid>
      <dc:creator>Mark Elsen</dc:creator>
      <dc:date>2023-05-12T08:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco ISE and Oracle DB integration. Fetch Attribute Function</title>
      <link>https://community.cisco.com/t5/network-access-control/cisco-ise-and-oracle-db-integration-fetch-attribute-function/m-p/4834222#M581708</link>
      <description>&lt;P&gt;Thanks you so much marce. i will try it. I really appreciated for your quick response.&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 09:13:46 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/cisco-ise-and-oracle-db-integration-fetch-attribute-function/m-p/4834222#M581708</guid>
      <dc:creator>murat001</dc:creator>
      <dc:date>2023-05-12T09:13:46Z</dc:date>
    </item>
  </channel>
</rss>

