<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:09:03 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[AAA-256] Authorization Header is ignored when cookie is present</title>
                <link>https://jira.opendaylight.org/browse/AAA-256</link>
                <project id="10102" key="AAA">aaa</project>
                    <description>&lt;ol&gt;
	&lt;li&gt;Used netconf-5.0.3 that ships aaa (0.17.6) release.&lt;/li&gt;
	&lt;li&gt;Issued a get to netconf-toplogy as follows&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;&#160; &#160;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
curl -v --location &lt;span class=&quot;code-quote&quot;&gt;&apos;http:&lt;span class=&quot;code-comment&quot;&gt;//172.17.0.2:8181/rests/data/network-topology:network-topology/topology=topology-netconf&apos;&lt;/span&gt; &#160; --user &lt;span class=&quot;code-quote&quot;&gt;&apos;admin:admin&apos;&lt;/span&gt;
&lt;/span&gt;* &#160; Trying 172.17.0.2...
* TCP_NODELAY set
* Connected to 172.17.0.2 (172.17.0.2) port 8181 (#0)
* Server auth using Basic with user &lt;span class=&quot;code-quote&quot;&gt;&apos;admin&apos;&lt;/span&gt;
&amp;gt; GET /rests/data/network-topology:network-topology/topology=topology-netconf HTTP/1.1
&amp;gt; Host: 172.17.0.2:8181
&amp;gt; Authorization: Basic YWRtaW46YWRtaW4=
&amp;gt; User-Agent: curl/7.58.0
&amp;gt; Accept: */*
&amp;gt;&#160;
&amp;lt; HTTP/1.1 200 OK
&amp;lt; Set-Cookie: JSESSIONID=node018vko67sr5ocytgqohuqzb11z0.node0; Path=/rests; HttpOnly
&amp;lt; Expires: Thu, 01 Jan 1970 00:00:00 GMT
&amp;lt; Set-Cookie: rememberMe=deleteMe; Path=/rests; Max-Age=0; Expires=Mon, 20-Mar-2023 04:55:46 GMT; SameSite=lax
&amp;lt; ETag: &lt;span class=&quot;code-quote&quot;&gt;&quot;2013-10-21-topology&quot;&lt;/span&gt;
&amp;lt; Last-Modified: 2023-Mar-21 04:55:46
&amp;lt; Content-Type: application/yang-data+json
&amp;lt; Content-Length: 66
&amp;lt;&#160;
* Connection #0 to host 172.17.0.2 left intact
{&lt;span class=&quot;code-quote&quot;&gt;&quot;network-topology:topology&quot;&lt;/span&gt;:[{&lt;span class=&quot;code-quote&quot;&gt;&quot;topology-id&quot;&lt;/span&gt;:&lt;span class=&quot;code-quote&quot;&gt;&quot;topology-netconf&quot;&lt;/span&gt;}]} &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;3. In the following request, used the same sesion cookie with wrong username/pass.&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&#160;curl -v --location &lt;span class=&quot;code-quote&quot;&gt;&apos;http:&lt;span class=&quot;code-comment&quot;&gt;//172.17.0.2:8181/rests/data/network-topology:network-topology/topology=topology-netconf&apos;&lt;/span&gt; &#160;--header &lt;span class=&quot;code-quote&quot;&gt;&apos;Cookie: JSESSIONID=node018vko67sr5ocytgqohuqzb11z0.node0&apos;&lt;/span&gt; --user &lt;span class=&quot;code-quote&quot;&gt;&apos;admin23:56789&apos;&lt;/span&gt;
&lt;/span&gt;* &#160; Trying 172.17.0.2...
* TCP_NODELAY set
* Connected to 172.17.0.2 (172.17.0.2) port 8181 (#0)
* Server auth using Basic with user &lt;span class=&quot;code-quote&quot;&gt;&apos;admin23&apos;&lt;/span&gt;
&amp;gt; GET /rests/data/network-topology:network-topology/topology=topology-netconf HTTP/1.1
&amp;gt; Host: 172.17.0.2:8181
&amp;gt; Authorization: Basic YWRtaW4yMzo1Njc4OQ==
&amp;gt; User-Agent: curl/7.58.0
&amp;gt; Accept: */*
&amp;gt; Cookie: JSESSIONID=node018vko67sr5ocytgqohuqzb11z0.node0
&amp;gt;&#160;
&amp;lt; HTTP/1.1 200 OK
&amp;lt; ETag: &lt;span class=&quot;code-quote&quot;&gt;&quot;2013-10-21-topology&quot;&lt;/span&gt;
&amp;lt; Last-Modified: 2023-Mar-21 05:06:10
&amp;lt; Content-Type: application/yang-data+json
&amp;lt; Content-Length: 66
&amp;lt;&#160;
* Connection #0 to host 172.17.0.2 left intact
{&lt;span class=&quot;code-quote&quot;&gt;&quot;network-topology:topology&quot;&lt;/span&gt;:[{&lt;span class=&quot;code-quote&quot;&gt;&quot;topology-id&quot;&lt;/span&gt;:&lt;span class=&quot;code-quote&quot;&gt;&quot;topology-netconf&quot;&lt;/span&gt;}]} &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;The GET response was returned. The authorization information was ignored.&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;The same issue occurs in earlier versions of AAA also.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="36750">AAA-256</key>
            <summary>Authorization Header is ignored when cookie is present</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.opendaylight.org/images/icons/priorities/major.svg">Medium</priority>
                        <status id="10001" iconUrl="https://jira.opendaylight.org/" description="">In Review</status>
                    <statusCategory id="4" key="indeterminate" colorName="yellow"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="gvrangan">Venkatrangan Govindarajan</assignee>
                                    <reporter username="gvrangan">Venkatrangan Govindarajan</reporter>
                        <labels>
                    </labels>
                <created>Tue, 21 Mar 2023 05:07:02 +0000</created>
                <updated>Mon, 17 Apr 2023 07:42:38 +0000</updated>
                                                                            <component>General</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="72064" author="gvrangan" created="Tue, 21 Mar 2023 05:09:27 +0000"  >&lt;p&gt;Solution: As a immediate fix for scenarios that do not require a cookie, the cookies can be disabled.&#160;&lt;/p&gt;

&lt;p&gt;But, the reasons why apche shiro ws not handling over the request to ODL Auth realm needs some investigtion.&lt;/p&gt;</comment>
                            <comment id="72066" author="ivanhrasko" created="Tue, 21 Mar 2023 09:28:31 +0000"  >&lt;p&gt;Can you cite any RFC which claims this is incorrect behaviour?&lt;/p&gt;</comment>
                            <comment id="72100" author="rovarga" created="Mon, 27 Mar 2023 07:59:41 +0000"  >&lt;p&gt;I do not believe this is an issue: the session cookie is given out after authentication &amp;#8211; i.e. as long as the correct cookie is provided, there is no need for additional authentication.&lt;/p&gt;</comment>
                            <comment id="72102" author="gvrangan" created="Tue, 28 Mar 2023 06:58:21 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=rovarga&quot; class=&quot;user-hover&quot; rel=&quot;rovarga&quot;&gt;rovarga&lt;/a&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;There is definitely a regression here..&lt;/p&gt;

&lt;p&gt;Test with NEtconf-4.0.2 (aaa-0.16.3)&lt;/p&gt;

&lt;p&gt;first success!!&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;curl --location &lt;span class=&quot;code-quote&quot;&gt;&apos;http:&lt;span class=&quot;code-comment&quot;&gt;//172.17.0.2:8181/rests/data/network-topology:network-topology/topology=topology-netconf&apos;&lt;/span&gt; \--header &lt;span class=&quot;code-quote&quot;&gt;&apos;Authorization: Basic YWRtaW46YWRtaW4=&apos;&lt;/span&gt; \--header &lt;span class=&quot;code-quote&quot;&gt;&apos;Cookie: JSESSIONID=node0scnxu4aqszbihc9p3ez72zlb3.id.node0&apos;&lt;/span&gt;
&lt;/span&gt;

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Used the same cookie and modified the authorization header....&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;curl --location &lt;span class=&quot;code-quote&quot;&gt;&apos;http:&lt;span class=&quot;code-comment&quot;&gt;//172.17.0.2:8181/rests/data/network-topology:network-topology/topology=topology-netconf&apos;&lt;/span&gt; \--header &lt;span class=&quot;code-quote&quot;&gt;&apos;Authorization: Basic YWRtaW44ODphZG1pbg==&apos;&lt;/span&gt; \--header &lt;span class=&quot;code-quote&quot;&gt;&apos;Cookie: JSESSIONID=node0scnxu4aqszbihc9p3ez72zlb3.id.node0&apos;&lt;/span&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;Buteven this behavior is not consistent, when the requst is repeated, the wrong authorization header is sometimes allowed!!&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Test with netconf-5.0.4 (aaa-0.17.7)&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Success trial&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;curl --location &lt;span class=&quot;code-quote&quot;&gt;&apos;http:&lt;span class=&quot;code-comment&quot;&gt;//172.17.0.2:8181/rests/data/network-topology:network-topology/topology=topology-netconf&apos;&lt;/span&gt; \--header &lt;span class=&quot;code-quote&quot;&gt;&apos;Authorization: Basic YWRtaW46YWRtaW4=&apos;&lt;/span&gt; \--header &lt;span class=&quot;code-quote&quot;&gt;&apos;Cookie: JSESSIONID=node0lprudepcks8ck1w4nv5uiqlm0.node0&apos;&lt;/span&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Changed authorization header,&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;curl --location &lt;span class=&quot;code-quote&quot;&gt;&apos;http:&lt;span class=&quot;code-comment&quot;&gt;//172.17.0.2:8181/rests/data/network-topology:network-topology/topology=topology-netconf&apos;&lt;/span&gt; \--header &lt;span class=&quot;code-quote&quot;&gt;&apos;Authorization: Basic YWRtaW44ODphZG1pbg==&apos;&lt;/span&gt; \--header &lt;span class=&quot;code-quote&quot;&gt;&apos;Cookie: JSESSIONID=node0lprudepcks8ck1w4nv5uiqlm0.node0&apos;&lt;/span&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;still it succeeeded.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;There is a inconsistancy here, Also not all requests are handed to the realms for validating. We need to check the Shiro settings and ensure the behavior is the same.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i044lj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>