Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vdk-control-api-auth: [bug-fix] authorization header base64 encoding #2658

Merged
merged 2 commits into from
Sep 14, 2023

Conversation

doks5
Copy link
Contributor

@doks5 doks5 commented Sep 13, 2023

Currently, when using PKCE authorization, the client_secret is set to None when the base64 string is encoded. This leads to some authorization endpoints to not properly decode the authorization header and fail the authorization process.

This change converts the None object to an empty string, when PKCE is used, in order to make the resulting base64-encoded string compatible with more authorization endpoints.

Testing done: Local testing against a production authorization endpoint and a unit test.

Copy link
Collaborator

@antoniivanov antoniivanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I've hit this as well. I set client secret to "" (empty string).

But this is much better future-proof solution. Thanks for making it!

@doks5 doks5 self-assigned this Sep 14, 2023
Currently, when using PKCE authorization, the client_secret is set to None when the base64
string is encoded. This leads to some authorization endpoints to not properly decode the
`authorization` header and fail the authorization process.

This change converts the None object to an empty string, when PKCE is used, in order to
make the resulting base64-encoded string compatible with more authorization endpoints.

Testing done: Local testing against a production authorization endpoint and a unit test.

Signed-off-by: Andon Andonov <andonova@vmware.com>
Signed-off-by: Andon Andonov <andonova@vmware.com>
@doks5 doks5 force-pushed the person/andonova/auth-plugin-fix branch from 1752d43 to b48abd1 Compare September 14, 2023 14:07
@doks5 doks5 merged commit 0d2033d into main Sep 14, 2023
8 checks passed
@doks5 doks5 deleted the person/andonova/auth-plugin-fix branch September 14, 2023 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants