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

AWS OIDC: CreateEICE service #38548

Merged
merged 1 commit into from
Feb 28, 2024
Merged

Conversation

marcoandredinis
Copy link
Contributor

This PR creates a new method on the AWS OIDC gRPC service that deploys multiple EC2 Instance Connect Endpoints.

This is part of a refactor that moves the API calls behind the Auth Service.

Context: #37245

@marcoandredinis marcoandredinis added backport/branch/v14 no-changelog Indicates that a PR does not require a changelog entry backport/branch/v15 labels Feb 22, 2024
@github-actions github-actions bot requested review from fheinecke and r0mant February 22, 2024 15:53
@fheinecke
Copy link
Contributor

@marcoandredinis am I the appropriate person to review this? I can review the general Go code/implementation itself, but I don't know anything about this work or how Teleport handles auth.

@marcoandredinis
Copy link
Contributor Author

I'll let bot pick a new set of reviewers 👍

@marcoandredinis marcoandredinis removed the request for review from fheinecke February 22, 2024 17:41
@marcoandredinis marcoandredinis marked this pull request as draft February 22, 2024 17:41
@marcoandredinis marcoandredinis marked this pull request as ready for review February 22, 2024 17:41
@marcoandredinis marcoandredinis force-pushed the marco/awsoidc-grpc-deployeice branch from e6c53bd to 1d5afbd Compare February 23, 2024 18:21
Comment on lines +259 to +261
if err := authCtx.CheckAccessToKind(types.KindIntegration, types.VerbUse); err != nil {
return nil, trace.Wrap(err)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this granular enough? I think as is, if the client can use any integration, they are allowed to create EICE endpoints?

I assume this will be called by the proxy which basically needs to be able to use any integration for now, but as we add new integrations I think it would be nice to give admins the power to restrict users to specific integrations something like

allow:
  rules:
    resources: [integration]
    verbs: [use]
    where: 'name == "example-integration"'

I'll approve this PR since it's kind of tangential and there's already other endpoints that do the same, but I think it would be best to add server-side checking for this as early as we can so that supported auth versions are likely to check the where expressions whenever we eventually want to use them

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Totally agreed 👍
This was discussed in the RFD but we ended up with the most simple approach.
Even the use verb was not consensual.
#24256 (comment)

Honestly, I think we need to go even further.
We should support integration names and even integration actions.
To expand on your example:

allow:
  rules:
    resources: [integration]
    verbs: [use]
    where: 'name == "example-integration" && action == "awsoidc-create-eice"'

I also agree that this PR should not be the one introducing that.
I'll keep this topic under my radar and possibly come up with a proposal.

@marcoandredinis marcoandredinis force-pushed the marco/awsoidc-grpc-deployeice branch from 1d5afbd to bf10f8e Compare February 28, 2024 09:25
This PR creates a new method on the AWS OIDC gRPC service that deploys
multiple EC2 Instance Connect Endpoints.

This is part of a refactor that moves the API calls behind the Auth
Service.
@marcoandredinis marcoandredinis force-pushed the marco/awsoidc-grpc-deployeice branch from bf10f8e to b75a4c4 Compare February 28, 2024 15:36
@marcoandredinis marcoandredinis added this pull request to the merge queue Feb 28, 2024
Merged via the queue into master with commit dd84c87 Feb 28, 2024
37 checks passed
@marcoandredinis marcoandredinis deleted the marco/awsoidc-grpc-deployeice branch February 28, 2024 16:10
@public-teleport-github-review-bot

@marcoandredinis See the table below for backport results.

Branch Result
branch/v14 Failed
branch/v15 Failed

marcoandredinis added a commit that referenced this pull request Feb 28, 2024
This PR creates a new method on the AWS OIDC gRPC service that deploys
multiple EC2 Instance Connect Endpoints.

This is part of a refactor that moves the API calls behind the Auth
Service.
marcoandredinis added a commit that referenced this pull request Feb 28, 2024
This PR creates a new method on the AWS OIDC gRPC service that deploys
multiple EC2 Instance Connect Endpoints.

This is part of a refactor that moves the API calls behind the Auth
Service.
github-merge-queue bot pushed a commit that referenced this pull request Feb 28, 2024
* AWS OIDC: List SecurityGroups service

This PR creates a new method on the AWS OIDC gRPC service that lists
SecurityGroups.

This is part of a refactor that moves the API calls behind the Auth
Service.

* AWS OIDC: List EC2 service (#38326)

This PR creates a new method on the AWS OIDC gRPC service that lists ec2
instances as Teleport Nodes.

This is part of a refactor that moves the API calls behind the Auth
Service.

* AWS OIDC: List EICE service (#38332)

* AWS OIDC: List EICE service

This PR creates a new method on the AWS OIDC gRPC service that lists ec2
instance connect endpoints.

This is part of a refactor that moves the API calls behind the Auth
Service.

* add required fields and aws api ref

* add test

* AWS OIDC: DeployService service (#38511)

* AWS OIDC: DeployService service

This PR creates a new method on the AWS OIDC gRPC service that deploys
an ECS Service.

This is part of a refactor that moves the API calls behind the Auth
Service.

* add rbac test and rename teleport config string

* revert e

* AWS OIDC: CreateEICE service (#38548)

This PR creates a new method on the AWS OIDC gRPC service that deploys
multiple EC2 Instance Connect Endpoints.

This is part of a refactor that moves the API calls behind the Auth
Service.

* AWS OIDC: List EKS Clusters service (#38440)

* AWS OIDC: List EKS Clusters service

This PR creates a new method on the AWS OIDC gRPC service that lists eks
clusters.

This is part of a refactor that moves the API calls behind the Auth
Service.

* doc pb

* AWS OIDC: Move enrollment of EKS clusters to the gRPC service. (#38683)

This PR creates a new method on the AWS OIDC gRPC service that enrolls EKS clusters.

This is part of a refactor that moves the API calls behind the Auth Service.

---------

Co-authored-by: Anton Miniailo <anton@goteleport.com>
github-merge-queue bot pushed a commit that referenced this pull request Feb 28, 2024
* AWS OIDC: List SecurityGroups service

This PR creates a new method on the AWS OIDC gRPC service that lists
SecurityGroups.

This is part of a refactor that moves the API calls behind the Auth
Service.

* AWS OIDC: List EC2 service (#38326)

This PR creates a new method on the AWS OIDC gRPC service that lists ec2
instances as Teleport Nodes.

This is part of a refactor that moves the API calls behind the Auth
Service.

* AWS OIDC: List EICE service (#38332)

* AWS OIDC: List EICE service

This PR creates a new method on the AWS OIDC gRPC service that lists ec2
instance connect endpoints.

This is part of a refactor that moves the API calls behind the Auth
Service.

* add required fields and aws api ref

* add test

* AWS OIDC: DeployService service (#38511)

* AWS OIDC: DeployService service

This PR creates a new method on the AWS OIDC gRPC service that deploys
an ECS Service.

This is part of a refactor that moves the API calls behind the Auth
Service.

* add rbac test and rename teleport config string

* revert e

* AWS OIDC: CreateEICE service (#38548)

This PR creates a new method on the AWS OIDC gRPC service that deploys
multiple EC2 Instance Connect Endpoints.

This is part of a refactor that moves the API calls behind the Auth
Service.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/branch/v14 backport/branch/v15 no-changelog Indicates that a PR does not require a changelog entry size/sm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants