<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Nov 28, 2017 at 8:32 PM, David Davis <span dir="ltr"><<a href="mailto:daviddavis@redhat.com" target="_blank">daviddavis@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I’m not sure I fully understand this last paragraph about setting a maximum amount of time per token. Regardless, I would not add the ability to request new JWT tokens using JWT authentication in the MVP unless it’s easy to implement. I think we want that eventually but what we have today supports most of what users want or need from JWT auth.</div></blockquote><div><br></div><div>The change I am proposing is just a configuration change in settings.py. We need to set JWT_ALLOW_REFRESH to True and determine what we want the default value for JWT_REFRESH_EXPIRATION_DELTA to be. The first will enable the feature, the second will determine the length of time that can pass from the creation of the very first token (using name and password) until the user has to use the username and password again. In the time in between, the user can use the JWT to get a new JWT. <br></div><div><br></div><div>More docs on this are here[0].</div><div><br></div><div><br></div><div>[0] <a href="https://getblimp.github.io/django-rest-framework-jwt/">https://getblimp.github.io/django-rest-framework-jwt/</a><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div><div class="gmail-m_-142146282056783769m_309679074543758706gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br></div><div>David<br></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote"><div><div class="gmail-h5">On Tue, Nov 28, 2017 at 5:34 PM, Dennis Kliban <span dir="ltr"><<a href="mailto:dkliban@redhat.com" target="_blank">dkliban@redhat.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-h5"><div dir="ltr"><div><div>Our MVP doc currently states "<span style="color:red">As an API user, I can authenticate any API call
 (except to request a JWT) with a JWT. (not certain if this should be 
the behavior) [in progress]</span>"<span style="color:red"><br></span></div><br>The uncertainty was due to the "except to request a JWT" clause.<br><br>I propose that Pulp 3 should support requesting a new JWT by using an existing JWT. Automated systems that integrate with Pulp would benefit from being able to renew tokens using an existing token.</div><div></div><div><br></div><div>Enabling this feature with django-rest-framework-jwt requires also selecting the maximum amount of time since original token was issued that the token can be refreshed. The default is 7 days. Pulp users should be able to supply this value. Thy should also be able to specify how long each token is good for.<br></div><div><br></div><div><br></div><div>What do others think?<br></div></div>
<br></div></div>______________________________<wbr>_________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com" target="_blank">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer" target="_blank">https://www.redhat.com/mailman<wbr>/listinfo/pulp-dev</a><br>
<br></blockquote></div><br></div></div>
</blockquote></div><br></div></div>