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-server: Use api keys to authenticate proxy requests #51

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

joeykraut
Copy link
Member

@joeykraut joeykraut commented Oct 23, 2024

Purpose

This PR uses the allocated API keys to authenticate an proxy request to the auth server. Specifically the flow is:

  • Retrieve the user's encrypted API secret from the database using their API key as a key
  • Decrypt the API secret using the server's decryption key
  • Check an expiring HMAC on the request using the decrypted API secret
  • If this passes, forward the request to the relayer

Todo

  • Check the path to ensure it's an allowed path
  • Attach admin auth to the request

Testing

  • Built a client and allocated an API key for the client, verified that the client was able to call relayer methods through the auth server

@joeykraut joeykraut force-pushed the joey/api-key-auth branch 2 times, most recently from 6e6209d to f8e3dab Compare October 23, 2024 01:32
@joeykraut joeykraut marked this pull request as ready for review October 23, 2024 01:36
auth/auth-server/Cargo.toml Outdated Show resolved Hide resolved
@joeykraut joeykraut merged commit ea86511 into main Oct 23, 2024
1 of 3 checks passed
@joeykraut joeykraut deleted the joey/api-key-auth branch October 23, 2024 16:14
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