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

Fix MOTD not showing up on tsh login with certain arguments #10735

Merged
merged 2 commits into from
Mar 15, 2022

Conversation

lxea
Copy link
Contributor

@lxea lxea commented Mar 2, 2022

  • changes to configuration.go: fixes tsh login in the first case from the repro files
    tsh login --insecure --proxy=127.0.0.1:3080 --user=test
  • changes to apiserver.go fixes --auth and --with-roles not showing motd

These changes also add a test and part of that required moving export_test.go to export.go so the passwordFromConsole function could be overridden when testing for the MOTD

fixes: #10503

@github-actions github-actions bot added the tsh tsh - Teleport's command line tool for logging into nodes running Teleport. label Mar 2, 2022
@github-actions github-actions bot requested review from jakule and zmb3 March 2, 2022 15:16
Copy link
Collaborator

@r0mant r0mant left a comment

Choose a reason for hiding this comment

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

Please also include test coverage. We have some tsh tests already, should be pretty straightforward.

lib/client/api.go Outdated Show resolved Hide resolved
lib/config/configuration.go Outdated Show resolved Hide resolved
lib/web/apiserver.go Outdated Show resolved Hide resolved
tool/tsh/tsh.go Show resolved Hide resolved
@lxea lxea force-pushed the lxea/motd-inconsistency branch 2 times, most recently from 249c481 to 07112fd Compare March 3, 2022 15:34
@lxea lxea requested a review from r0mant March 3, 2022 15:48
tool/tsh/tsh.go Show resolved Hide resolved
lib/web/apiserver.go Show resolved Hide resolved
lib/web/apiserver.go Outdated Show resolved Hide resolved
@lxea lxea force-pushed the lxea/motd-inconsistency branch from 07112fd to 257616a Compare March 8, 2022 17:20
@r0mant
Copy link
Collaborator

r0mant commented Mar 15, 2022

@jakule or @zmb3 can one of you folks take a look as well pls?

Copy link
Contributor

@jakule jakule left a comment

Choose a reason for hiding this comment

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

One comment, two nits.

lib/client/api.go Outdated Show resolved Hide resolved
tool/tsh/tsh_test.go Outdated Show resolved Hide resolved
tool/tsh/tsh_test.go Outdated Show resolved Hide resolved
@lxea lxea force-pushed the lxea/motd-inconsistency branch from 257616a to 5e4cac9 Compare March 15, 2022 11:50
Alex McGrath added 2 commits March 15, 2022 11:54
- changes to configuration.go: fixes tsh login in first test case
  `tsh login --insecure --proxy=127.0.0.1:3080 --user=test`
- changes to apiserver.go fixes `--auth` not showing motd
Part of this includes renaming export_test.go to export.go so I could
test the MOTD outside of lib/client/export.go
@lxea lxea force-pushed the lxea/motd-inconsistency branch from 5e4cac9 to 50e7db8 Compare March 15, 2022 11:54
@lxea lxea enabled auto-merge (rebase) March 15, 2022 11:54
@lxea lxea merged commit 39977ef into master Mar 15, 2022
@lxea lxea deleted the lxea/motd-inconsistency branch March 15, 2022 12:18
lxea pushed a commit that referenced this pull request Mar 28, 2022
…in arguments (#11372)

* Fix MOTD not showing up on tsh login with certain arguments

- changes to configuration.go: fixes tsh login in first test case
  `tsh login --insecure --proxy=127.0.0.1:3080 --user=test`
- changes to apiserver.go fixes `--auth` not showing motd

* Add tests for motd fixes

Part of this includes renaming export_test.go to export.go so I could
test the MOTD outside of lib/client/export.go
lxea pushed a commit that referenced this pull request Mar 28, 2022
…in arguments (#11371)

* Fix MOTD not showing up on tsh login with certain arguments

- changes to configuration.go: fixes tsh login in first test case
  `tsh login --insecure --proxy=127.0.0.1:3080 --user=test`
- changes to apiserver.go fixes `--auth` not showing motd

* Add tests for motd fixes

Part of this includes renaming export_test.go to export.go so I could
test the MOTD outside of lib/client/export.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tsh tsh - Teleport's command line tool for logging into nodes running Teleport.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"message_of_the_day" is not showing up in some scenarios.
3 participants