<div dir="ltr">Hi,<div><br></div><div>Just wondering what is the status on this? We&#39;d like to make sure it makes it into 1.8 release</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 18 November 2015 at 15:09, Kunal K <span dir="ltr">&lt;<a href="mailto:kunal@plivo.com" target="_blank">kunal@plivo.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 Stian,<div><br></div><div>Could you please review this code - <a href="https://github.com/tsudot/keycloak/commit/ce58d795bfea9e6c19663fa40d7a499d2d78aeab" target="_blank">https://github.com/tsudot/keycloak/commit/ce58d795bfea9e6c19663fa40d7a499d2d78aeab</a></div><div><br></div><div>I&#39;m having trouble figuring out how to call <span style="font-size:12.8px">session.getProvider(</span><span style="font-size:12.8px">PasswordHashProvider.class, algorithm) to replace </span><span style="font-size:12.8px">Pbkdf2PasswordEncoder.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">I checked <a href="https://github.com/tsudot/keycloak/blob/master/model/jpa/src/main/java/org/keycloak/models/jpa/UserAdapter.java#L399" target="_blank">https://github.com/tsudot/keycloak/blob/master/model/jpa/src/main/java/org/keycloak/models/jpa/UserAdapter.java#L399</a> but couldn&#39;t find any instance of KeycloakSession. Am I missing something?</span></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 17, 2015 at 11:07 PM, Kunal K <span dir="ltr">&lt;<a href="mailto:kunal@plivo.com" target="_blank">kunal@plivo.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">Thanks for those notes Stian, I will read up and document my progress on this thread.</div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 17, 2015 at 8:50 PM, Stian Thorgersen <span dir="ltr">&lt;<a href="mailto:sthorger@redhat.com" target="_blank">sthorger@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><br></div><div>That would be awesome.</div><div><br></div><div>First step would be to read <a href="http://keycloak.github.io/docs/userguide/keycloak-server/html/providers.html" target="_blank">http://keycloak.github.io/docs/userguide/keycloak-server/html/providers.html</a> to understand how Keycloak provides SPIs.</div><div><br></div><div>Next thing would be to add:</div><div><br></div><div>* class PasswordHashSPI</div><div>* interface PasswordHashProviderFactory</div><div>* interface PasswordHashProvider</div><div><br></div><div>These should be added to services module. You would also need to change Pbkdf2PasswordEncoder to be the default implementation.</div><div><br></div><div>Instead of using Pbkdf2PasswordEncoder directly code should use session.getProvider(PasswordHashProvider.class, algorithm). algorithm should be set to on credential entities (UserCredentialValueModel.algorithm). We also need a mechanism to specify the default algorithm (that would be used when users sets new password and also for existing users in the db).</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On 17 November 2015 at 16:06, Kunal K <span dir="ltr">&lt;<a href="mailto:kunal@plivo.com" target="_blank">kunal@plivo.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hi all,<div><br></div><div>I would like to start a discussion on how to implement - <a href="https://issues.jboss.org/browse/KEYCLOAK-1900" target="_blank">https://issues.jboss.org/browse/KEYCLOAK-1900</a></div><div><br></div><div>I have a django web app and all of my users are in a postgres database with salted passwords hashed using SHA. I have been reading how I can use UserFederation to implement by own credential validation, but the drawback here would be that I&#39;ll have to keep maintaining my old database.</div><div><br></div><div>For starters, I was thinking of replacing all occurrences of Pbkdf2PasswordEncoder with an equivalent SHAPasswordEncoder, which is a very crude approach and I&#39;m not sure if it will even work. After some bit of reading I saw this ticket - <a href="https://issues.jboss.org/browse/KEYCLOAK-1900" target="_blank">https://issues.jboss.org/browse/KEYCLOAK-1900</a></div><div><br></div><div>I would like to implement a custom hashing SPI and would love to get some pointers on how to go about it.</div><div><br></div><div>Thanks</div><span><font color="#888888">















<div><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><b style="font-size:small;font-family:tahoma,sans-serif">KUNAL KERKAR </b><font color="#666666" style="font-size:small;font-family:tahoma,sans-serif">| PRODUCT ENGINEER</font><br></div><div><div dir="ltr"><div style="font-size:small;font-family:arial"><div><span style="color:rgb(102,102,102);font-family:tahoma,sans-serif;font-size:13px;line-height:16.12px">Plivo, Inc. 340 Pine St, San Francisco - 94104, USA</span><font face="tahoma, sans-serif"><font color="#666666"><br></font></font></div><div><font face="tahoma, sans-serif"><font color="#666666">Web:</font> <a href="http://www.plivo.com/" style="color:rgb(17,85,204)" target="_blank">www.plivo.com</a> <font color="#666666">| Twitter:</font> <a href="http://twitter.com/plivo" style="color:rgb(17,85,204)" target="_blank">@plivo</a>, <a href="http://twitter.com/tsudot" style="color:rgb(17,85,204)" target="_blank">@tsudot</a></font></div><div><div dir="ltr" style="font-family:arial,sans-serif;font-size:12.8px"><div style="font-size:small;font-family:arial"><div><br></div><div><a href="https://www.plivo.com/sms-short-code/?utm=emailsig" style="color:rgb(17,85,204);font-family:tahoma,sans-serif" target="_blank">Free Incoming SMS for All US Short Codes – Get One Today!</a></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div></font></span></div>
<br></div></div>_______________________________________________<br>
keycloak-dev mailing list<br>
<a href="mailto:keycloak-dev@lists.jboss.org" target="_blank">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>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><b style="font-size:small;font-family:tahoma,sans-serif">KUNAL KERKAR </b><font color="#666666" style="font-size:small;font-family:tahoma,sans-serif">| PRODUCT ENGINEER</font><br></div><div><div dir="ltr"><div style="font-size:small;font-family:arial"><div><span style="color:rgb(102,102,102);font-family:tahoma,sans-serif;font-size:13px;line-height:16.1200008392334px">Plivo, Inc. 340 Pine St, San Francisco - 94104, USA</span><font face="tahoma, sans-serif"><font color="#666666"><br></font></font></div><div><font face="tahoma, sans-serif"><font color="#666666">Web:</font> <a href="http://www.plivo.com/" style="color:rgb(17,85,204)" target="_blank">www.plivo.com</a> <font color="#666666">| Twitter:</font> <a href="http://twitter.com/plivo" style="color:rgb(17,85,204)" target="_blank">@plivo</a>, <a href="http://twitter.com/tsudot" style="color:rgb(17,85,204)" target="_blank">@tsudot</a></font></div><div><div dir="ltr" style="font-family:arial,sans-serif;font-size:12.8000001907349px"><div style="font-size:small;font-family:arial"><div><br></div><div><a href="https://www.plivo.com/sms-short-code/?utm=emailsig" style="color:rgb(17,85,204);font-family:tahoma,sans-serif" target="_blank">Free Incoming SMS for All US Short Codes – Get One Today!</a></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><b style="font-size:small;font-family:tahoma,sans-serif">KUNAL KERKAR </b><font color="#666666" style="font-size:small;font-family:tahoma,sans-serif">| PRODUCT ENGINEER</font><br></div><div><div dir="ltr"><div style="font-size:small;font-family:arial"><div><span style="color:rgb(102,102,102);font-family:tahoma,sans-serif;font-size:13px;line-height:16.1200008392334px">Plivo, Inc. 340 Pine St, San Francisco - 94104, USA</span><font face="tahoma, sans-serif"><font color="#666666"><br></font></font></div><div><font face="tahoma, sans-serif"><font color="#666666">Web:</font> <a href="http://www.plivo.com/" style="color:rgb(17,85,204)" target="_blank">www.plivo.com</a> <font color="#666666">| Twitter:</font> <a href="http://twitter.com/plivo" style="color:rgb(17,85,204)" target="_blank">@plivo</a>, <a href="http://twitter.com/tsudot" style="color:rgb(17,85,204)" target="_blank">@tsudot</a></font></div><div><div dir="ltr" style="font-family:arial,sans-serif;font-size:12.8000001907349px"><div style="font-size:small;font-family:arial"><div><br></div><div><a href="https://www.plivo.com/sms-short-code/?utm=emailsig" style="color:rgb(17,85,204);font-family:tahoma,sans-serif" target="_blank">Free Incoming SMS for All US Short Codes – Get One Today!</a></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>
</div></div></blockquote></div><br></div>