Skip to content

No way to access a refresh_token in the oauth2 filter #17808

Closed

Description

@Alexcei88

I am using OAuth2 filter to protect my microservices. Identity broker is Keycloak.
According Keycloak documentation many its REST API methods are required passing refresh_token instead of access_token.
For example to logout user from identity provider I need to pass the refresh_token to authentificate me on the server.
It's strange, but keycloak developers designed so.

Configuring OAuth2 filter I can specify token endpoint and whether to pass the recieved access_token to upstream ( forward_bearer_token parameter). But the received refresh_token just get lost by envoy. How can I get a refresh_token?

I am ready to make PR to save refresh_token somewhere in the OAuth2 filter. What do you think?

Activity

  1. added
    triage
    on Aug 23, 2021
  2. phlax commented on Aug 23, 2021

    @phlax
    Member
  3. added
    enhancement
    question
    and removed
    triage
    on Aug 23, 2021
  4. rgs1 commented on Aug 24, 2021

    @rgs1
    Member

    Thanks for reporting this @Alexcei88 – happy to help reviewing a PR if you want to start working on something.

  5. github-actions commented on Sep 23, 2021

    @github-actions

    This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

  6. added
    stale
    and removed
    stale
    on Sep 23, 2021
  7. Alexcei88 commented on Sep 29, 2021

    @Alexcei88
    ContributorAuthor

    I found one more general case.
    To logout user many OAuth provider receive id_token through id_token_hint query parameter. This is used as an indication of the identity of the End-User. Right now envoy doesn't save id_token anywhere, so I cannot get this parameter. So, it looks like I also need to save id_token.

    I will take care it soon.

  8. github-actions commented on Oct 29, 2021

    @github-actions

    This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

  9. added
    stale
    on Oct 29, 2021
  10. github-actions commented on Nov 5, 2021

    @github-actions

    This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.

  11. siepkes commented on Nov 17, 2021

    @siepkes

    @rgs1 Could this issue be re-opened and tagged help-wanted? This feature would be valuable for me as well and I think it could be beneficial to more people.

  12. reopened this on Nov 17, 2021
  13. added
    help wanted
    and removed
    stale
    on Nov 17, 2021
  14. Alexcei88 commented on Nov 17, 2021

    @Alexcei88
    ContributorAuthor

    @siepkes , PR already approved some days ago and changes merged to the main branch. No need to re-open issue

  15. phlax commented on Nov 17, 2021

    @phlax
    Member

    @Alexcei88 which PR - shall i close this ticket again ?

  16. Alexcei88 commented on Nov 17, 2021

    @Alexcei88
    ContributorAuthor
  17. siepkes commented on Nov 17, 2021

    @siepkes

    @Alexcei88 Totally missed that one, sorry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/oauthenhancementhelp wantedquestion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions