Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

feat: project validation #99

Merged
merged 11 commits into from
Jul 26, 2023
Merged

Conversation

Rakowskiii
Copy link
Contributor

Description

Adding project secret validaiton to all endpoints that should be only usable by authenticated projects.

Resolves #98

How Has This Been Tested?

Due Diligence

  • Breaking change
  • Requires a documentation update
  • Requires a e2e/integration test update

@Rakowskiii Rakowskiii linked an issue Jul 17, 2023 that may be closed by this pull request
tests/integration.rs Outdated Show resolved Hide resolved
@Rakowskiii
Copy link
Contributor Author

Let's NOT merge this untill we are sure all other SDKs are sending Bearer auth, otherwise we can end up with breaking change

@Rakowskiii
Copy link
Contributor Author

Also - this supports redis cache, but will add terraform and env vars in separate PR

Comment on lines +16 to +19
pub enum Addr<'a> {
Combined(&'a str),
Separate { read: &'a str, write: &'a str },
}
Copy link
Member

Choose a reason for hiding this comment

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

This feels like an unnecessary abstraction. Why do we need to differentiate between Combined and Separate? Why not pass-through auth_redis_addr_read|write to Redis::new()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tbh this is just copied from RPC proxy, but if you feel it's unnecessary we can just get rid of it

Copy link
Member

Choose a reason for hiding this comment

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

It's fine to leave as-is for now

src/registry.rs Outdated Show resolved Hide resolved
Copy link

@HarryET HarryET left a comment

Choose a reason for hiding this comment

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

Looks good, although I can't vouch for the logic being correct

Rakowskiii and others added 3 commits July 24, 2023 10:46
@Rakowskiii Rakowskiii merged commit ded66ce into main Jul 26, 2023
5 checks passed
@Rakowskiii Rakowskiii deleted the feat-98-add-auth-to-all-project-endpoints branch July 26, 2023 14:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add auth to all project endpoints
3 participants