Skip to content

feat(stac): add policy enforcement point to all create/update stac endpoints#571

Open
botanical wants to merge 18 commits intodevelopfrom
mt-uma/pep-stac-endpoints
Open

feat(stac): add policy enforcement point to all create/update stac endpoints#571
botanical wants to merge 18 commits intodevelopfrom
mt-uma/pep-stac-endpoints

Conversation

@botanical
Copy link
Member

@botanical botanical commented Mar 9, 2026

Issue

#559

What?

  • Updates to extend PEP to STAC endpoints for collections where the action is a create or update
  • This takes a very naive approach to apply the policy enforcement point by relying on the request body's tenant value to determine permissions

Testing?

  • Unit and Integration tests updated
Test Case Expected Result Actual Result
User in tenant1 is able to update a collection in tenant1 Allow Allow
User in tenant1 and tenant2 is able to update a collection from tenant1 -> tenant2 Allow Allow
User in tenant1 and tenant2 and not tenant3 is not able to update a collection from tenant1 -> tenant3 Deny Deny
User in tenant1 only attempts to update a collection from tenant1 -> tenant2 Deny  Deny
User in tenant2 only attempts to update a collection from tenant1 -> tenant2 Allow  Allow
User in tenant1 and tenant2 and not tenant3 attempts to update a collection from tenant1 → tenant3 Deny  Deny
User in tenant1 and tenant3 updates a collection from tenant1 -> tenant3 Allow  Allow
User in tenant1 and tenant2 updates a collection from tenant2 -> tenant1 Allow  Allow
User with no tenant memberships updates a public collection (public -> public) Allow  Allow
User in tenant1 updates a public collection to tenant1 (public -> tenant1) Allow  Allow
User in tenant1 attempts to update a collection in tenant1 to public (tenant1 -> public) Allow  Allow

@botanical botanical changed the title feat(stac): add policy enforcement point to all stac endpoints feat(stac): add policy enforcement point to all create/update stac endpoints Mar 11, 2026
@botanical botanical marked this pull request as ready for review March 11, 2026 22:58
@botanical
Copy link
Member Author

Something I want to note is that it's hard to achieve clear error messages to the user due to our cloudfront configuration which routes errors to 200 and the stac browser 😢 @smohiudd @anayeaye Is it possible for us to explore using amplify at this point? Or should I add guidance on certain errors users might occur with multi-tenant auth?

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.

1 participant