farbenmeer / farbenmeer/tapi

Invalidation stream is unfiltered and public

Open
#459 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2
Forks
1
Avg merge
4h 57m
Merged PRs (30d)
42

Description

The invalidations stream is currently unfiltered and public. This is fine for single-tenant application without strict data protection requirements.

For everything else it should accept a new parameter
```ts
invalidations: {
masked: boolean;
filter: (req: TRequest) => (tag: string) => boolean
}
```
where
* masked makes tapi hash all tags before they are sent to the client (so the endpoint can stay public without exposing data)
* filter filters tags based on the requests authorization parameters (cookie usually) so we can have multi-tenant deployments that don't need to send every tag to every client

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the invalidations stream configuration and trace how requests and tags are sent to clients. Determine where the masked and filter options belong, then verify that masking hashes every outgoing tag and filtering uses the request authorization parameters to control visibility. Done means public streams no longer expose raw tags when masked is enabled and filtered streams omit unauthorized tags.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.