Credentials are not stripped on a redirect · Issue #500 · golang/oauth2 · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Credentials are not stripped on a redirect #500

Open
@wirtsi

Description

@wirtsi

Hey

we have raised an issue at redpanda-data/connect#792 where the following happens

  • We speak to an oAuth protected endpoint with a valid token
  • Endpoint is happy with the token and redirects me to an endpoint that is secured with a X-Amz-Security-Token URL param (the oauth endpoint adds those)
  • The redirected-to endpoint barfs because the initial Authorization header is still present (Message is something like "Only one auth mechanism allowed")
  • The preservation of the auth headers is something that happens in the oauth2 library, doing a redirect with http.Client removes them

Now the behavior of preserving Auth headers on redirects is a somewhat grey area of the specs. I'd like to point out though that keeping auth headers is not standard golang behavior ... golang/go@6e87082 introduced a changed where Auth headers and cookies are only preserved on redirect if the target host is a subdomain.

The devs at benthos rightly said that this is something that should be fixed in the oauth library. What do you guys think? Is this a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      TMZ Celebrity News – Breaking Stories, Videos & Gossip

      Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

      Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

      🎥 Watch TMZ Live

      TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.