Skip to content

Add tctl plugins install awsic#51239

Merged
tcsc merged 4 commits intomasterfrom
smallinsky/aws-ic-instal-plugin
Feb 19, 2025
Merged

Add tctl plugins install awsic#51239
tcsc merged 4 commits intomasterfrom
smallinsky/aws-ic-instal-plugin

Conversation

@smallinsky
Copy link
Copy Markdown
Contributor

@smallinsky smallinsky commented Jan 20, 2025

What

AWS CLI to install AWS IC plugin with local creds.

usage:

tctl plugins install awsic --token $(op read "op://Employee/AWS IC Teleport Identity Provider/token") --url https://scim.eu-north-1.amazonaws.com/.../scim/v2 --default-owner=marek --region=eu-north-1 --arn=arn:aws:sso:::instance/ssoins...

Depends-On: #52239

@tcsc tcsc force-pushed the smallinsky/aws-ic-instal-plugin branch from 5ca783d to 367ac0a Compare January 31, 2025 12:27
@tcsc tcsc marked this pull request as ready for review January 31, 2025 12:29
@github-actions github-actions Bot added size/md tctl tctl - Teleport admin tool labels Jan 31, 2025
@github-actions github-actions Bot requested review from Tener and ryanclark January 31, 2025 12:30
@tcsc tcsc self-assigned this Jan 31, 2025
@tcsc tcsc requested review from flyinghermit and kopiczko January 31, 2025 12:53
@tcsc tcsc added no-changelog Indicates that a PR does not require a changelog entry aws-iam-identity-center backport/branch/v17 labels Jan 31, 2025
Comment thread tool/tctl/common/plugin/awsic.go
},
}

_, err = args.plugins.CreatePlugin(ctx, req)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Don't we expose an API like we do with Okta? It would be nice to stop creating those plugins directly and start using the same API that the UI does

Copy link
Copy Markdown
Contributor

@tcsc tcsc Feb 11, 2025

Choose a reason for hiding this comment

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

I suspect that it would be the best way to provide the sort of extended validation that @flyinghermit is suggesting as well, which we really can't do right now because all of the requisite code is on teleport.e.

Copy link
Copy Markdown
Contributor Author

@smallinsky smallinsky left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@flyinghermit flyinghermit left a comment

Choose a reason for hiding this comment

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

Looks good, just a few comments to ensure cli installation handles default dependencies and validation that is on par with the plugin enrollment supported in the UI.

Comment thread tool/tctl/common/plugin/awsic.go Outdated
Comment thread tool/tctl/common/plugin/awsic.go Outdated
Comment thread tool/tctl/common/plugin/awsic.go Outdated
},
},
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

before installing plugin, I think we should check if saml service provider for the identity center is installed and guide user to do so if it isn't.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not sure what you mean - do you mean the SAML setup for Okta, or the SAML IdP for IC to call into?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I meant for the SAML IdP. Though I realized that this is not required for the use case we are trying to address for a customer, so my initial comment is somewhat invalid.

My new found concern here is that, once we release these CLI based integration configuration, although we specifically implemented this to one customer that wants to use system credential and defer auth to their IdP, it still gives chance for other customers to try this feature. In that case, they might end up in a bad state and we should avoid providing footgun where possible. For example, they might try integration with system credential but manage auth via SAML IdP.

Since we have no way to detect and prevent such usage, what do you think about adding a flag --no-saml-idp-auth (or something similar) to differentiate this behaviour. And if the --no-saml-idp-auth flag is NOT set, we check for SAML service provider.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not opposed in principal, but I think it would be better in a separate PR, mainly because I'd like a bit more time to think about the UX and I want to get this out the door.

But yeah, I can imagine some flags like

--[no-]saml-idp-auth              Configure the integration with/without a SAML Identity Provider service.  
--saml-idp-provider PROVIDER-NAME The name of the SAML IdP provider service to validate. Defaults to `whatever-actual-default-is`.

Comment thread tool/tctl/common/plugin/awsic.go Outdated
Comment thread tool/tctl/common/plugin/plugins_command.go
Comment thread tool/tctl/common/plugin/awsic.go Outdated
Comment thread tool/tctl/common/plugin/awsic.go Outdated
},
},
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I meant for the SAML IdP. Though I realized that this is not required for the use case we are trying to address for a customer, so my initial comment is somewhat invalid.

My new found concern here is that, once we release these CLI based integration configuration, although we specifically implemented this to one customer that wants to use system credential and defer auth to their IdP, it still gives chance for other customers to try this feature. In that case, they might end up in a bad state and we should avoid providing footgun where possible. For example, they might try integration with system credential but manage auth via SAML IdP.

Since we have no way to detect and prevent such usage, what do you think about adding a flag --no-saml-idp-auth (or something similar) to differentiate this behaviour. And if the --no-saml-idp-auth flag is NOT set, we check for SAML service provider.

Comment thread tool/tctl/common/plugin/awsic.go Outdated
Comment thread tool/tctl/common/plugin/plugins_command.go
Comment thread tool/tctl/common/plugin/awsic_test.go Outdated
@tcsc tcsc requested a review from kopiczko February 7, 2025 05:28
@tcsc tcsc enabled auto-merge February 7, 2025 13:10
Comment thread tool/common/labels.go Outdated
Comment thread tool/tctl/common/plugin/awsic.go Outdated
Comment thread tool/tctl/common/plugin/awsic.go Outdated
Comment thread tool/tctl/common/plugin/awsic.go Outdated
Comment thread tool/tctl/common/plugin/awsic.go Outdated
Comment thread tool/tctl/common/plugin/awsic.go Outdated
Comment thread tool/tctl/common/plugin/awsic.go Outdated
Comment thread tool/tctl/common/plugin/awsic_test.go Outdated
Comment thread tool/tctl/common/plugin/awsic_test.go Outdated
Comment thread tool/tctl/common/plugin/awsic_test.go Outdated
@tcsc tcsc requested a review from zmb3 February 10, 2025 05:01
@tcsc tcsc force-pushed the smallinsky/aws-ic-instal-plugin branch from 391330f to 8a691c7 Compare February 18, 2025 03:48
@tcsc tcsc changed the base branch from master to tcsc/aws-ic-move-validators February 18, 2025 03:50
auto-merge was automatically disabled February 18, 2025 03:50

Merge commits are not allowed on this repository

@tcsc tcsc force-pushed the tcsc/aws-ic-move-validators branch from 76383ea to 2031bf9 Compare February 19, 2025 01:24
@tcsc tcsc force-pushed the smallinsky/aws-ic-instal-plugin branch from 8a691c7 to 22fcfb5 Compare February 19, 2025 01:34
Base automatically changed from tcsc/aws-ic-move-validators to master February 19, 2025 03:09
Adds a comand-line installation tool for the AWS Identity Center integration.

Co-authored-by: Marek Smoliński <marek@goteleport.com>
Co-authored-by: Trent Clatke <trent@goteleport.com>
@tcsc tcsc force-pushed the smallinsky/aws-ic-instal-plugin branch from 22fcfb5 to da0cc30 Compare February 19, 2025 03:33
Comment thread lib/utils/aws/identitycenter/scim.go Outdated
Comment thread lib/utils/aws/identitycenter/scim.go Outdated
Comment thread tool/tctl/common/plugin/awsic.go Outdated
Comment thread lib/utils/aws/identitycenterutils/scim.go Outdated
tcsc and others added 2 commits February 20, 2025 09:08
@tcsc tcsc enabled auto-merge February 19, 2025 22:09
@tcsc tcsc added this pull request to the merge queue Feb 19, 2025
Merged via the queue into master with commit 8f02eb1 Feb 19, 2025
@tcsc tcsc deleted the smallinsky/aws-ic-instal-plugin branch February 19, 2025 22:51
@public-teleport-github-review-bot
Copy link
Copy Markdown

@smallinsky See the table below for backport results.

Branch Result
branch/v17 Failed

tcsc added a commit that referenced this pull request Feb 20, 2025
Backports #51239

Adds a comand-line installation tool for the AWS Identity Center integration.

Co-authored-by: Marek Smoliński <marek@goteleport.com>
Co-authored-by: Trent Clatke <trent@goteleport.com>
Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>

---------

Co-authored-by: Trent Clatke <trent@goteleport.com>
Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
github-merge-queue Bot pushed a commit that referenced this pull request Feb 20, 2025
Backports #51239

Adds a comand-line installation tool for the AWS Identity Center integration.





---------

Co-authored-by: Marek Smoliński <marek@goteleport.com>
Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aws-iam-identity-center backport/branch/v17 no-changelog Indicates that a PR does not require a changelog entry size/md tctl tctl - Teleport admin tool

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants