[mitreid-connect] Revoke Consent keeps Refresh Tokens [I]

Dominik Schmich dominik.schmich at db.com
Fri Mar 10 03:01:26 EST 2017


Classification: For internal use only
Hi everyone,

I have a little question regarding the Approved Site revocation behavior.

Here is what I did see on the Database Tables:

-          Access Tokens are tied to Approved Sites via the database field "approved_site_id".

-          Refresh Tokens are tied to Access Tokens  via the database field "refresh_token_id".

Now if you remove an Approved Site the method "DefaultApprovedSiteService.remove()" is used. This will get all access tokens, remove all associated refresh tokens and then delete the access token. In the end it removes the Approved Site. This is exactly the behavior I did expect.

This behavior changes once the Refresh Token was used the first time. With the usage, the "DefaultOAuth2ProviderTokenService.refreshAccessToken()" is used. This creates a new AccessToken and re-links the new Access Token with the old Refresh Token via "token.setRefreshToken()". Which is correct. What I'm missing is the "token.setApprovedSite()" to the new Access Token, which should only be done, if the site is still approved. Due to this not linking, the Refresh & Access Tokens stay in the system until the expire and do not get deleted by "DefaultApprovedSiteService.remove()". Is this a bug?

What I additionally thought of but didn't verify is the following scenario: What if there are Refresh & Access Tokens created and after a while the Access Token times out and gets deleted by the "taskScheduler" calling "defaultOAuth2ProviderTokenService.clearExpiredTokens()". Then we have a similar szenario like above: a Refesh Token not linked to an Approved Site via an Access Token. Is this a bug aswell?

Do we maybe add the Approved Site to Refresh Tokens aswell?

Beste Grüße / Kind regards,
Dominik Schmich

____________________________________________________

[cid:image001.png at 01D29821.EAA106D0]

Dominik Schmich
Assistant Vice President | Solution Architect

Deutsche Bank AG
COO PW&CC Technology, Strategy & Architecture
Alfred-Herrhausen-Allee 16-24, 65760 Eschborn, Germany
Tel. +49 69 910-60543
Mobile +49 1723700665
Email dominik.schmich at db.com<mailto:dominik.schmich at db.com>


---
Die Europäische Kommission hat unter http://ec.europa.eu/consumers/odr/ eine Europäische Online-Streitbeilegungsplattform (OS-Plattform) errichtet. Die OS-Plattform kann ein Verbraucher für die außergerichtliche Beilegung einer Streitigkeit aus Online-Verträgen mit einem in der EU niedergelassenen Unternehmen nutzen.

Informationen (einschließlich Pflichtangaben) zu einzelnen, innerhalb der EU tätigen Gesellschaften und Zweigniederlassungen des Konzerns Deutsche Bank finden Sie unter https://www.deutsche-bank.de/Pflichtangaben. Diese E-Mail enthält vertrauliche und/ oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.

The European Commission has established a European online dispute resolution platform (OS platform) under http://ec.europa.eu/consumers/odr/. The OS platform can be used by a consumer for the extra-judicial settlement of a dispute of online contracts with a provider established in the EU companies.

Please refer to https://www.db.com/disclosures for information (including mandatory corporate particulars) on selected Deutsche Bank branches and group companies registered or incorporated in the European Union. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 19811 bytes
Desc: not available
Url : http://mailman.mit.edu/pipermail/mitreid-connect/attachments/20170310/c77c6714/attachment-0001.bin


More information about the mitreid-connect mailing list