<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:10:32 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>[MDSAL-680] Node credential storage encryption</title>
                <link>https://jira.opendaylight.org/browse/MDSAL-680</link>
                <project id="10137" key="MDSAL">mdsal</project>
                    <description>&lt;p&gt;Dear colleague,&lt;/p&gt;

&lt;p&gt;I would like to understand the encryption mechanism to store node data (login password) stated in netconf-node-topology.yang file.&lt;/p&gt;

&lt;p&gt;In below section from netconf-node-topology.yang, I see that if login-pw is selected, login credentials are encrypted.&lt;/p&gt;

&lt;p&gt;case login-pw {&lt;/p&gt;

&lt;p&gt;&#160; &#160; &#160; &#160; &#160; description &quot;login-password credentials, encrypted.&quot;;&lt;/p&gt;

&lt;p&gt;&#160; &#160; &#160; &#160; &#160; container login-password &lt;/p&gt;
{

&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; uses username-password;

&#160; &#160; &#160; &#160; &#160; &#160;}

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;If a node creation request with below content returns &quot;200 OK&quot; does this guarantee that credentials are encrypted in persistent configuration datastore? Is there a way to verify that they are stored encrypted? If so, which encryption mechanism is used?&lt;/p&gt;

&lt;p&gt;request body:&lt;/p&gt;

&lt;p&gt;{&lt;/p&gt;

&lt;p&gt;&#160; &quot;node&quot;: {&lt;/p&gt;

&lt;p&gt;&#160; &#160; &#160; &#160; &#160; &#160; &#160;&quot;node-id&quot;: &quot;test&quot;,&lt;/p&gt;

&lt;p&gt;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;host&quot;: &quot;192.168.111.111&quot;,&lt;/p&gt;

&lt;p&gt;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;port&quot;: 2022,&lt;/p&gt;

&lt;p&gt;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;tcp-only&quot;: false,&lt;/p&gt;

&lt;p&gt;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;login-pw:login-password&quot; :&lt;/p&gt;
{

&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;&quot;username&quot;: &quot;admin&quot;,

&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;&quot;password&quot;: &quot;admin&quot;

&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; }

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

&lt;p&gt;}&lt;/p&gt;

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

&lt;p&gt;Thanks.&lt;/p&gt;</description>
                <environment></environment>
        <key id="34234">MDSAL-680</key>
            <summary>Node credential storage encryption</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="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="opanasiuk">Oleksandr Panasiuk</assignee>
                                    <reporter username="ercanklc">ercan-101@hotmail.com</reporter>
                        <labels>
                    </labels>
                <created>Tue, 27 Jul 2021 13:10:52 +0000</created>
                <updated>Thu, 13 Oct 2022 08:55:46 +0000</updated>
                            <resolved>Thu, 13 Oct 2022 08:55:46 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="70520" author="JIRAUSER14604" created="Sun, 6 Feb 2022 02:39:15 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

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

&lt;p&gt;I have the same concern, GET&#160;/restconf/config/network-topology:network-topology/topology/topology-netconf/node/&amp;lt;nodename&amp;gt; returns the password in clear text unencrypted.&lt;/p&gt;

&lt;p&gt;I tried a PUT request with&#160;netconf-node-topology:password and&#160;netconf-node-topology:login-password.&lt;/p&gt;

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

&lt;p&gt;Regards&lt;/p&gt;

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

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="71540" author="JIRAUSER15502" created="Wed, 12 Oct 2022 11:35:08 +0000"  >&lt;p&gt;From what i found, password encryption uses &lt;b&gt;AAAEncryptionService&lt;/b&gt; which firstly generates key from &lt;b&gt;aaa-encrypt-service-config.xml&lt;/b&gt; using &lt;b&gt;PBKDF2WithHmacSHA1&lt;/b&gt; encryption method and &lt;b&gt;AES&lt;/b&gt; encryption type. After that &lt;b&gt;AAAEncryptionService&lt;/b&gt; generates &lt;b&gt;javax.crypto.Cipher&lt;/b&gt; instance with specs from &lt;b&gt;aaa-encrypt-service-config.xml&lt;/b&gt; and previously generated key. Cipher is used to transform password byte array into String/byte[] encrypted by chosen method and type from key and after that, it is also encoded using &lt;b&gt;rfc4648/Base64&lt;/b&gt; algorithm. Also Cipher might not work if it is initialized in the wrong state which shouldn&apos;t be happening if &lt;b&gt;aaa-encrypt-service-config.xml&lt;/b&gt; is OK, but if that happens the &lt;b&gt;rfc4648/Base64&lt;/b&gt; is used anyway so the password is protected in some way. &lt;b&gt;AAAEncryptionService&lt;/b&gt; also generates decryption Cipher , it is used to return password in its unencrypted state after GET /restconf/config/network-topology:network-topology/topology/topology-netconf/node/&amp;lt;nodename&amp;gt; request.&#160;&lt;br/&gt;
Also there is a possibility that key might be initialized as null if &lt;b&gt;aaa-encrypt-service-config.xml&lt;/b&gt; is corrupted, in that case password will be stored with no encryption, no exceptions will be thrown and user will still get 200 OK response.&lt;br/&gt;
So under normal valid circumstances (when &lt;b&gt;aaa-encrypt-service-config.xml&lt;/b&gt;&#160; is ok) password will be stored encrypted.&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;&lt;/p&gt;</comment>
                            <comment id="71544" author="tibor.kral" created="Thu, 13 Oct 2022 08:54:55 +0000"  >&lt;p&gt;I believe Oleksandr&apos;s findings answered the question. Closing this issue.&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|i03z0f:</customfieldvalue>

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