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

tsh: Deduplicate the list of request IDs #46780

Merged
merged 3 commits into from
Oct 2, 2024

Conversation

zmb3
Copy link
Collaborator

@zmb3 zmb3 commented Sep 19, 2024

It's possible to specify the same request multiple times with tsh request create. The duplicates eventually get resolved before we generate a certificate, but they do exist in the access request resource. This can cause the size of the resource to exceed the limits of a gRPC message and break listing.

(I also squeezed in some non-functional changes to the tsh tests as the mix of tabs and spaces was bothering me)

@zmb3 zmb3 requested a review from nklaassen September 19, 2024 19:50
@github-actions github-actions bot added size/sm tsh tsh - Teleport's command line tool for logging into nodes running Teleport. labels Sep 19, 2024
Copy link

The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with changelog: followed by the changelog entries for the PR.

tool/tsh/common/tsh.go Outdated Show resolved Hide resolved
@zmb3 zmb3 force-pushed the zmb3/deduplicate-resource-requests branch from 3705873 to 07dbfd4 Compare September 19, 2024 20:09
Copy link

The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with changelog: followed by the changelog entries for the PR.

@zmb3 zmb3 force-pushed the zmb3/deduplicate-resource-requests branch from 07dbfd4 to 9abd42e Compare September 20, 2024 21:23
Copy link

The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with changelog: followed by the changelog entries for the PR.

Copy link

github-actions bot commented Oct 2, 2024

The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with changelog: followed by the changelog entries for the PR.

@zmb3 zmb3 force-pushed the zmb3/deduplicate-resource-requests branch from 6277769 to 3fc59a5 Compare October 2, 2024 16:13
Copy link

github-actions bot commented Oct 2, 2024

The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with changelog: followed by the changelog entries for the PR.

@zmb3 zmb3 added the no-changelog Indicates that a PR does not require a changelog entry label Oct 2, 2024
lib/services/access_request.go Outdated Show resolved Hide resolved
zmb3 added 3 commits October 2, 2024 15:16
It's possible to specify the same request multiple times with
tsh request create. The duplicates eventually get resolved before
we generate a certificate, but they do exist in the access request
resource. This can cause the size of the resource to exceed the
limits of a gRPC message and break listing.
@zmb3 zmb3 force-pushed the zmb3/deduplicate-resource-requests branch from 9c069a9 to 86a4573 Compare October 2, 2024 21:17
@zmb3 zmb3 added this pull request to the merge queue Oct 2, 2024
Merged via the queue into master with commit 8420092 Oct 2, 2024
41 checks passed
@zmb3 zmb3 deleted the zmb3/deduplicate-resource-requests branch October 2, 2024 22:01
@public-teleport-github-review-bot

@zmb3 See the table below for backport results.

Branch Result
branch/v15 Failed
branch/v16 Create PR

zmb3 added a commit that referenced this pull request Oct 29, 2024
In #46780 we put a cap on the total number of resources that can
be requested in a single request, which helps avoid situations
where a large access request can exceed resource size limits and
break request listing.

This change expands on the validations by also checking that the sum
of the lengths of all of the requested IDs stays below a reasonable
limit.
zmb3 added a commit that referenced this pull request Oct 29, 2024
In #46780 we put a cap on the total number of resources that can
be requested in a single request, which helps avoid situations
where a large access request can exceed resource size limits and
break request listing.

This change expands on the validations by also checking that the sum
of the lengths of all of the requested IDs stays below a reasonable
limit.
github-merge-queue bot pushed a commit that referenced this pull request Oct 30, 2024
In #46780 we put a cap on the total number of resources that can
be requested in a single request, which helps avoid situations
where a large access request can exceed resource size limits and
break request listing.

This change expands on the validations by also checking that the sum
of the lengths of all of the requested IDs stays below a reasonable
limit.
github-actions bot pushed a commit that referenced this pull request Oct 30, 2024
In #46780 we put a cap on the total number of resources that can
be requested in a single request, which helps avoid situations
where a large access request can exceed resource size limits and
break request listing.

This change expands on the validations by also checking that the sum
of the lengths of all of the requested IDs stays below a reasonable
limit.
github-actions bot pushed a commit that referenced this pull request Oct 30, 2024
In #46780 we put a cap on the total number of resources that can
be requested in a single request, which helps avoid situations
where a large access request can exceed resource size limits and
break request listing.

This change expands on the validations by also checking that the sum
of the lengths of all of the requested IDs stays below a reasonable
limit.
github-merge-queue bot pushed a commit that referenced this pull request Nov 1, 2024
In #46780 we put a cap on the total number of resources that can
be requested in a single request, which helps avoid situations
where a large access request can exceed resource size limits and
break request listing.

This change expands on the validations by also checking that the sum
of the lengths of all of the requested IDs stays below a reasonable
limit.
github-merge-queue bot pushed a commit that referenced this pull request Nov 1, 2024
In #46780 we put a cap on the total number of resources that can
be requested in a single request, which helps avoid situations
where a large access request can exceed resource size limits and
break request listing.

This change expands on the validations by also checking that the sum
of the lengths of all of the requested IDs stays below a reasonable
limit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/branch/v15 backport/branch/v16 no-changelog Indicates that a PR does not require a changelog entry size/sm tsh tsh - Teleport's command line tool for logging into nodes running Teleport.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants