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

feat: Authentication can be optionally disabled #89

Merged
merged 16 commits into from
Aug 24, 2020
Merged

Conversation

kumare3
Copy link
Contributor

@kumare3 kumare3 commented Aug 19, 2020

TL;DR

FlyteConsole enables authentication by default. This has a weird side-effect in Sandbox, where the console enables secure cookies, even if we actually do not have authN. in this situation, Chrome does not allow CORS with a wild card of *. This PR allows disabling authN and which should allow working with CORs

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

Disable credentials in case when authn is not used / required. This will allow CORs wildcard. Particularly helpful in sandbox testing.

Tracking Issue

flyteorg/flyte#416

Follow-up issue

NA

@codecov-commenter
Copy link

codecov-commenter commented Aug 19, 2020

Codecov Report

Merging #89 into master will increase coverage by 0.01%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #89      +/-   ##
==========================================
+ Coverage   66.22%   66.24%   +0.01%     
==========================================
  Files         367      367              
  Lines        5860     5866       +6     
  Branches      893      894       +1     
==========================================
+ Hits         3881     3886       +5     
- Misses       1979     1980       +1     
Impacted Files Coverage Δ
src/common/utils.ts 90.38% <75.00%> (-1.29%) ⬇️
src/models/AdminEntity/AdminEntity.ts 68.75% <100.00%> (+2.08%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c8b3c37...24cae8f. Read the comment docs.

@kumare3 kumare3 marked this pull request as draft August 19, 2020 23:00
env.js Outdated
@@ -39,6 +41,7 @@ module.exports = {
BASE_URL,
CORS_PROXY_PREFIX,
NODE_ENV,
STATUS_URL
STATUS_URL,
Copy link
Contributor

Choose a reason for hiding this comment

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

Two small things:

  1. These are sorted alphabetically, would prefer if you can keep that.
  2. It's not documented, but the way this object works is that items in processEnv will be sent to the client, and items outside of it are available on the server. I think this new variable should be in both places, so can you add it at both levels of the object?

@kumare3 kumare3 changed the title WIP Authentication can be optionally disabled Aug 20, 2020
@kumare3 kumare3 requested a review from schottra August 20, 2020 23:28
@kumare3 kumare3 marked this pull request as ready for review August 20, 2020 23:28
@kumare3 kumare3 changed the title Authentication can be optionally disabled feat: Authentication can be optionally disabled Aug 24, 2020
@kumare3 kumare3 merged commit d92a127 into master Aug 24, 2020
@service-github-lyft-semantic-release
Copy link
Contributor

🎉 This PR is included in version 0.9.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants