<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:36:01 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>[OVSDB-296] TLS connectivity support between ovsdb and controller is missing in the southbound plugin.</title>
                <link>https://jira.opendaylight.org/browse/OVSDB-296</link>
                <project id="10158" key="OVSDB">ovsdb</project>
                    <description>&lt;p&gt;In the OvsdbConnectionService class, the TLS connectivity is not enabled for the ovsdb channel at port 6640. The SSLContext needs to be initialized with the parameters from the keystore files like the way it was implemented for openflow channel and the tcp/ssl option needs to be handled appropriately.&lt;/p&gt;


&lt;p&gt;   /**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;OVSDB Passive listening thread that uses Netty ServerBootstrap to open&lt;/li&gt;
	&lt;li&gt;passive connection handle channel callbacks.&lt;br/&gt;
     */&lt;br/&gt;
    private static void ovsdbManager(int port) 
{
        ovsdbManagerWithSsl(port, null /* SslContext */);
    }&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;    /**&lt;/p&gt;

&lt;p&gt;Srinivasa Rao Tagirisa&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="21988">OVSDB-296</key>
            <summary>TLS connectivity support between ovsdb and controller is missing in the southbound plugin.</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</type>
                                                <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="serngawy">Mohamed ElSerngawy</assignee>
                                    <reporter username="srinivasa@wildfire.exchange">srinivasa rao tagirisa</reporter>
                        <labels>
                    </labels>
                <created>Wed, 10 Feb 2016 20:57:23 +0000</created>
                <updated>Mon, 30 Oct 2017 19:52:44 +0000</updated>
                            <resolved>Fri, 3 Feb 2017 00:57:15 +0000</resolved>
                                    <version>unspecified</version>
                                                    <component>Southbound.Open_vSwitch</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="41291" author="shague@redhat.com" created="Wed, 10 Feb 2016 23:39:58 +0000"  >&lt;p&gt;Srini, when you say southbound plugin you mean the Southbound that uses the OVSDB library right?&lt;/p&gt;

&lt;p&gt;What is the expected use case? This would help come up with how we update the models to enable the support.&lt;/p&gt;</comment>
                            <comment id="41292" author="srinivasa@wildfire.exchange" created="Thu, 11 Feb 2016 01:01:21 +0000"  >&lt;p&gt;Hi Sam,&lt;/p&gt;

&lt;p&gt;You are correct. I am referring to southbound plugin. Potentially, we may have these ovs enabled switches in the public domain.The use case is that we would like to prevent rogue controller from connecting to our switch and vice versa. Therefore, we would like to enable TLS/SSL for the ovsdb channel. The openflow plugin supports SSL/TLS. I see that the southbound plugin has the API implementation to start a TLS based server. What is missing is the SSLContext initialization and the related configuration support from what I understand.&lt;/p&gt;

&lt;p&gt;Pls let me know if you need more info.&lt;/p&gt;

&lt;p&gt;thx,&lt;br/&gt;
Srini.&lt;/p&gt;</comment>
                            <comment id="41293" author="srinivasa@wildfire.exchange" created="Tue, 16 Feb 2016 18:52:47 +0000"  >&lt;p&gt;Hi Sam &amp;amp; Anil,&lt;/p&gt;

&lt;p&gt;I kind of implemented the SSL feature for ovsdb. Currently, OVSDB port information is hard coded in SouthboundConstants.java file; however, I would like to make certificate files path configurable and like to read from the config file - &quot;custom.properties&quot;. There was an implementation in the plugin module which seem to read config information from custom.properties file. Do you have any suggestions on any particular preference ?&lt;/p&gt;

&lt;p&gt;thx,&lt;br/&gt;
Srini&lt;/p&gt;</comment>
                            <comment id="41294" author="shague@redhat.com" created="Tue, 16 Feb 2016 19:18:37 +0000"  >&lt;p&gt;Srinivasa,&lt;/p&gt;

&lt;p&gt;look at the utils.config bundle and there are methods for reading the custom.properties file.&lt;/p&gt;

&lt;p&gt;There is also the typical config subsystem xml files that can be used.&lt;/p&gt;

&lt;p&gt;We need to work through which file we want to use going forward. custom.properties was the older method and config subsystem is newer. Using config lets us use RESTCONF to change the config though so it is an advantage.&lt;/p&gt;

&lt;p&gt;I would like to know though if we need that config in the Southbound. Is there a certificate or authentication bundle in ODL that has a mechanism for adding certificates? Anil, any idea if AAA does this? I will add Ryan to this bug to see if he has some pointers.&lt;/p&gt;</comment>
                            <comment id="41295" author="vishnoianil@gmail.com" created="Tue, 16 Feb 2016 20:43:49 +0000"  >&lt;p&gt;AAA is more over for north bound authentication and it does not really get into southbound device management. But having a centralize place where we can put controller related certificates is probably a good idea. Ryan any thoughts ?&lt;/p&gt;</comment>
                            <comment id="41296" author="srinivasa@wildfire.exchange" created="Thu, 18 Feb 2016 18:14:47 +0000"  >&lt;p&gt;Hi Sam,&lt;/p&gt;

&lt;p&gt;The custom.properties and system.properties contents are getting overwritten every time I make a new build. For example, I would like to make the path of the custom.properties and certificate files configurable. What are the options I have ? I can probably set system properties in pom.xml file or a command line arg.&lt;/p&gt;

&lt;p&gt;thx,&lt;br/&gt;
Srini.&lt;/p&gt;</comment>
                            <comment id="41297" author="srinivasa@wildfire.exchange" created="Thu, 18 Feb 2016 18:36:50 +0000"  >&lt;p&gt;Hi Sam,&lt;/p&gt;

&lt;p&gt;Here are the code changes that work. Ideally, I would like to use the ConfigProperties.java or the other config subsystem you were referring to.&lt;/p&gt;

&lt;p&gt;diff --git a/library/impl/src/main/java/org/opendaylight/ovsdb/lib/impl/OvsdbConnectionService.java b/library/impl/src/main/java/org/opendaylight/ovsdb/lib/impl/OvsdbConnectio&lt;br/&gt;
index 98ad086..7dfff76 100644&lt;br/&gt;
&amp;#8212; a/library/impl/src/main/java/org/opendaylight/ovsdb/lib/impl/OvsdbConnectionService.java&lt;br/&gt;
+++ b/library/impl/src/main/java/org/opendaylight/ovsdb/lib/impl/OvsdbConnectionService.java&lt;br/&gt;
@@ -29,6 +29,13 @@ import io.netty.handler.ssl.SslHandler;&lt;br/&gt;
 import javax.net.ssl.SSLContext;&lt;br/&gt;
 import javax.net.ssl.SSLEngine;&lt;br/&gt;
 import javax.net.ssl.SSLEngineResult.HandshakeStatus;&lt;br/&gt;
+import java.io.FileInputStream;&lt;br/&gt;
+import java.security.KeyStore;&lt;br/&gt;
+import javax.net.ssl.KeyManagerFactory;&lt;br/&gt;
+import javax.net.ssl.TrustManagerFactory;&lt;br/&gt;
+import java.util.Properties;&lt;/p&gt;


&lt;p&gt; import java.net.InetAddress;&lt;br/&gt;
 import java.util.Arrays;&lt;br/&gt;
@@ -92,6 +99,61 @@ public class OvsdbConnectionService implements AutoCloseable, OvsdbConnection {&lt;br/&gt;
     }&lt;br/&gt;
     @Override&lt;br/&gt;
     public OvsdbClient connect(final InetAddress address, final int port) {&lt;br/&gt;
+        // PLUME&lt;br/&gt;
+        LOG.info(&quot;Custom Properties&quot; + System.getProperty(&quot;custom.properties&quot;));&lt;br/&gt;
+        // set up new properties object&lt;br/&gt;
+        // from file &quot;myProperties.txt&quot;&lt;br/&gt;
+        try &lt;/p&gt;
{
+            FileInputStream propFile = new FileInputStream(System.getProperty(&quot;custom.properties&quot;));
+            Properties p = new Properties(System.getProperties());
+            p.load(propFile);
+           // set the system properties
+            System.setProperties(p);
+
+        } catch (Exception ee) {
+                LOG.warn(&quot; custom properties open failed&quot;, ee);
+        }&lt;br/&gt;
+&lt;br/&gt;
+        // display new properties&lt;br/&gt;
+        String secureChannel = System.getProperty(&quot;secureChannelEnabled&quot;);&lt;br/&gt;
+        String controllerKeyStore = System.getProperty(&quot;controllerKeyStore&quot;);&lt;br/&gt;
+        String controllerKeyStorePassword = System.getProperty(&quot;controllerKeyStorePassword&quot;);&lt;br/&gt;
+        String controllerTrustStore = System.getProperty(&quot;controllerTrustStore&quot;);&lt;br/&gt;
+        String controllerTrustStorePassword = System.getProperty(&quot;controllerTrustStorePassword&quot;);&lt;br/&gt;
+&lt;br/&gt;
+        LOG.info(&quot;invoke connectWithSsl check channel&quot;);&lt;br/&gt;
+        if (secureChannel.equals(&quot;true&quot;)) {&lt;br/&gt;
+            LOG.info(&quot;invoke connectWithSsl check channel true&quot;);&lt;br/&gt;
+            TrustManagerFactory tmf = null;&lt;br/&gt;
+            KeyManagerFactory kmf = null;&lt;br/&gt;
+            try {
+                FileInputStream tsf = new FileInputStream(controllerTrustStore);
+                KeyStore ts = KeyStore.getInstance(&quot;JKS&quot;);
+                ts.load(tsf, controllerTrustStorePassword.toCharArray());
+                tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
+                tmf.init(ts);
+                LOG.info(&quot;invoke connectWithSsl tm init done&quot;);
+
+                FileInputStream ksf = new FileInputStream(controllerKeyStore);
+                KeyStore ks = KeyStore.getInstance(&quot;JKS&quot;);
+                ks.load(ksf, controllerKeyStorePassword.toCharArray());
+                kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
+                kmf.init(ks, controllerKeyStorePassword.toCharArray());
+                LOG.info(&quot;invoke connectWithSsl ks init done&quot;);
+
+                SSLContext ctx = SSLContext.getInstance(&quot;TLS&quot;);
+                ctx.init(kmf == null ? null : kmf.getKeyManagers(),
+                         tmf == null ? null : tmf.getTrustManagers(),
+                         null);
+
+                LOG.info(&quot;invoke connectWithSsl&quot;);
+                return connectWithSsl(address,port,ctx);
+            } catch (Exception e) {
+                LOG.warn(&quot;bootstrap.connect failed&quot;, e);
+            }&lt;br/&gt;
+        }&lt;br/&gt;
+&lt;br/&gt;
&lt;br/&gt;
         return connectWithSsl(address, port, null /* SslContext */);&lt;br/&gt;
     }&lt;br/&gt;
     @Override&lt;br/&gt;
@@ -225,6 +287,60 @@ public class OvsdbConnectionService implements AutoCloseable, OvsdbConnection {&lt;br/&gt;
      * passive connection handle channel callbacks.&lt;br/&gt;
      */&lt;br/&gt;
     private static void ovsdbManager(int port) {&lt;br/&gt;
+         LOG.info(&quot;custom.properties&quot; + System.getProperty(&quot;custom.properties&quot;));&lt;br/&gt;
+        // set up new properties object&lt;br/&gt;
+        // from file&lt;br/&gt;
+        try {+            FileInputStream propFile = new FileInputStream(System.getProperty(&quot;custom.properties&quot;));+            Properties p = new Properties(System.getProperties());+            p.load(propFile);+           // set the system properties+            System.setProperties(p);++        }
&lt;p&gt; catch (Exception ee) &lt;/p&gt;
{
+                LOG.warn(&quot; custom properties open failed&quot;, ee);
+        }
&lt;p&gt;+&lt;br/&gt;
+        // display new properties&lt;br/&gt;
+        String secureChannel = System.getProperty(&quot;secureChannelEnabled&quot;);&lt;br/&gt;
+        String controllerKeyStore = System.getProperty(&quot;controllerKeyStore&quot;);&lt;br/&gt;
+        String controllerKeyStorePassword = System.getProperty(&quot;controllerKeyStorePassword&quot;);&lt;br/&gt;
+        String controllerTrustStore = System.getProperty(&quot;controllerTrustStore&quot;);&lt;br/&gt;
+        String controllerTrustStorePassword = System.getProperty(&quot;controllerTrustStorePassword&quot;);&lt;br/&gt;
+        LOG.info(&quot;invoke connectWithSsl check channel&quot;);&lt;br/&gt;
+        if (secureChannel.equals(&quot;true&quot;)) {&lt;br/&gt;
+            LOG.info(&quot;invoke connectWithSsl check channel true&quot;);&lt;br/&gt;
+            TrustManagerFactory tmf = null;&lt;br/&gt;
+            KeyManagerFactory kmf = null;&lt;br/&gt;
+            try &lt;/p&gt;
{
+                FileInputStream tsf = new FileInputStream(controllerTrustStore);
+                KeyStore ts = KeyStore.getInstance(&quot;JKS&quot;);
+                ts.load(tsf, controllerTrustStorePassword.toCharArray());
+                tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
+                tmf.init(ts);
+                LOG.info(&quot;invoke connectWithSsl tm init done&quot;);
+
+                FileInputStream ksf = new FileInputStream(controllerKeyStore);
+                KeyStore ks = KeyStore.getInstance(&quot;JKS&quot;);
+                ks.load(ksf, controllerKeyStorePassword.toCharArray());
+                kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
+                kmf.init(ks, controllerKeyStorePassword.toCharArray());
+                LOG.info(&quot;invoke connectWithSsl ks init done&quot;);
+
+                SSLContext ctx = SSLContext.getInstance(&quot;TLS&quot;);
+                ctx.init(kmf == null ? null : kmf.getKeyManagers(),
+                         tmf == null ? null : tmf.getTrustManagers(),
+                         null);
+
+                LOG.info(&quot;invoke connectWithSsl&quot;);
+                ovsdbManagerWithSsl(port, ctx /* SslContext */);
+                return;
+            }
&lt;p&gt; catch (Exception e) &lt;/p&gt;
{
+                LOG.warn(&quot;bootstrap.connect failed&quot;, e);
+            }
&lt;p&gt;+&lt;br/&gt;
+        }&lt;br/&gt;
+&lt;br/&gt;
         ovsdbManagerWithSsl(port, null /* SslContext */);&lt;br/&gt;
     }&lt;/p&gt;</comment>
                            <comment id="41298" author="shague@redhat.com" created="Thu, 18 Feb 2016 19:14:06 +0000"  >&lt;p&gt;(In reply to srinivasa rao tagirisa from comment #6)&lt;br/&gt;
&amp;gt; Hi Sam,&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; The custom.properties and system.properties contents are getting overwritten&lt;br/&gt;
&amp;gt; every time I make a new build. For example, I would like to make the path of&lt;br/&gt;
&amp;gt; the custom.properties and certificate files configurable. What are the&lt;br/&gt;
&amp;gt; options I have ? I can probably set system properties in pom.xml file or a&lt;br/&gt;
&amp;gt; command line arg.&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; thx,&lt;br/&gt;
&amp;gt; Srini.&lt;/p&gt;

&lt;p&gt;Srini,&lt;/p&gt;

&lt;p&gt;the custom.properties files are fixed so we can&apos;t change that. For the patch to the certificates we should find a common solution for ODL. Below is the email from Mohamed describing some work we could leverage. I will start a discussion with Ryan Goulding to see what can be done.&lt;/p&gt;

&lt;p&gt;Thanks, Sam&lt;/p&gt;

&lt;p&gt;====================&lt;br/&gt;
Hi Srinivasa,&lt;/p&gt;

&lt;p&gt;There is a patch on aaa will be use for managing the certificate authentication &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/30166/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/30166/&lt;/a&gt;.  I think this could help in the certificate side implementation.&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</comment>
                            <comment id="41299" author="thapar" created="Wed, 29 Jun 2016 06:21:32 +0000"  >&lt;p&gt;Any updates on this? This was the last mail on this: &lt;a href=&quot;https://lists.opendaylight.org/pipermail/ovsdb-dev/2016-February/002620.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://lists.opendaylight.org/pipermail/ovsdb-dev/2016-February/002620.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Did we reach any conclusion? Any wiki describing how to setup certificates and do we have some code to use them for OVSDB?&lt;/p&gt;</comment>
                            <comment id="41300" author="vishnoianil@gmail.com" created="Fri, 3 Feb 2017 00:57:15 +0000"  >&lt;p&gt;Carbon : &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/48482/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/48482/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Wiki Page : &lt;a href=&quot;https://wiki.opendaylight.org/view/OVSDB_Integration:TLS_Communication&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://wiki.opendaylight.org/view/OVSDB_Integration:TLS_Communication&lt;/a&gt;&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_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5306</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10201" key="com.atlassian.jira.plugin.system.customfieldtypes:url">
                        <customfieldname>External issue URL</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[https://bugs.opendaylight.org/show_bug.cgi?id=5306]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10206" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Issue Type</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10308"><![CDATA[New Feature]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i021uv:</customfieldvalue>

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