Skip to content

Conversation

@benjsto
Copy link
Contributor

@benjsto benjsto commented Apr 19, 2021

Problem

For testing signature validation code in other places, it's nice to be able to easily generate signatures. The prior way of doing this involved setting up a test service, making a request to it, and inspecting the request headers between SSO and the upstream to get the signature.

Solution

Make a little command line tool within sso-proxy that takes URL, body, and headers to generate a request signature using the request-signer.

…reating test data/fixtures or testing signature validation code.
@benjsto benjsto self-assigned this Apr 19, 2021
@benjsto benjsto changed the title sos-proxy: command line tool to generate request signatures sso-proxy: command line tool to generate request signatures Apr 19, 2021
@benjsto benjsto requested a review from Jusshersmith April 19, 2021 16:14
@codecov
Copy link

codecov bot commented Apr 19, 2021

Codecov Report

Merging #303 (acf2dae) into master (348c2fc) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #303   +/-   ##
=======================================
  Coverage   62.73%   62.73%           
=======================================
  Files          58       58           
  Lines        4286     4286           
=======================================
  Hits         2689     2689           
  Misses       1382     1382           
  Partials      215      215           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 348c2fc...acf2dae. Read the comment docs.

COPY . .
RUN cd cmd/sso-auth && go build -mod=readonly -o /bin/sso-auth
RUN cd cmd/sso-proxy && go build -mod=readonly -o /bin/sso-proxy
RUN cd cmd/sso-proxy/generate-request-signature && go build -mod=readonly -o /bin/sso-generate-request-signature
Copy link
Contributor

Choose a reason for hiding this comment

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

Adding some documentation for the new binary would be helpful for others to figure out how to use the tool.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For sure, I'll add some documentation for it 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a little markdown file in /docs explaining usage of the tool.

@jphines
Copy link
Contributor

jphines commented Apr 26, 2021

@benjsto wanted to follow up here - have you gotten some time to write those docs haven't pushed 'em yet?

@benjsto
Copy link
Contributor Author

benjsto commented Apr 26, 2021

Sorry, didn't get a chance to do this yet -- will prioritize for this week!

@benjsto benjsto merged commit 290f27e into main Apr 29, 2021
@benjsto benjsto deleted the benjsto/signature-tool branch April 29, 2021 19:22
@Jusshersmith Jusshersmith added the enhancement New feature or request label Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants