Skip to content

Conversation

@andreachild
Copy link
Contributor

Updated SigV4 interceptor to use the latest version of software.amazon.awssdk and removed old dependency on aws-java-sdk-core. Since latest version of SignedRequest has headers that support multiple values for the same header via Map<String,List> I added validation checks that the expected signed headers only have 1 value.

@codecov-commenter
Copy link

codecov-commenter commented Nov 4, 2024

Codecov Report

Attention: Patch coverage is 86.95652% with 6 lines in your changes missing coverage. Please review.

Project coverage is 77.87%. Comparing base (2d32517) to head (cfd6889).
Report is 522 commits behind head on master.

Files with missing lines Patch % Lines
...rg/apache/tinkerpop/gremlin/driver/auth/Sigv4.java 86.95% 2 Missing and 4 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2884      +/-   ##
============================================
+ Coverage     76.16%   77.87%   +1.70%     
- Complexity    13170    13578     +408     
============================================
  Files          1085     1015      -70     
  Lines         65189    59308    -5881     
  Branches       7289     6835     -454     
============================================
- Hits          49651    46184    -3467     
+ Misses        12830    10817    -2013     
+ Partials       2708     2307     -401     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

private static final String SERVICE_NAME = "service-name";
private static final byte[] REQUEST_BODY = "{\"gremlin\":\"2-1\"}".getBytes(StandardCharsets.UTF_8);
private static final String HOST = "localhost";
private static final String URI_WITH_QUERY_PARAMS = "http://" + HOST + ":8182?a=1&b=2";
Copy link
Contributor

Choose a reason for hiding this comment

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

This is OK for testing, but technically the TinkerPop HTTP API doesn't allow for query params. The /gremlin endpoint only accepts the request as a POST body.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added query params here for testing because the original sigv4 code has logic to extract and set the query params - should that be removed?

@kenhuuu
Copy link
Contributor

kenhuuu commented Nov 4, 2024

VOTE +1

1 similar comment
@Cole-Greer
Copy link
Contributor

VOTE +1

…n.awssdk and removed old dependency on aws-java-sdk-core. Since latest version of SignedRequest has headers that support multiple values for the same header via Map<String,List> I added validation checks that the expected signed headers only have 1 value. Removed jackson dependency from gremlin-console as it is no longer needed.
@andreachild andreachild force-pushed the achild/master-http-final-sigv4 branch from d863209 to cfd6889 Compare November 4, 2024 22:07
@xiazcy
Copy link
Contributor

xiazcy commented Nov 4, 2024

VOTE +1

@kenhuuu kenhuuu deleted the branch apache:master November 4, 2024 23:17
@kenhuuu kenhuuu closed this Nov 4, 2024
@Cole-Greer Cole-Greer reopened this Nov 4, 2024
@Cole-Greer Cole-Greer changed the base branch from master-http-final to master November 4, 2024 23:20
@kenhuuu kenhuuu merged commit 6662336 into apache:master Nov 4, 2024
29 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants