-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add Bot + GitHub Actions SSH UI Flow #37443
Merged
mcbattirola
merged 48 commits into
master
from
mcbattirola/machine-id--bot-creation-ui-3
Feb 8, 2024
Merged
Add Bot + GitHub Actions SSH UI Flow #37443
mcbattirola
merged 48 commits into
master
from
mcbattirola/machine-id--bot-creation-ui-3
Feb 8, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- in original data table view
michellescripts
force-pushed
the
michelle/bots
branch
4 times, most recently
from
January 29, 2024 22:05
f847102
to
46f7b2e
Compare
- in original data table view
michellescripts
force-pushed
the
michelle/bots
branch
from
January 29, 2024 22:48
46f7b2e
to
eef9c7a
Compare
…o mcbattirola/machine-id--bot-creation-ui-3
michellescripts
force-pushed
the
michelle/bots
branch
8 times, most recently
from
February 1, 2024 16:50
f33b15e
to
7671f0f
Compare
…tirola/machine-id--bot-creation-ui-3
…tirola/machine-id--bot-creation-ui-3
…tirola/machine-id--bot-creation-ui-3
strideynet
approved these changes
Feb 7, 2024
jimbishopp
approved these changes
Feb 7, 2024
public-teleport-github-review-bot
bot
removed request for
klizhentas,
r0mant,
timothyb89 and
michellescripts
February 7, 2024 17:17
michellescripts
added a commit
that referenced
this pull request
Feb 12, 2024
* add bots UI, disabled - in original data table view * Add bot creation UI * Remove duplicated types * add bots UI, disabled - in original data table view * Fix types and tests * Use bot join token api endpoint * Fix tests * Linting and small fixes * Fix tests * Add missing licenses * Improve styles, error messages, etc * Remove clusterId from bot routes * Undo enabling feature * Remove unused join role bot * Rename var * Reuse makeListBot * Add missing type * Revert MachineIDIntegrationSection for now * Lint * Apply suggestions from code review - fix typos Co-authored-by: Noah Stride <noah.stride@goteleport.com> * Remove kubernetes section fromm example yaml * Remove border color from reftype selector * Small changes to address code review * Use setAttempt * add try/catch block when parsing repo addresses * Improve tests;remove unecessary fragment * Use gap in flex. Fix typo * Lint fix * Drop "ex" from input placeholders * Add stories for no perm and bot picker * Add copy to explain wrkflow name limits * fix setCurentStep * Fix invalid host error rendering * Use PascalCase for error components * Improve field name validation * Remove unecessary comments * Update copy and minor style change --------- Co-authored-by: Michelle Bergquist <michelle.bergquist@goteleport.com> Co-authored-by: Noah Stride <noah.stride@goteleport.com>
michellescripts
added a commit
that referenced
this pull request
Feb 12, 2024
* add bots UI, disabled - in original data table view * Add bot creation UI * Remove duplicated types * add bots UI, disabled - in original data table view * Fix types and tests * Use bot join token api endpoint * Fix tests * Linting and small fixes * Fix tests * Add missing licenses * Improve styles, error messages, etc * Remove clusterId from bot routes * Undo enabling feature * Remove unused join role bot * Rename var * Reuse makeListBot * Add missing type * Revert MachineIDIntegrationSection for now * Lint * Apply suggestions from code review - fix typos Co-authored-by: Noah Stride <noah.stride@goteleport.com> * Remove kubernetes section fromm example yaml * Remove border color from reftype selector * Small changes to address code review * Use setAttempt * add try/catch block when parsing repo addresses * Improve tests;remove unecessary fragment * Use gap in flex. Fix typo * Lint fix * Drop "ex" from input placeholders * Add stories for no perm and bot picker * Add copy to explain wrkflow name limits * fix setCurentStep * Fix invalid host error rendering * Use PascalCase for error components * Improve field name validation * Remove unecessary comments * Update copy and minor style change --------- Co-authored-by: Michelle Bergquist <michelle.bergquist@goteleport.com> Co-authored-by: Noah Stride <noah.stride@goteleport.com>
michellescripts
added a commit
that referenced
this pull request
Feb 13, 2024
* add bots UI, disabled - in original data table view * Add bot creation UI * Remove duplicated types * add bots UI, disabled - in original data table view * Fix types and tests * Use bot join token api endpoint * Fix tests * Linting and small fixes * Fix tests * Add missing licenses * Improve styles, error messages, etc * Remove clusterId from bot routes * Undo enabling feature * Remove unused join role bot * Rename var * Reuse makeListBot * Add missing type * Revert MachineIDIntegrationSection for now * Lint * Apply suggestions from code review - fix typos Co-authored-by: Noah Stride <noah.stride@goteleport.com> * Remove kubernetes section fromm example yaml * Remove border color from reftype selector * Small changes to address code review * Use setAttempt * add try/catch block when parsing repo addresses * Improve tests;remove unecessary fragment * Use gap in flex. Fix typo * Lint fix * Drop "ex" from input placeholders * Add stories for no perm and bot picker * Add copy to explain wrkflow name limits * fix setCurentStep * Fix invalid host error rendering * Use PascalCase for error components * Improve field name validation * Remove unecessary comments * Update copy and minor style change --------- Co-authored-by: Michelle Bergquist <michelle.bergquist@goteleport.com> Co-authored-by: Noah Stride <noah.stride@goteleport.com>
michellescripts
added a commit
that referenced
this pull request
Feb 13, 2024
* add bots UI, disabled - in original data table view * Add bot creation UI * Remove duplicated types * add bots UI, disabled - in original data table view * Fix types and tests * Use bot join token api endpoint * Fix tests * Linting and small fixes * Fix tests * Add missing licenses * Improve styles, error messages, etc * Remove clusterId from bot routes * Undo enabling feature * Remove unused join role bot * Rename var * Reuse makeListBot * Add missing type * Revert MachineIDIntegrationSection for now * Lint * Apply suggestions from code review - fix typos Co-authored-by: Noah Stride <noah.stride@goteleport.com> * Remove kubernetes section fromm example yaml * Remove border color from reftype selector * Small changes to address code review * Use setAttempt * add try/catch block when parsing repo addresses * Improve tests;remove unecessary fragment * Use gap in flex. Fix typo * Lint fix * Drop "ex" from input placeholders * Add stories for no perm and bot picker * Add copy to explain wrkflow name limits * fix setCurentStep * Fix invalid host error rendering * Use PascalCase for error components * Improve field name validation * Remove unecessary comments * Update copy and minor style change --------- Co-authored-by: Michelle Bergquist <michelle.bergquist@goteleport.com> Co-authored-by: Noah Stride <noah.stride@goteleport.com>
michellescripts
added a commit
that referenced
this pull request
Feb 13, 2024
* add bots UI, disabled - in original data table view * Add bot creation UI * Remove duplicated types * add bots UI, disabled - in original data table view * Fix types and tests * Use bot join token api endpoint * Fix tests * Linting and small fixes * Fix tests * Add missing licenses * Improve styles, error messages, etc * Remove clusterId from bot routes * Undo enabling feature * Remove unused join role bot * Rename var * Reuse makeListBot * Add missing type * Revert MachineIDIntegrationSection for now * Lint * Apply suggestions from code review - fix typos Co-authored-by: Noah Stride <noah.stride@goteleport.com> * Remove kubernetes section fromm example yaml * Remove border color from reftype selector * Small changes to address code review * Use setAttempt * add try/catch block when parsing repo addresses * Improve tests;remove unecessary fragment * Use gap in flex. Fix typo * Lint fix * Drop "ex" from input placeholders * Add stories for no perm and bot picker * Add copy to explain wrkflow name limits * fix setCurentStep * Fix invalid host error rendering * Use PascalCase for error components * Improve field name validation * Remove unecessary comments * Update copy and minor style change --------- Co-authored-by: Michelle Bergquist <michelle.bergquist@goteleport.com> Co-authored-by: Noah Stride <noah.stride@goteleport.com>
michellescripts
added a commit
that referenced
this pull request
Feb 15, 2024
* add bots UI, disabled - in original data table view * Add bot creation UI * Remove duplicated types * add bots UI, disabled - in original data table view * Fix types and tests * Use bot join token api endpoint * Fix tests * Linting and small fixes * Fix tests * Add missing licenses * Improve styles, error messages, etc * Remove clusterId from bot routes * Undo enabling feature * Remove unused join role bot * Rename var * Reuse makeListBot * Add missing type * Revert MachineIDIntegrationSection for now * Lint * Apply suggestions from code review - fix typos Co-authored-by: Noah Stride <noah.stride@goteleport.com> * Remove kubernetes section fromm example yaml * Remove border color from reftype selector * Small changes to address code review * Use setAttempt * add try/catch block when parsing repo addresses * Improve tests;remove unecessary fragment * Use gap in flex. Fix typo * Lint fix * Drop "ex" from input placeholders * Add stories for no perm and bot picker * Add copy to explain wrkflow name limits * fix setCurentStep * Fix invalid host error rendering * Use PascalCase for error components * Improve field name validation * Remove unecessary comments * Update copy and minor style change --------- Co-authored-by: Michelle Bergquist <michelle.bergquist@goteleport.com> Co-authored-by: Noah Stride <noah.stride@goteleport.com>
michellescripts
added a commit
that referenced
this pull request
Feb 15, 2024
* add bots UI, disabled - in original data table view * Add bot creation UI * Remove duplicated types * add bots UI, disabled - in original data table view * Fix types and tests * Use bot join token api endpoint * Fix tests * Linting and small fixes * Fix tests * Add missing licenses * Improve styles, error messages, etc * Remove clusterId from bot routes * Undo enabling feature * Remove unused join role bot * Rename var * Reuse makeListBot * Add missing type * Revert MachineIDIntegrationSection for now * Lint * Apply suggestions from code review - fix typos Co-authored-by: Noah Stride <noah.stride@goteleport.com> * Remove kubernetes section fromm example yaml * Remove border color from reftype selector * Small changes to address code review * Use setAttempt * add try/catch block when parsing repo addresses * Improve tests;remove unecessary fragment * Use gap in flex. Fix typo * Lint fix * Drop "ex" from input placeholders * Add stories for no perm and bot picker * Add copy to explain wrkflow name limits * fix setCurentStep * Fix invalid host error rendering * Use PascalCase for error components * Improve field name validation * Remove unecessary comments * Update copy and minor style change --------- Co-authored-by: Michelle Bergquist <michelle.bergquist@goteleport.com> Co-authored-by: Noah Stride <noah.stride@goteleport.com>
michellescripts
added a commit
that referenced
this pull request
Feb 16, 2024
* add bots UI, disabled - in original data table view * Add bot creation UI * Remove duplicated types * add bots UI, disabled - in original data table view * Fix types and tests * Use bot join token api endpoint * Fix tests * Linting and small fixes * Fix tests * Add missing licenses * Improve styles, error messages, etc * Remove clusterId from bot routes * Undo enabling feature * Remove unused join role bot * Rename var * Reuse makeListBot * Add missing type * Revert MachineIDIntegrationSection for now * Lint * Apply suggestions from code review - fix typos Co-authored-by: Noah Stride <noah.stride@goteleport.com> * Remove kubernetes section fromm example yaml * Remove border color from reftype selector * Small changes to address code review * Use setAttempt * add try/catch block when parsing repo addresses * Improve tests;remove unecessary fragment * Use gap in flex. Fix typo * Lint fix * Drop "ex" from input placeholders * Add stories for no perm and bot picker * Add copy to explain wrkflow name limits * fix setCurentStep * Fix invalid host error rendering * Use PascalCase for error components * Improve field name validation * Remove unecessary comments * Update copy and minor style change --------- Co-authored-by: Michelle Bergquist <michelle.bergquist@goteleport.com> Co-authored-by: Noah Stride <noah.stride@goteleport.com>
michellescripts
added a commit
that referenced
this pull request
Feb 16, 2024
* add bots UI, disabled - in original data table view * Add bot creation UI * Remove duplicated types * add bots UI, disabled - in original data table view * Fix types and tests * Use bot join token api endpoint * Fix tests * Linting and small fixes * Fix tests * Add missing licenses * Improve styles, error messages, etc * Remove clusterId from bot routes * Undo enabling feature * Remove unused join role bot * Rename var * Reuse makeListBot * Add missing type * Revert MachineIDIntegrationSection for now * Lint * Apply suggestions from code review - fix typos Co-authored-by: Noah Stride <noah.stride@goteleport.com> * Remove kubernetes section fromm example yaml * Remove border color from reftype selector * Small changes to address code review * Use setAttempt * add try/catch block when parsing repo addresses * Improve tests;remove unecessary fragment * Use gap in flex. Fix typo * Lint fix * Drop "ex" from input placeholders * Add stories for no perm and bot picker * Add copy to explain wrkflow name limits * fix setCurentStep * Fix invalid host error rendering * Use PascalCase for error components * Improve field name validation * Remove unecessary comments * Update copy and minor style change --------- Co-authored-by: Michelle Bergquist <michelle.bergquist@goteleport.com> Co-authored-by: Noah Stride <noah.stride@goteleport.com>
github-merge-queue bot
pushed a commit
that referenced
this pull request
Feb 16, 2024
* Add endpoint to get bots by name (#37412) * Add endpoint to get bots by name * Lint * Fix test method's name Co-authored-by: Noah Stride <noah.stride@goteleport.com> --------- Co-authored-by: Noah Stride <noah.stride@goteleport.com> * Backend supporting changes for Bot creation flow (#37348) * Add bot ui labels and github join token * Use strings.HasPrefix instead of includes * Add `ssh` to label * Add bot join token endpoint * Lint * Fix comment typo Co-authored-by: Bartosz Leper <bartosz.leper@goteleport.com> * Fix comment typo Co-authored-by: Bartosz Leper <bartosz.leper@goteleport.com> * Improve webUIFlowLabelKey comment --------- Co-authored-by: Bartosz Leper <bartosz.leper@goteleport.com> * add bots UI, disabled (#36845) - in original data table view * Add Bot + GitHub Actions SSH UI Flow (#37443) * add bots UI, disabled - in original data table view * Add bot creation UI * Remove duplicated types * add bots UI, disabled - in original data table view * Fix types and tests * Use bot join token api endpoint * Fix tests * Linting and small fixes * Fix tests * Add missing licenses * Improve styles, error messages, etc * Remove clusterId from bot routes * Undo enabling feature * Remove unused join role bot * Rename var * Reuse makeListBot * Add missing type * Revert MachineIDIntegrationSection for now * Lint * Apply suggestions from code review - fix typos Co-authored-by: Noah Stride <noah.stride@goteleport.com> * Remove kubernetes section fromm example yaml * Remove border color from reftype selector * Small changes to address code review * Use setAttempt * add try/catch block when parsing repo addresses * Improve tests;remove unecessary fragment * Use gap in flex. Fix typo * Lint fix * Drop "ex" from input placeholders * Add stories for no perm and bot picker * Add copy to explain wrkflow name limits * fix setCurentStep * Fix invalid host error rendering * Use PascalCase for error components * Improve field name validation * Remove unecessary comments * Update copy and minor style change --------- Co-authored-by: Michelle Bergquist <michelle.bergquist@goteleport.com> Co-authored-by: Noah Stride <noah.stride@goteleport.com> * add bot edit-role flow (#37828) * add bot edit-role flow * only send masked/updated fields * Add GitHub Actions bot view (#37852) * add bots UI, disabled - in original data table view * Add bot creation UI * Remove duplicated types * add bots UI, disabled - in original data table view * Fix types and tests * Use bot join token api endpoint * Fix tests * Linting and small fixes * Fix tests * Add missing licenses * Improve styles, error messages, etc * Remove clusterId from bot routes * Undo enabling feature * Remove unused join role bot * Rename var * Reuse makeListBot * Add missing type * Revert MachineIDIntegrationSection for now * Lint * Apply suggestions from code review - fix typos Co-authored-by: Noah Stride <noah.stride@goteleport.com> * Remove kubernetes section fromm example yaml * Remove border color from reftype selector * Small changes to address code review * Use setAttempt * add try/catch block when parsing repo addresses * Improve tests;remove unecessary fragment * Use gap in flex. Fix typo * Lint fix * Drop "ex" from input placeholders * Add stories for no perm and bot picker * Add copy to explain wrkflow name limits * fix setCurentStep * Fix invalid host error rendering * Use PascalCase for error components * Improve field name validation * Remove unecessary comments * Add bot type by label * Add bot view... * Show view gh actions yaml only for gh bots * Use existing pattern for operations * Add story and missing license * Fix typos Co-authored-by: Michelle Bergquist <11967646+michellescripts@users.noreply.github.com> --------- Co-authored-by: Michelle Bergquist <michelle.bergquist@goteleport.com> Co-authored-by: Noah Stride <noah.stride@goteleport.com> Co-authored-by: Michelle Bergquist <11967646+michellescripts@users.noreply.github.com> * Add buttons to download and copy to clipboard content to `TextEditor` (#37333) * Add editor buttons * Set icon size * Move downloadObject to OSS * remove unused test-id * Use values from theme * Fix buttons positioning * Convert jsx files to tsx * Use const instead of var * Add z-index to buttons * Add license * Improvements to Bot resource (additional validation and label propagation) (#38013) * PRevent creating bots with an empty string role * Propagate labels to Bot user and vice versa * Extract slice declaration for nonPropagatedLabels * Fixed web tests relying on empty string roles * Use "set" instead of slice for nonPropagatedLabels * Make testing of empty string handling more thorough * add role assertions to create * Appease linter as to want/got order --------- Co-authored-by: Michelle Bergquist <michelle.bergquist@goteleport.com> * Add bot permissions and turn on feature (#37943) * Fix makeBot labels (#38176) --------- Co-authored-by: matheus <matheus.battirola@goteleport.com> Co-authored-by: Noah Stride <noah.stride@goteleport.com> Co-authored-by: Bartosz Leper <bartosz.leper@goteleport.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a new UI Flow to add Machine ID Bots through a GitHub Actions join token.
The flow is under the disabled new Bots page, added in #36845.
Since we expect new bot integration flows to be added in the future, I've added a
shared
folder to host components that will be reused by multiple flows (similar to how we organize Discover code).The page
Enroll New Integration
has a section for Machine ID that is mostly replicated in this PR. I've implemented the new section with the intent of reusing it, but since this feature is disabled for now, I'm keeping the oldMachineIDIntegrationSection
component to prevent linking to the new flow. See this PR where I reverted to the original component to see what it will look like.(~800 changes are due to story/tests)
demo:
bot-ui.mp4
Testing
The best way to test is to edit the
FeatureBots
sohasAccess
returns true. This will enable the Bots page, and allow you to go through the UI flow via theEnroll New Bot
button.If you run teleport enterprise, make sure you have this patch https://github.com/gravitational/teleport.e/pull/3356