<div dir="ltr"><div>Hello,<br><br></div>I like Jiri&#39;s idea. Why not deliver the distribution without a certificate but add documentation and tooling (scripts or code) to easily install a certificate from <a href="http://letsencrypt.org">letsencrypt.org</a>? It&#39;s the cleanest solution since it will avoid bundling a self-signed certificate. The main issue I have with self-signed certificates is that users will most likely not change it, which is a bigger issue than using unsecured connections.<br><br><br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">Thank you,<br>Stefan Negrea<br><br>Software Engineer<br></div></div></div>
<br><div class="gmail_quote">On Thu, May 26, 2016 at 4:51 AM, Jiri Kremser <span dir="ltr">&lt;<a href="mailto:jkremser@redhat.com" target="_blank">jkremser@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div>  what about creating a default certificate that is issued by a commonly accepted root CA (at least in the modern browsers, not sure about JVM if there is something similar). On the internets there is a service <a href="https://letsencrypt.org" target="_blank">https://letsencrypt.org</a> .I haven&#39;t tried yet, but it has also some API for doing it automatically, so we can even go further. What I&#39;ve tried is the <a href="https://www.startssl.com" target="_blank">https://www.startssl.com</a> and it worked perfectly, I can see the green https in the chrome :] Both services are for free, but afaik, don&#39;t allow to issue the &quot;star&quot; certificate, but for the dev purposes all we need is the cert for the localhost, right?</div><div><br></div><div>As for the production, we may provide some script + docs how to generate the cert in the <a href="https://letsencrypt.org" target="_blank">https://letsencrypt.org</a></div><div><br></div><div>my 2c</div><span class="HOEnZb"><font color="#888888"><div>jk</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 25, 2016 at 3:46 PM, Juraci Paixão Kröhling <span dir="ltr">&lt;<a href="mailto:jpkroehling@redhat.com" target="_blank">jpkroehling@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On <a href="tel:25.05.2016%2015" value="+12505201615" target="_blank">25.05.2016 15</a>:16, John Mazzitelli wrote:<br>
&gt;&gt; My next step is to change the agent to accept certs on our keystore.<br>
&gt;<br>
&gt; If everything works as I am expecting it to work, you should just need to configure the agent&#39;s storage adapter to use the WildFly security realm where the keystore is defined, and it should &quot;just work.&quot; But then again, its been a while since I tested the agent using secure comm to the server, but that is how I got it to work last time.<br>
&gt;<br>
&gt; See <a href="http://www.hawkular.org/docs/user/secure-comm.html" rel="noreferrer" target="_blank">http://www.hawkular.org/docs/user/secure-comm.html</a><br>
<br>
</span>Cool ! That would work for the local agent, which is the scenario I was<br>
planning on working on. For remote agents, we should *not* do this, as<br>
the keystore includes the private key for the cert, which should be<br>
known only to the server. But for the remote agent, I expect the server<br>
to use a proper certificate chain.<br>
<span><br>
&gt;&gt; Related question: are we even allowed to ship such keystores?<br>
&gt;<br>
&gt; It is how RHQ does it :-)<br>
<br>
</span>That&#39;s good to know, thanks!<br>
<span><br>
&gt;&gt; - As mentioned in the previous point, the cert is self-signed. So, you<br>
&gt;&gt; might need to add &quot;-k&quot; to curl to bypass the cert verification.<br>
&gt;&gt; - Authentication with client cert is not yet available.<br>
&gt;<br>
&gt;<br>
&gt; I do not know how to tell WildFly in its security-realm to do this same kind of bypass... did you look into that? Because the agent will need to be told about doing this bypass, too. The way I worked around it was I actually put my self-signed cert into my JVM&#39;s truststore (which isn&#39;t something I think we want to ask people to do).<br>
<br>
</span>It depends on the HTTP client you are using. In the &quot;production&quot;<br>
scenarios, no change is needed, as the cert would probably have a valid<br>
chain.<br>
<br>
For dev scenarios, or scenarios where the cert is issued by an unknown<br>
root CA (like internal certificates), the common practice is to add the<br>
root CA to the JVM&#39;s keystore, similar to what you did. The reason is<br>
that this cert is not trusted by any known Certificate Authority, so, an<br>
admin would have to explicitly tell that this cert is known and is to be<br>
trusted. The cert we will be shipping on the keystore is *not* trusted<br>
and is intended to be used only on dev scenarios.<br>
<br>
Another practice is to do a certificate pinning, ie, tell your HTTP<br>
client that you know about this specific cert. The disadvantage of this<br>
is that we&#39;d have to keep the server and client in sync. Looking at your<br>
instructions on secure-comm.html , this is probably what you are doing<br>
on the agent side.<br>
<br>
Unfortunately, there&#39;s no secure solution that I know of that would<br>
allow us to ship something usable for our production distribution.<br>
<br>
There was a thread some time ago on wildfly-dev about auto generating<br>
certificates on the first boot. I believe this was part of Elytron and<br>
we might be able to benefit from this in the future.<br>
<br>
- Juca.<br>
<div><div>_______________________________________________<br>
hawkular-dev mailing list<br>
<a href="mailto:hawkular-dev@lists.jboss.org" target="_blank">hawkular-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/hawkular-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/hawkular-dev</a><br>
</div></div></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
hawkular-dev mailing list<br>
<a href="mailto:hawkular-dev@lists.jboss.org">hawkular-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/hawkular-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/hawkular-dev</a><br>
<br></blockquote></div><br></div>