Skip to content

feat: adds motd to the ui#27813

Merged
flyinghermit merged 9 commits into
masterfrom
sshah/motd-ui
Jun 16, 2023
Merged

feat: adds motd to the ui#27813
flyinghermit merged 9 commits into
masterfrom
sshah/motd-ui

Conversation

@flyinghermit
Copy link
Copy Markdown
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

Comment thread web/packages/teleport/src/Login/MOTD/MOTD.tsx Outdated
Copy link
Copy Markdown
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?

Comment thread web/packages/teleport/src/config.ts Outdated
Comment thread web/packages/teleport/src/Login/MOTD/index.ts Outdated
Comment thread web/packages/teleport/src/Login/MOTD/MOTD.tsx Outdated
Comment thread web/packages/teleport/src/Login/Login.tsx Outdated
Comment thread web/packages/teleport/src/Login/Login.tsx Outdated
Comment thread web/packages/teleport/src/Login/Login.tsx Outdated
Comment thread web/packages/teleport/src/Login/Login.tsx Outdated
Comment thread lib/web/apiserver.go
Comment thread web/packages/teleport/src/Login/MOTD/MOTD.tsx Outdated
- update MOTD to Motd
- moved motd state to useLogin
- added behaviour tests
@flyinghermit
Copy link
Copy Markdown
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.

Comment thread web/packages/teleport/src/Login/Login.test.tsx
Comment thread web/packages/teleport/src/Login/Login.test.tsx
Comment thread web/packages/teleport/src/Login/useLogin.ts Outdated
Comment thread web/packages/teleport/src/Login/useLogin.ts Outdated
Comment thread web/packages/teleport/src/config.ts Outdated
- 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
Copy Markdown
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
@flyinghermit flyinghermit deleted the sshah/motd-ui branch June 16, 2023 03:01
@public-teleport-github-review-bot
Copy link
Copy Markdown

@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