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

auth: add signature middleware #13

Merged
merged 3 commits into from
May 24, 2024
Merged

auth: add signature middleware #13

merged 3 commits into from
May 24, 2024

Conversation

CaioTeixeira95
Copy link
Contributor

@CaioTeixeira95 CaioTeixeira95 commented May 21, 2024

What

SignatureMiddleware validates if the API caller has ownership of the configured Stellar public key that signed the request. This adds authentication when requesting the resources.

Why

Security reasons.

Known limitations

N/A

Checklist

PR Structure

  • It is not possible to break this PR down into smaller PRs.
  • This PR does not mix refactoring changes with feature changes.
  • This PR's title starts with name of package that is most changed in the PR, or all if the changes are broad or impact many packages.

Thoroughness

  • This PR adds tests for the new functionality or fixes.
  • All updated queries have been tested (refer to this check if the data set returned by the updated query is expected to be same as the original one).

Release

  • This is not a breaking change.
  • This is ready to be tested in development.
  • The new functionality is gated with a feature flag if this is not ready for production.

@CaioTeixeira95 CaioTeixeira95 self-assigned this May 21, 2024
@CaioTeixeira95 CaioTeixeira95 marked this pull request as draft May 21, 2024 20:05
@CaioTeixeira95 CaioTeixeira95 marked this pull request as ready for review May 22, 2024 13:52
Copy link
Member

@daniel-burghardt daniel-burghardt left a comment

Choose a reason for hiding this comment

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

Very minor comments, but overall LGTM! 🚀

cmd/serve.go Outdated Show resolved Hide resolved
internal/serve/auth/signature_verifier.go Outdated Show resolved Hide resolved
internal/serve/auth/signature_verifier.go Outdated Show resolved Hide resolved
internal/serve/auth/signature_verifier.go Outdated Show resolved Hide resolved
internal/serve/auth/signature_verifier.go Show resolved Hide resolved
cmd/utils/custom_set_value.go Outdated Show resolved Hide resolved
@CaioTeixeira95 CaioTeixeira95 merged commit 2b5e625 into main May 24, 2024
5 checks passed
@CaioTeixeira95 CaioTeixeira95 deleted the signature-middleware branch May 24, 2024 17:51
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.

2 participants