Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7819

Allow OAuth2 refresh tokens to be hashed and irrecoverable

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 3.2.5
    • None
    • JAX-RS Security
    • None
    • Unknown

    Description

       

      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:

       

      /**
       * 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;
      

       

      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!

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            tiguchi Thomas Iguchi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: