<div dir="ltr">Love it. I had the thought at some point that it might make sense to bundle the password reset operation with an optional token invalidation, and maybe that's how we ended up with this MVP language. In any case, this is a very good fit for a controller endpoint. We do not want the user to provide the new state. We don't even necessarily want the user to know or care that there is a jwt secret stored somewhere. The user just wants to request an action, which is to invalidate any existing tokens.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 25, 2017 at 8:04 PM, Bihan Zhang <span dir="ltr"><<a href="mailto:bizhang@redhat.com" target="_blank">bizhang@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p style="margin-top:0em;margin-bottom:1em;color:rgb(61,69,76);font-family:ProximaNova-Regular,helvetica,arial,sans-serif;font-size:14px"></p></blockquote>Currently the jwt reset is accomplished through a write_only reset_jwt_secret field passed to the <i>/api/v3/users/{username}/</i> endpoint. Since this field does not exist on our model it would have to be deleted before model create/update is called, the fact that it is not is causing issue #3075 to occur.<div><br></div><div>  <div>On a comment in #3075 [1] I suggested creating a controller URI to mitigate this problem, but this would go against a MVP use case of</div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p style="margin-top:0em;margin-bottom:1em;color:rgb(61,69,76);font-family:ProximaNova-Regular,helvetica,arial,sans-serif;font-size:14px">As an autheticated user, I can invalidate a user's JWTs in the same operation as updating the password. [done]</p></blockquote></div><div>I would like to propose that we remove this MVP use case since the current implementation (and I believe any implementation that allows jwt resets to be accomplished at the <i>/api/v3/users/{username}/</i> <wbr>URI) tunnels the endpoint and "uses a single URI to POST to, and varying messages to express differing intents" [2]<br></div><div><br></div><div>The user could instead make a call to update their password and another (maybe at <i>/api/v3/users/{username}/<wbr>jwt</i> ) to reset their JWT secret. </div><div><br></div><div><span style="font-size:12.8px">Thoughts?</span><br style="font-size:12.8px"><div style="font-size:12.8px"></div></div><div><span style="font-size:12.8px"><br></span></div><div>[0] <a href="https://pulp.plan.io/issues/3075" target="_blank">https://pulp.plan.io/<wbr>issues/3075</a></div><div>[1] <a href="https://pulp.plan.io/issues/3075#note-3" target="_blank">https://pulp.plan.io/<wbr>issues/3075#note-3</a></div></div><div>[2] <a href="https://www.infoq.com/articles/rest-anti-patterns" target="_blank">https://www.infoq.com/<wbr>articles/rest-anti-patterns</a></div></div>
<br>______________________________<wbr>_________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/pulp-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><p style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px!important;padding:0px!important"><span style="margin:0px!important;padding:0px!important">Michael</span> <span style="margin:0px!important;padding:0px!important">Hrivnak</span></p><p style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px!important;padding:0px!important"></p><span style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px!important;padding:0px!important"><span style="margin:0px!important;padding:0px!important">Principal Software Engineer</span><span style="margin:0px!important;padding:0px!important">, <span style="margin:0px!important;padding:0px!important">RHCE</span></span> </span><span style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px"></span><br style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px!important;padding:0px!important"><p style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px!important;padding:0px!important">Red Hat</p></div></div>
</div>