Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Allow passing in authentication client secret as an environment variable #311

Merged
merged 4 commits into from Aug 9, 2022

Conversation

katrogan
Copy link
Contributor

@katrogan katrogan commented Aug 8, 2022

TL;DR

Allow passing in authentication client secret as an environment variable in addition to file path location

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Complete description

How did you fix the bug, make the feature etc. Link to any design docs etc

Tracking Issue

flyteorg/flyte#2744

Follow-up issue

NA

Signed-off-by: Katrina Rogan <katroganGH@gmail.com>
@codecov
Copy link

codecov bot commented Aug 8, 2022

Codecov Report

Merging #311 (dae2e04) into master (3ac7a01) will decrease coverage by 0.35%.
The diff coverage is 9.09%.

@@            Coverage Diff             @@
##           master     #311      +/-   ##
==========================================
- Coverage   75.05%   74.70%   -0.36%     
==========================================
  Files          15       15              
  Lines         994     1000       +6     
==========================================
+ Hits          746      747       +1     
- Misses        217      222       +5     
  Partials       31       31              
Flag Coverage Δ
unittests 74.94% <9.09%> (-0.39%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
clients/go/admin/config.go 20.00% <ø> (ø)
clients/go/admin/token_source_provider.go 26.12% <0.00%> (-1.24%) ⬇️
clients/go/admin/config_flags.go 55.81% <100.00%> (+1.05%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

logger.Errorf(ctx, "Error reading secret from location %s", cfg.ClientSecretLocation)
return nil, err
}
secret = strings.TrimSpace(string(secretBytes))
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we have this done in both the conditions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Signed-off-by: Katrina Rogan <katroganGH@gmail.com>
Signed-off-by: Katrina Rogan <katroganGH@gmail.com>
Copy link
Contributor

@wild-endeavor wild-endeavor left a comment

Choose a reason for hiding this comment

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

this is just for the CC/api key type auth right?

@katrogan
Copy link
Contributor Author

katrogan commented Aug 9, 2022

this is just for the CC/api key type auth right?
yes (I don't think there's any equivalent for pkce, right?)

@katrogan katrogan merged commit dbeb016 into master Aug 9, 2022
@katrogan katrogan deleted the client-secret-env-var branch August 9, 2022 16:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants