Skip to content

Adds a single, declarative authorization map that governs every API route, enforces it with a supertest suite, and closes the anonymous PII-enumeration gap on GET /users/:id. - #46

Open
DevScoopee wants to merge 3 commits into
ecotask-network:mainfrom
DevScoopee:main

Conversation

@DevScoopee

Copy link
Copy Markdown

Authorization is now enforced through a single declarative matrix in src/authorization/matrix.ts, covering public, authenticated, owner, owner-or-admin, validator-or-admin, and admin access for every route. The key fix closes the privacy gap on GET /users/:id, which was open to anonymous callers and let anyone enumerate user PII; it now requires authentication, consistent with sibling endpoints.

Closes #11

@cybermax4200 cybermax4200 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ci check is failing, please kindly fix it

DevScoopee and others added 3 commits August 19, 2026 22:44
…oute, enforces it with a supertest suite, and closes the anonymous PII-enumeration gap on GET /users/:id.

Authorization is now enforced through a single declarative matrix in src/authorization/matrix.ts, covering public, authenticated, owner, owner-or-admin, validator-or-admin, and admin access for every route. The key fix closes the privacy gap on GET /users/:id, which was open to anonymous callers and let anyone enumerate user PII; it now requires authentication, consistent with sibling endpoints.

Closes ecotask-network#11
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.

Audit and fix route-level authorization so user profile data is not publicly enumerable.

2 participants