adobe / da-admin

Apache License 2.0
0 stars 4 forks source link

Support Authenticated Buckets/Orgs #42

Closed bstopp closed 2 months ago

bstopp commented 3 months ago

Description

Add checks for access to creating buckets, and when creating a new bucket set the access to the authenticated user.

Related Issue

Impl #41

Motivation and Context

So all new buckets are secure going forward.

How Has This Been Tested?

Added unit tests. Also ran some quick Postman checks locally.

Screenshots (if appropriate):

Types of changes

Checklist:

bstopp commented 3 months ago

Note: i didn't remove any of the "auto-bucket creation" logic already in saving Objects. However it should be noted that only works in R2, so we'd eventually need another solution if expanding beyond that single storage medium.

(This is also really only used in the new project creation - and I plan to provide an update to that flow soon)

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 99.25926% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 79.06%. Comparing base (725b972) to head (d2495a2).

Files Patch % Lines
src/utils/auth.js 90.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #42 +/- ## ========================================== - Coverage 79.56% 79.06% -0.50% ========================================== Files 14 18 +4 Lines 915 1094 +179 ========================================== + Hits 728 865 +137 - Misses 187 229 +42 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.