<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:16:27 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>[NETCONF-1010] Optimize DefaultNetconfKeystoreAdapter</title>
                <link>https://jira.opendaylight.org/browse/NETCONF-1010</link>
                <project id="10142" key="NETCONF">netconf</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/browse/NETCONF-1006&quot; title=&quot;Rename sal-netconf-connector to netconf-client-mdsal&quot; class=&quot;issue-link&quot; data-issue-key=&quot;NETCONF-1006&quot;&gt;&lt;del&gt;NETCONF-1006&lt;/del&gt;&lt;/a&gt; has split the API and implementation of NetconfKeystoreAdapter. Looking at the reference implementation, there is a metric ton of implementation we can make.&lt;/p&gt;

&lt;p&gt;Since this class lies in the critical path for establishing NETCONF device connections, we need to heavily favour the read path (i.e. the device connecting) vs. the update path (i.e. the configuration changing).&lt;/p&gt;

&lt;p&gt;The first, and foremost, highlighted by &lt;a href=&quot;https://jira.opendaylight.org/browse/NETCONF-1006&quot; title=&quot;Rename sal-netconf-connector to netconf-client-mdsal&quot; class=&quot;issue-link&quot; data-issue-key=&quot;NETCONF-1006&quot;&gt;&lt;del&gt;NETCONF-1006&lt;/del&gt;&lt;/a&gt; which uses as single instance, is the fact internal state uses Collections.synchronizedMap() &amp;#8211; which means that all concurrent accesses get synchronized on three locks. This is quite wasteful, as the maps are typically not being modified. This needs to be solved by encapsulating internal state into an immutable object which is accessed in the read path. The update path updates this object in an atomic manner &amp;#8211; i.e. it builds up the new state and propagates it via a volatile update. Since we have Java 11+, this really means we should use &lt;a href=&quot;https://gee.cs.oswego.edu/dl/html/j9mm.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Java 9 Memory Model&lt;/a&gt; getAcquire/setRelease semantics to minimize global serialization.&lt;/p&gt;

&lt;p&gt;The second set of improvements is in getJavaKeyStore(), which impacts SslHandlerFactoryImpl &amp;#8211; which is a number of things:&lt;/p&gt;

&lt;p&gt;Here the update path should filter private keys which do not have a certificate chain, so that we can safely use requireCertificateChain() and get rid of a source of exceptions.&lt;/p&gt;

&lt;p&gt;Also, getCertificateChain() should do its best to avoid the call to CertificateFactory.getInstance(&quot;X.509&quot;) and reuse a single factory if it is known to be thread-safe. Otherwise we should degrate to something which is reasonable (given we know there is a Netty thread pool servicing these requests).&lt;/p&gt;

&lt;p&gt;Next up there is getJavaPrivateKey(), which guesses what factory to use, trying RSA and DSA, each time acquiring KeyFactory.getInstance(). At the end of the day we should be smart about these and probably make the decision in the configuration update path to bind the proper factory &amp;#8211; and share it if it is thread-safe.&lt;/p&gt;

&lt;p&gt;And finally, there is KeyStore.getInstance() calls with &quot;JKS&quot;. The question here is two-fold: can we use a better keystore and can we manage instantiation better given that we really are providing an immutable view, which is populated with well-known values?&lt;/p&gt;</description>
                <environment></environment>
        <key id="36903">NETCONF-1010</key>
            <summary>Optimize DefaultNetconfKeystoreAdapter</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</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="rovarga">Robert Varga</assignee>
                                    <reporter username="rovarga">Robert Varga</reporter>
                        <labels>
                            <label>pt</label>
                    </labels>
                <created>Wed, 3 May 2023 19:49:05 +0000</created>
                <updated>Thu, 4 May 2023 21:39:20 +0000</updated>
                            <resolved>Thu, 4 May 2023 21:39:20 +0000</resolved>
                                                    <fixVersion>6.0.0</fixVersion>
                                    <component>netconf</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                    <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                                                <inwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="36851">NETCONF-1006</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <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|i044z3:</customfieldvalue>

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