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: adds motd to the ui #27813

Merged
merged 9 commits into from Jun 16, 2023
Merged

feat: adds motd to the ui #27813

merged 9 commits into from Jun 16, 2023

Conversation

flyinghermit
Copy link
Contributor

@flyinghermit flyinghermit commented Jun 13, 2023

When MOTD is set, the message is shown before login screen (tsh does the same). User's are required to click confirmation button before transitioning to login screen.

MOTD in teleport is configurable with auth_service.message_of_the_day in teleport.yaml config. See docs for setup instruction: https://goteleport.com/docs/server-access/guides/ssh-pam/#display-a-message-of-the-day-motd-with-teleport

Closes #13724

Copy link
Contributor

@kimlisa kimlisa left a comment

Choose a reason for hiding this comment

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

can you manually test that this works for both the open source and enterprise version?

and should we be preserving the users first acknowledge? so it doesn't keep popping up every time they log in?

web/packages/teleport/src/config.ts Outdated Show resolved Hide resolved
web/packages/teleport/src/Login/MOTD/index.ts Outdated Show resolved Hide resolved
web/packages/teleport/src/Login/MOTD/MOTD.tsx Outdated Show resolved Hide resolved
web/packages/teleport/src/Login/Login.tsx Outdated Show resolved Hide resolved
web/packages/teleport/src/Login/Login.tsx Outdated Show resolved Hide resolved
web/packages/teleport/src/Login/Login.tsx Outdated Show resolved Hide resolved
web/packages/teleport/src/Login/Login.tsx Outdated Show resolved Hide resolved
@flyinghermit
Copy link
Contributor Author

can you manually test that this works for both the open source and enterprise version?

Tested in both oss and enterprise. enterprise PR here https://github.com/gravitational/teleport.e/pull/1654

and should we be preserving the users first acknowledge? so it doesn't keep popping up every time they log in?

I don't think we would want to preserve acknowledge state (even though UX wise, users may find it annoying). MOTDs are meant to be shown before each login. Admins may also update MOTD frequently.

web/packages/teleport/src/Login/useLogin.ts Outdated Show resolved Hide resolved
web/packages/teleport/src/Login/useLogin.ts Outdated Show resolved Hide resolved
web/packages/teleport/src/config.ts Outdated Show resolved Hide resolved
- add unmount test
- remove motd title
- group states together in useLogin
- update arrow func to classic js func
@flyinghermit flyinghermit requested a review from zmb3 June 15, 2023 10:15
@flyinghermit
Copy link
Contributor Author

Friendly ping for review please @ryanclark @zmb3

@flyinghermit flyinghermit added this pull request to the merge queue Jun 15, 2023
@flyinghermit flyinghermit removed this pull request from the merge queue due to a manual request Jun 15, 2023
@flyinghermit flyinghermit added this pull request to the merge queue Jun 16, 2023
Merged via the queue into master with commit 1762c76 Jun 16, 2023
31 checks passed
@flyinghermit flyinghermit deleted the sshah/motd-ui branch June 16, 2023 03:01
@public-teleport-github-review-bot

@sshahcodes See the table below for backport results.

Branch Result
branch/v11 Failed
branch/v12 Create PR
branch/v13 Create PR

flyinghermit added a commit that referenced this pull request Jun 16, 2023
github-merge-queue bot pushed a commit that referenced this pull request Jul 5, 2023
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.

Extend MOTD functionality to the Web UI
5 participants