[
https://issues.apache.org/jira/browse/CXF-7819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16589040#comment-16589040
]
Colm O hEigeartaigh commented on CXF-7819:
------------------------------------------
> Also, what is the idea behind that method? When would a client / user request
> all refresh tokens?
Well a client or user should not have access to the OAuthDataProvider! The idea
behind the method is if for example we are deregistering a client in the IdP,
we can remove all the associated tokens (access or refresh) associated with
that client (see AbstractOAuthDataProvider.removeClient).
> Allow OAuth2 refresh tokens to be hashed and irrecoverable
> -----------------------------------------------------------
>
> Key: CXF-7819
> URL: https://issues.apache.org/jira/browse/CXF-7819
> Project: CXF
> Issue Type: Wish
> Components: JAX-RS Security
> Affects Versions: 3.2.5
> Reporter: Thomas Iguchi
> Priority: Minor
>
>
> I want to store only hashed refresh tokens in my database since they appear
> to me pretty much like the equivalent of user passwords and I don't feel
> comfortable storing them in plain text.
> I do not plan to delete refresh tokens unless requested by the user ("session
> termination") or after a long enough time of user inactivity. So in case my
> refresh token DB should get leaked I hope that the extracted data will be
> pretty much worthless.
>
> However, the `OAuthDataProvider` interface has the following method:
>
> {code:java}
> /**
> * Return all refresh tokens associated with a given client
> * @param client the client
> * @param subject the user subject, can be null
> * @return list of refresh tokens
> * @throws OAuthServiceException
> */
> List<RefreshToken> getRefreshTokens(Client client, UserSubject subject)
> throws OAuthServiceException;
> {code}
>
> It looks to me as if the framework is set up in a way so existing refresh
> tokens should be retrievable from the data store. This is a bit of a road
> block to me at the moment. I cannot recover the token string.
> I used IntelliJ in order to trace usage of that method throughout my code
> base including CXF and cannot find a single caller (yet)...
> I want to check back with you what the intended purpose behind that method
> is. Would it harm the (future) functionality of the CXF OAuth2 module if I
> would let that method return an empty list or just null, or maybe a list with
> blank token string properties?
> Also, what is the idea behind that method? When would a client / user request
> all refresh tokens?
>
> Thanks in advance!
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)