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(ui): Use cookies in the UI. Closes #1949 #2058

Merged
merged 6 commits into from
Jan 25, 2020
Merged

Conversation

alexec
Copy link
Contributor

@alexec alexec commented Jan 24, 2020

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this is a chore.
  • The title of the PR is (a) conventional, (b) states what changed, and (c) suffixes the related issues number. E.g. "fix(controller): Updates such and such. Fixes #1234".
  • I have written unit and/or e2e tests for my change. PRs without these are unlike to be merged.
  • Optional. I've added My organization is added to the README.
  • I've signed the CLA and required builds are green.

Closes #1949

This PR allows you to authenticate using either the Authorization header, or a cookie. This means we can download artifacts without have the token in the URL, which is not secure.

Basically, if you are using the API you should have Authorization: Bearer ..., if you are the UI should should have Cookie: authorization=....

@codecov
Copy link

codecov bot commented Jan 24, 2020

Codecov Report

Merging #2058 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #2058   +/-   ##
======================================
  Coverage    8.78%   8.78%           
======================================
  Files          61      61           
  Lines       34584   34584           
======================================
  Hits         3037    3037           
  Misses      31156   31156           
  Partials      391     391

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 5016230...b6ced3d. Read the comment docs.

@@ -339,6 +339,8 @@ up:
kubectl -n argo scale deployment/argo-server --replicas 1
# Wait for pods to be ready
kubectl -n argo wait --for=condition=Ready pod --all -l app --timeout 2m
# Token
kubectl -n argo get `kubectl -n argo get secret -o name | grep argo-server` -o jsonpath='{.data.token}' | base64 -d
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I want to know what the login token is!

Copy link
Member

Choose a reason for hiding this comment

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

Would it be a security concern that the secret gets sent to stdout?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

for tests only

@alexec alexec added this to the v2.5 milestone Jan 25, 2020
@alexec alexec marked this pull request as ready for review January 25, 2020 00:53
@alexec alexec merged commit 6f2c880 into argoproj:master Jan 25, 2020
@alexec alexec deleted the cookie branch January 25, 2020 03:32
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.

TODO - we should not put the token in the URL - OSWAP obvs
2 participants