<div dir="ltr">We have briefly discussed HSM some more, but as you are the first to ask about it we haven&#39;t made it a priority. We would certainly be interested in a contribution towards it. It&#39;s a fairly big task and we would also need decent test coverage for it.<div><br></div><div>In essence the work would be to create a Encryption SPI and a default implementation. The default implementation would rely on the keys stored in the database. I&#39;m not aware of any standard or libraries that can be used to communicate with HSM devices so I would imagine implementations for specific HSM vendors would have to be done by users themselves.</div><div><br></div><div>As well as encryption/signature methods you would also have to deal with how to retrieve the public key to display in the admin console and the providers would also have to be able to tell Keycloak if they can generate new keys or not. For providers that can generate new keys we would have the option on the admin console to generate new realm keys, but for others not.</div><div><br></div><div>If you are interested let us know. As a heads up this could not be included until 2.x.</div><div>    </div></div><div class="gmail_extra"><br><div class="gmail_quote">On 8 February 2016 at 19:47, Nagaraj,Vikas <span dir="ltr">&lt;<a href="mailto:Vikas.Nagaraj@safenet-inc.com" target="_blank">Vikas.Nagaraj@safenet-inc.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>
<font face="Calibri, sans-serif" size="2">
<div>Hello,</div>
<div> </div>
<div>We’ve been integrating Keycloak into one of our applications, and so far it’s been a pretty good experience.  I’m looking now at how realms’ signing keys are protected.  Currently Keycloak stores the private key in a database table, but we’d like to explore
protecting it with a Hardware Security Module (HSM).</div>
<div> </div>
<div>A couple of years ago there was a discussion on this list on this topic (thread starts here: <a href="https://lists.jboss.org/pipermail/keycloak-dev/2014-January/001124.html" target="_blank"><font color="#0000FF"><u>https://lists.jboss.org/pipermail/keycloak-dev/2014-January/001124.html</u></font></a>). 
One suggestion was to have an EncryptionSpi interface that could be overridden to provide the desired crypto operations; another was to use a master key sourced from somewhere outside the DB to encrypt the private keys stored with the realm.  Has there been
any discussion about either of these alternatives since?</div>
<div> </div>
<div>I’m happy to help with the implementation, but would appreciate some guidance from more experienced Keycloak devs on the best way to go about it.</div>
<div> </div>
<div>Thanks,</div>
<div> </div>
<div>-- </div>
<div>Vikas Nagaraj</div>
<div><a href="mailto:vikas.nagaraj@safenet-inc.com" target="_blank"><font color="#0000FF"><u>vikas.nagaraj@safenet-inc.com</u></font></a></div>
<div> </div>
<div> </div>
<div> </div>
</font>
</div>


<br>
The information contained in this electronic mail transmission <br>may be privileged and confidential, and therefore, protected <br>from disclosure. If you have received this communication in <br>error, please notify us immediately by replying to this <br>message and deleting it from your computer without copying <br>or disclosing it.<br><br><br>_______________________________________________<br>
keycloak-dev mailing list<br>
<a href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a><br></blockquote></div><br></div>