<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>
<div>
<div>Oh, we also found out that as a side effect related to duplicated ID tokens being generated the window where active==true returned by the Introspection endpoint for ID tokens is much larger than 5min. Depending on the load, maybe days. This will affect
 versions prior to the JTI being added to ID tokens, like the one used by SMART on FHIR.</div>
<div><br>
</div>
<div>Regards,</div>
<div>Luiz&nbsp;</div>
<div>
<div id="MAC_OUTLOOK_SIGNATURE"></div>
</div>
</div>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:12pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Luiz Omori &lt;<a href="mailto:luiz.omori@dm.duke.edu">luiz.omori@dm.duke.edu</a>&gt;<br>
<span style="font-weight:bold">Date: </span>Tuesday, December 8, 2015 at 9:33 AM<br>
<span style="font-weight:bold">To: </span>Justin Richer &lt;<a href="mailto:jricher@mit.edu">jricher@mit.edu</a>&gt;<br>
<span style="font-weight:bold">Cc: </span>&quot;<a href="mailto:mitreid-connect@mit.edu">mitreid-connect@mit.edu</a>&quot; &lt;<a href="mailto:mitreid-connect@mit.edu">mitreid-connect@mit.edu</a>&gt;<br>
<span style="font-weight:bold">Subject: </span>Re: [mitreid-connect] Introspection -&gt; active true for expired tokens?<br>
</div>
<div><br>
</div>
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>
<div>
<div>Will do.&nbsp;</div>
<div><br>
</div>
<div>As far as I can tell (debugger not quite working at the moment) IntrospectionEndpoint::verify is calling&nbsp;OAuth2TokenEntityService::readAccessToken and in DefaultOAuth2ProviderTokenService implementation that method is missing the accessToken.isExpired
 check. Interesting that this check is made in other methods within that class but not there. Fix should be easy.</div>
<div><br>
</div>
<div>Regards,</div>
<div>Luiz</div>
<div>
<div id=""></div>
</div>
</div>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:12pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Justin Richer &lt;<a href="mailto:jricher@mit.edu">jricher@mit.edu</a>&gt;<br>
<span style="font-weight:bold">Date: </span>Monday, December 7, 2015 at 5:58 PM<br>
<span style="font-weight:bold">To: </span>Luiz Omori &lt;<a href="mailto:luiz.omori@dm.duke.edu">luiz.omori@dm.duke.edu</a>&gt;<br>
<span style="font-weight:bold">Cc: </span>&quot;<a href="mailto:mitreid-connect@mit.edu">mitreid-connect@mit.edu</a>&quot; &lt;<a href="mailto:mitreid-connect@mit.edu">mitreid-connect@mit.edu</a>&gt;<br>
<span style="font-weight:bold">Subject: </span>Re: [mitreid-connect] Introspection -&gt; active true for expired tokens?<br>
</div>
<div><br>
</div>
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
The expiration check ought to be happening inside the token service as so that an expired token is never returned. If that’s not happening, please file an issue.
<div class=""><br class="">
</div>
<div class="">&nbsp;— Justin</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Dec 7, 2015, at 5:42 PM, Luiz Omori &lt;<a href="mailto:luiz.omori@duke.edu" class="">luiz.omori@duke.edu</a>&gt; wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Calibri, sans-serif;" class="">
<div class="">
<div class="">
<div class="">…and upon further investigations we found that there is a background task running every 5min (configurable value) that discards expired tokens. That in turn causes the Introspection to correctly return active=false. Shouldn’t the expired check
 be added to the Introspection endpoint to avoid that window where the token is already expired but Introspection is returning active=true?</div>
<div class=""><br class="">
</div>
<div class="">Regards,</div>
<div class="">Luiz</div>
<div class="">
<div id="" class=""></div>
</div>
</div>
</div>
<div class=""><br class="">
</div>
<span id="OLK_SRC_BODY_SECTION" class="">
<div style="font-family: Calibri; font-size: 12pt; text-align: left; border-width: 1pt medium medium; border-style: solid none none; padding: 3pt 0in 0in; border-top-color: rgb(181, 196, 223);" class="">
<span style="font-weight:bold" class="">From: </span>Luiz Omori &lt;<a href="mailto:luiz.omori@dm.duke.edu" class="">luiz.omori@dm.duke.edu</a>&gt;<br class="">
<span style="font-weight:bold" class="">Date: </span>Monday, December 7, 2015 at 5:03 PM<br class="">
<span style="font-weight:bold" class="">To: </span>&quot;<a href="mailto:mitreid-connect@mit.edu" class="">mitreid-connect@mit.edu</a>&quot; &lt;<a href="mailto:mitreid-connect@mit.edu" class="">mitreid-connect@mit.edu</a>&gt;<br class="">
<span style="font-weight:bold" class="">Subject: </span>Introspection -&gt; active true for expired tokens?<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Calibri, sans-serif;" class="">
<div class="">
<div class="">
<div class="">Hi,</div>
<div class=""><br class="">
</div>
<div class="">We received reports about the “active” field returned by Introspection being true even when the provided token is expired. Looking at DefaultIntrospectionResultAssembler:assembleFrom I see that it unconditionally sets that field to true. Is this
 by design?</div>
<div class=""><br class="">
</div>
<div class="">Note that we do have some overriding pieces in our deployment so it could be side effect from something on our side. We are NOT overriding the IntrospectionEndpoint or&nbsp;OAuth2TokenEntityService, either could be validating the token before proceeding,
 but I don’t see checks there either.</div>
<div class=""><br class="">
</div>
<div class="">Regards,</div>
<div class="">Luiz</div>
<div class="">
<div id="" class=""></div>
</div>
</div>
</div>
</div>
</div>
</span></div>
_______________________________________________<br class="">
mitreid-connect mailing list<br class="">
<a href="mailto:mitreid-connect@mit.edu" class="">mitreid-connect@mit.edu</a><br class="">
<a href="http://mailman.mit.edu/mailman/listinfo/mitreid-connect">http://mailman.mit.edu/mailman/listinfo/mitreid-connect</a><br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</span></div>
</div>
</span>
</body>
</html>