Skip to content

OAuth2: Optimization: Use only base64 or only hex encoding for the HMAC cookie #28728

Closed

Description

@mkauf

The OAuth2 filter creates a HMAC and saves it in a cookie called "OauthHMAC". For this cookie, the HMAC is first hex-encoded, and then base64-encoded.

It's not necessary to use both encodings. Only hex encoding or only base64 encoding is sufficient, and the cookie value will be shorter.

Example:

Hex encoding + Base64 encoding (current implementation):

ZWU2ZDIwOWU0ODQ1Mjk5ZDczODA3MWI3ODQxN2I3YTg0MDg5YmE1MzA4ZTk5MjBhNmY0M2E3ODBlMjZiNDMzMw==

Hex encoding only:

ee6d209e4845299d738071b78417b7a84089ba5308e9920a6f43a780e26b4333

Base64 encoding only:

7m0gnkhFKZ1zgHG3hBe3qECJulMI6ZIKb0OngOJrQzM=

Activity

  1. added
    triage
    on Jul 31, 2023
  2. added
    enhancement
    help wanted
    and removed
    triage
    on Aug 1, 2023
  3. htuch commented on Aug 1, 2023

    @htuch
    Member
  4. Ronnie-personal commented on Aug 5, 2023

    @Ronnie-personal
    Contributor

    @htuch
    I'm interested in contributing to this issue, but I'm new to this open-source project.
    I might have basic follow-up questions.

    Please let me know if this issue is suitable for a newcomer.

    Thanks!

  5. removed
    help wanted
    on Aug 6, 2023
  6. htuch commented on Aug 6, 2023

    @htuch
    Member

    @Ronnie-personal sure, assigned the issue to you. Please reach out to @derekargueta @mattklein123 for anything oatuh2 specific as CODEOWNERS. I'm happy to answer general Envoy questions you have.

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

Metadata

Metadata

Labels

area/oauthenhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions