Fix read authorization_metadata_key from public_client_config in _refresh_credentials_from_command#1065
Fix read authorization_metadata_key from public_client_config in _refresh_credentials_from_command#1065eapolinario merged 17 commits into
Conversation
Signed-off-by: Sonja Ericsson <sonjae@spotify.com>
Signed-off-by: Sonja Ericsson <sonjae@spotify.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1065 +/- ##
==========================================
+ Coverage 86.51% 86.52% +0.01%
==========================================
Files 268 268
Lines 24864 24893 +29
Branches 2799 2803 +4
==========================================
+ Hits 21510 21539 +29
+ Misses 2877 2875 -2
- Partials 477 479 +2 ☔ View full report in Codecov by Sentry. |
eapolinario
left a comment
There was a problem hiding this comment.
Thanks for this fix, the change to pass the authorization key in the case of external commands was missing.
|
@eapolinario what takes precedence from config, env and passing a flag? |
|
…resh_credentials_from_command (#1065) * add support for custom auth from env Signed-off-by: Sonja Ericsson <sonjae@spotify.com> * Update flytekit/clis/flyte_cli/main.py Signed-off-by: Sonja Ericsson <sonjae@spotify.com> * fix Signed-off-by: Sonja Ericsson <sonjae@spotify.com> * fix Signed-off-by: Sonja Ericsson <sonjae@spotify.com> * fix Signed-off-by: Sonja Ericsson <sonjae@spotify.com> * fix Signed-off-by: Sonja Ericsson <sonjae@spotify.com> * fix Signed-off-by: Sonja Ericsson <sonjae@spotify.com> * Update test_raw.py Signed-off-by: Sonja Ericsson <sonjae@spotify.com> * fix Signed-off-by: Sonja Ericsson <sonjae@spotify.com> * fix Signed-off-by: Sonja Ericsson <sonjae@spotify.com> * fix Signed-off-by: Sonja Ericsson <sonjae@spotify.com> * fix Signed-off-by: Sonja Ericsson <sonjae@spotify.com> * fix Signed-off-by: Sonja Ericsson <sonjae@spotify.com> * fix Signed-off-by: Sonja Ericsson <sonjae@spotify.com> * fix Signed-off-by: Sonja Ericsson <sonjae@spotify.com> * fix Signed-off-by: Sonja Ericsson <sonjae@spotify.com> * fix Signed-off-by: Sonja Ericsson <sonjae@spotify.com>
TL;DR
FLYTE_CREDENTIALS_AUTHORIZATION_METADATA_KEYenvironment variable was removed in this PR #858 in favor of reading the authorization metadata key from Admin.There was a miss in the PR where the
_refresh_credentials_from_commanddid not switch to get the authorization key from self.public_client_config.authorization_metadata_key but instead used the default valueauthorization.Spotify uses
flyte-authorizationso we received an error about calls being UNAUTHENTICATED since the header name didn't correspond to the one expected by admin.This PR adds support for reading
authorization_metadata_keyfrompublic_client_configin_refresh_credentials_from_commandType
Are all requirements met?
Complete description
Tracking Issue
https://github.com/flyteorg/flyte/issues/
Follow-up issue
NA
OR
https://github.com/flyteorg/flyte/issues/