Web: Add auto enrolling capabilities to RDS discover flow#35646
Web: Add auto enrolling capabilities to RDS discover flow#35646
Conversation
gzdunek
left a comment
There was a problem hiding this comment.
First pass. I will try to test it tomorrow.
|
@gzdunek this PR isn't ready for testing, ran into some issues (or rather there are some things missing) i'm debating keeping this PR as is, and create another PR based on this to complete, since this PR is already kinda noisy. |
| function onProceed(traitOpts: Partial<Record<Trait, Option[]>>) { | ||
| switch (props.resourceSpec.kind) { | ||
| function onProceed( | ||
| traitOpts: Partial<Record<Trait, Option[]>>, |
There was a problem hiding this comment.
yeah for each case we are partially (depending on resource) updating the fields defined here:
// UserTraits contain fields that define traits for local accounts.
export interface UserTraits {
// logins is the list of logins that this user is allowed to
// start SSH sessions with.
logins: string[];
// databaseUsers is the list of db usernames that this user is
// allowed to open db connections as.
databaseUsers: string[];
// databaseNames is the list of db names that this user can connect to.
databaseNames: string[];
// kubeUsers is the list of allowed kube logins.
kubeUsers: string[];
// kubeGroups is the list of allowed kube groups for a kube cluster.
kubeGroups: string[];
// windowsLogins is the list of logins that this user
// is allowed to start desktop sessions.
windowsLogins: string[];
// awsRoleArns is a list of aws roles this user is allowed to assume.
awsRoleArns: string[];
}
In that case, I think it makes sense to create another PR. |
637f7ad to
b29558c
Compare
bbc4604 to
66c1518
Compare
|
@ryanclark @gzdunek this is ready for another look. i decided to keep it all in one PR (it wasn't that much extra work, but maybe i'm just kidding myself...) it's not ready to test yet since the backend portion is still WIP and i'm so sorry that this PR became so noisy 😓 new parts starts with this commit: 4d4a30d |
|
drafted, another iteration requires changing some things again |
d4731ab to
145144a
Compare
|
@gzdunek this is finally read for review. if you are interested in e2e testing, i have a cluster set up for it just ping me you can also click around stories too, relavant stories: http://127.0.0.1:9002/?path=/story/teleport-discover-database-enrollrds--instance-list-for-cloud e2e loom: https://www.loom.com/share/c68f402633134ca8be089ea01ac809d4?sid=fccb5441-c25c-4384-931e-203cdc166d2a |
gzdunek
left a comment
There was a problem hiding this comment.
The code generally looks good.
this is finally read for review. if you are interested in e2e testing, i have a cluster set up for it just ping me
Yeah, I'd like to test it!
- Existing traits is not made editable - Minor refactor: pull data from useDiscover context
Refactor setup access story
- When enrolling and opting for auto discovery, we need to first collect all missing vpcs to determine if its required to deploy database agents, and then create a discovery config for a discovery service - When auto deploying and opting for auto discovery, it is out scope for this iteration to allow user to define custom labels, select security groups, and "wait" for deploying all services to finish. Instead after deploy request is finished, we render a box that tells user it will take a minute to finish deploying and give a AWS dashboard link to view progress - Setup access screen is the final step (skip test connection) and we render how to setup access for both mysql and postgres since auto discovery discovers all supported engine types.
5e744a4 to
13f4b14
Compare
13f4b14 to
f4b4bcb
Compare
|
ping @ryanclark |
* Add discovery config endpoint * Add autoDiscoveryConfig field to meta * Hide custom label for auto discover * Pull out re-usable parts for storybook fixture * Only allow adding new traits when auto-enrolling - Existing traits is not made editable - Minor refactor: pull data from useDiscover context * Auto select integration if only one result * Skip test connection when auto enrolling Refactor setup access story * Add auto enroll toggler * Create finish component for auto discover * Add more disabled row states * Add clarifying notes * Address CRs * Finish auto discovery - When enrolling and opting for auto discovery, we need to first collect all missing vpcs to determine if its required to deploy database agents, and then create a discovery config for a discovery service - When auto deploying and opting for auto discovery, it is out scope for this iteration to allow user to define custom labels, select security groups, and "wait" for deploying all services to finish. Instead after deploy request is finished, we render a box that tells user it will take a minute to finish deploying and give a AWS dashboard link to view progress - Setup access screen is the final step (skip test connection) and we render how to setup access for both mysql and postgres since auto discovery discovers all supported engine types. * Address CR
…) (#36434) * Web: Add auto enrolling capabilities to RDS discover flow (#35646) * Add discovery config endpoint * Add autoDiscoveryConfig field to meta * Hide custom label for auto discover * Pull out re-usable parts for storybook fixture * Only allow adding new traits when auto-enrolling - Existing traits is not made editable - Minor refactor: pull data from useDiscover context * Auto select integration if only one result * Skip test connection when auto enrolling Refactor setup access story * Add auto enroll toggler * Create finish component for auto discover * Add more disabled row states * Add clarifying notes * Address CRs * Finish auto discovery - When enrolling and opting for auto discovery, we need to first collect all missing vpcs to determine if its required to deploy database agents, and then create a discovery config for a discovery service - When auto deploying and opting for auto discovery, it is out scope for this iteration to allow user to define custom labels, select security groups, and "wait" for deploying all services to finish. Instead after deploy request is finished, we render a box that tells user it will take a minute to finish deploying and give a AWS dashboard link to view progress - Setup access screen is the final step (skip test connection) and we render how to setup access for both mysql and postgres since auto discovery discovers all supported engine types. * Address CR * Update straggling test * Web: Support auto discovery for self-hosted (#36027) * Web: Support auto discovery for self-hosted * Move doc instructions into web UI * fix test
part of #35434
requires
recommend reviewing by commit
(the toggler is pretty bad, it blends in with the background, i am working to update the design)(after xmas breka)self-hosted, we show a user a link to start a discovery service on their own for now(in another PR)e2e testing in cloud staging:
https://www.loom.com/share/c68f402633134ca8be089ea01ac809d4?sid=fccb5441-c25c-4384-931e-203cdc166d2a
relevant stories:
http://127.0.0.1:9002/?path=/story/teleport-discover-database-enrollrds--instance-list-for-cloud
http://127.0.0.1:9002/?path=/story/teleport-discover-database-setupaccess--with-traits-aws-postgres-auto-enroll
http://127.0.0.1:9002/?path=/story/teleport-discover-database-deploy-auto--init-with-auto-enroll
changelog: Add auto-enrolling capabilities to RDS discover flow in the web UI