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

Instrument LambdaHandler's' convert_event function #2684

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

david-perez
Copy link
Contributor

This would have come in handy when debugging #2676.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

This would have come in handy when debugging #2676.
@david-perez david-perez added the server Rust server SDK label May 9, 2023
@david-perez david-perez requested a review from a team as a code owner May 9, 2023 14:54
@github-actions
Copy link

github-actions bot commented May 9, 2023

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

Copy link
Contributor

@hlbarber hlbarber left a comment

Choose a reason for hiding this comment

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

On second thought, the URI here could be sensitive. So perhaps we shouldn't log it?

@david-perez
Copy link
Contributor Author

Let's change it so that the URI is logged only when the feature unredacted-logging is enabled.

@hlbarber
Copy link
Contributor

hlbarber commented Jun 5, 2023

Let's change it so that the URI is logged only when the feature unredacted-logging is enabled.

An alternative here is that we create a wrapper which is the union of all redactions that can be applied prior to routing. e.g. if operation A had path segment 0 sensitive and operation B had path segment 1 sensitive then prior to routing we redact both 0 and 1.

@david-perez
Copy link
Contributor Author

That would be tricky to implement correctly; it wouldn't be as simple as maintaining a list of indices on sensitive path segments, since greedy labels can capture a different number of path segments each time.

@hlbarber
Copy link
Contributor

hlbarber commented Jun 8, 2023

since greedy labels can capture a different number of path segments each time

Isn't the join of two greedy labels the component wise min over the arguments segment_index, end_offset?

Looking over the API, I think this is doable without much hassle.

@david-perez
Copy link
Contributor Author

Yes that would work. E.g. with the two patterns:

  1. /prefix/{greedy1+}/suffix
  2. /{greedy2+}/foo-bar-baz

where the greedy1 and greedy2 labels are bound to @sensitive shapes, we get a component wise minimum of:

GreedyLabel {
    segment_index: 0,
    end_of_offset: 7,
}

So upon receiving a request URI like /bound/to/greedy2/foo-bar-baz, we'd only be able to print something like /<redacted+>/<redacted>bar-baz, which is a bit weird.

@rcoh rcoh requested a review from a team as a code owner November 14, 2023 02:21
@jmklix jmklix closed this Apr 12, 2024
@david-perez david-perez reopened this Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
server Rust server SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants