-
Notifications
You must be signed in to change notification settings - Fork 111
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
[PAY-2842][PAY-2780][PAY-3069] Fix authorized endpoints not supporting manager mode #8646
Conversation
…-pay-and-earn * origin/main: Create Apps Dev Docs link updated (#8492) Fix typos (#8620) Fix album tile playback (#8637) [C-4451] Add feature flag and switch for edit track redesign (#8639) Fix copy (#8640) Add DPID and party name info to distro docs (#8638) [C-4237] Fix create notification when track is published (#8634) Fix chromecast support, again (#8636) Audius Protocol v0.6.114⚠️ [C-4416, C-4418, C-4419 C-4322] Fast SSR (#8603) PROTO-1846: add discovery listens status to healthz (#8631) [QA-1226] Add missing tier info (#8635) Fix first track in lineup playback issue (#8632) [QA-1321] Show spinner for audio balance if rpc call fails (#8630) [C-4417] Add a buffering metric (#8619) Replace structuredClone with cloneDeep for native compat (#8633) [PROTO-1802] Add DDEX entrypoint UI deep link (#8374)
|
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
11080650 | Triggered | Generic High Entropy Secret | 4d204fb | packages/embed/.env.stage | View secret |
11080650 | Triggered | Generic High Entropy Secret | 4d204fb | packages/embed/.env.stage | View secret |
11080650 | Triggered | Generic High Entropy Secret | 4d204fb | packages/embed/.env.dev | View secret |
11080650 | Triggered | Generic High Entropy Secret | 4d204fb | packages/embed/.env.dev | View secret |
11080651 | Triggered | Generic High Entropy Secret | 4d204fb | packages/embed/.env.prod | View secret |
11080651 | Triggered | Generic High Entropy Secret | 4d204fb | packages/embed/.env.prod | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
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.
seems reasonable to me !
comments on the owner/all/authenticated enum would be super useful. not sure what they had meant at face value
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.
Left a bunch of (non-blocking) thoughts! Let me know what you think
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! I like this a lot better!
@rickyrombo @raymondjacobson I tried to write some tests for the access checker and ran into a bunch of issues with circular imports. I think our import structure is such that it only works if you're importing the whole flask app :-(. |
…-pay-and-earn * origin/main: [C-4353] Add recent searches to search v2 (#8615) [QA-1335] Fix embed for non-premium tracks (#8658) Upgrade mobile apps to .99 (#8655) Fix sdk typecheck (#8656) [C-4427] react-native-video rough POC (#8654) Small fix to static image imports (#8653) Version Packages (#8189) [C-4309] Add ssr metatags (#8649) Audius Protocol v0.6.115 Move EditTrackForm to edit-track component directory (#8641) [C-4320] Add web mobile profile page for SSR (#8642) [QA-1330] Fix mobile track edit button (#8644) [QA-1325] Fix playing icon position (#8643)
[7343561] [PAY-2842][PAY-2780][PAY-3069] Fix authorized endpoints not supporting manager mode (#8646) Randy Schott [ddaa1b3]⚠️ Third Party Wallet Support [PAY-2949][PAY-2948][PAY-2950] (#8611) Marcus Pasell [c15f20d] Fix prod mediorum dockerfile to have keyfinder dependency (#8666) Michelle Brier [7fe9451] Fix solana-relay logging, fix eslint config (#8663) Marcus Pasell [a495f42] [C-4453] Fix notification email image and layout (#8647) Isaac Solo [2ceae28] Audio analysis: mediorum changes (#8536) Michelle Brier [15a34b3] [C-4353] Add recent searches to search v2 (#8615) Sebastian Klingler [0050b29] Fix sdk typecheck (#8656) Sebastian Klingler
Description
This updates the
auth_middleware
to encapsulate some of the logic we had previously been doing outside of it and adds the ability to check authorization for a request against a user or any of their managers.I removed all instances of
abort_forbidden()
in favor of usingauth_middleware()
withrequire_auth=True
and then following up with thecheck_authorized()
utility. Also fixed a few instances of using theauthed_user_id
for a request instead of the value passed in the URL. This results in the request returning the wrong results when called as a managed user.Also added support to audius-cmd for creating a manager relationship, as this allowed me to test against local stack using purely cURL.
How Has This Been Tested?
Used audius-cmd against local stack to create two users and a management relationship. Then used cURL to verify that I can make requests to all endpoints which were using the
abort_forbidden()
pattern to ensure that:user_id
matchesauthed_user_id
(auth headers decode into the same user as the one passed in URL params)authed_user_id
matches an active manager for theuser_id
in questionuser_id
and said user is not a manager ofuser_id
.