-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
feat(preprod): Create artifact download endpoint + associated authentication code #93865
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
base: master
Are you sure you want to change the base?
Conversation
@@ -550,3 +551,120 @@ def authenticate_token(self, request: Request, token: str) -> tuple[Any, Any]: | |||
sentry_sdk.get_isolation_scope().set_tag("rpc_auth", True) | |||
|
|||
return (AnonymousUser(), token) | |||
|
|||
|
|||
def compare_service_signature( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pretty much 1:1 rip of https://github.com/getsentry/sentry/blob/master/src/sentry/api/endpoints/seer_rpc.py#L60
return False | ||
|
||
|
||
class ServiceRpcSignatureAuthentication(StandardAuthentication): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
shared_secret_setting_name = LAUNCHPAD_RPC_SHARED_SECRET_SETTING | ||
service_name = "Launchpad" | ||
sdk_tag_name = "launchpad_rpc_auth" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could just create another version of this but for seer cc @jennmueng
❌ 4 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
9ce5c17
to
3bd37f8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, looks like we can definitely share it with Seer once it's in. I'm definitely not the best person to review this though, @mdtro will be.
I implemented the authentication logic that will power the monolith <> launchpad specific endpoints. The code is exactly how seer currently has its auth HTTP calls implemented. I put it in a shared space so that once this lands, we could potentially have the seer team share this underlying logic too. That way we don't have two different implementations of the same thing
As for "why this auth approach", I explored the different ways we currently have it implemented:
I went with the #3 approach since our use case is pretty much identical to the Seer use case and the implementation seemed the most straightforward.
Security folks though, please weigh in here! You know best
I also created 1 of the 3 new endpoints that we need for the launchpad service. This one just allows our service to download the artifact file. I included it so that the full usage of this auth logic is apparent