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

docs(auth): add link to FAQ on invalid token error #11300

Merged

Conversation

agilgur5
Copy link
Member

@agilgur5 agilgur5 commented Jul 6, 2023

Motivation

Modifications

  • add a link to the auth error message in gatekeeper.go when the token is invalid

    • shorten the error message as well, per above motivation
  • add the "Bearer " prefix as another common reason for this error in the FAQ

Verification

Ran make docs

- as requested by Alex

- shorten to "token not valid" as, in my experience at least, "for running mode" actually significantly increased confusion
  - everyone on my teams thought that it meant we misconfigured our auth or that only one mode could be used at a time
    - but actually, we were just missing the `"Bearer "` prefix for our token

- add the `"Bearer "` prefix as another common reason for this error in the FAQ
  - my comment got a few upvotes, so definitely not a one-off 😅

Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
@terrytangyuan terrytangyuan enabled auto-merge (squash) July 6, 2023 18:56
@terrytangyuan
Copy link
Member

docs build need to be fixed

@agilgur5
Copy link
Member Author

agilgur5 commented Jul 6, 2023

hmm let me figure out which part broke -- looks like it may be detecting the Bearer reference as a false positive token match. from the logs:

-If you're using `--auth-mode=client`, make sure you have `*** in front of the token, as mentioned in [Access Token](access-token.md#token-creation).
+If you're using `--auth-mode=client`, make sure you have `Bearer` in front of the token, as mentioned in [Access Token](access-token.md#token-creation).

it's also missing the intentional space after Bearer in the docs as well 🤔

@agilgur5
Copy link
Member Author

agilgur5 commented Jul 6, 2023

ah okay, looks like removing the intentional space in front of Bearer was the change (from markdownlint), and then GitHub Actions's log is redacting it as a false positive. (I thought something was off because I didn't see any specific secret checking steps in make docs, that makes more sense now that GitHub is doing that 😅 )

- the space was intentional, but apparently markdownlint has no way of ignoring a line, so just gonna remove it as such
  - didn't add that much that it would be worth any effort to make dev tooling changes

Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
auto-merge was automatically disabled July 6, 2023 19:42

Head branch was pushed to by a user without write access

@agilgur5
Copy link
Member Author

agilgur5 commented Jul 6, 2023

@terrytangyuan error should be fixed now

Seems like markdownlint has no line ignore functionality unfortunately (markdownlint/markdownlint#16), so just removed the intentional space. EDIT: that was the wrong markdownlint, this is in fact possible in the one we use: https://github.com/DavidAnson/markdownlint#configuration

@terrytangyuan terrytangyuan enabled auto-merge (squash) July 6, 2023 19:45
@terrytangyuan terrytangyuan merged commit 50395d2 into argoproj:master Jul 6, 2023
23 checks passed
@agilgur5 agilgur5 deleted the docs-invalid-token-error-link branch July 6, 2023 20:16
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.

link to SSO docs when login fails: token not valid for running mode
2 participants