Skip to content

Commit becaabb

Browse files
committed
fix: remove ABAC
1 parent 777804f commit becaabb

File tree

3 files changed

+3
-31
lines changed

3 files changed

+3
-31
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ npm run build:spec # Build OpenAPI specification
5757

5858
- **Git-as-Database**: All configuration stored as YAML in Git repository
5959
- **OpenAPI-First**: All endpoints auto-generated from `src/openapi/*.yaml` specs
60-
- **Multi-Tenant**: Team isolation with RBAC/ABAC authorization
60+
- **Multi-Tenant**: Team isolation with RBAC authorization
6161
- **Real-time**: WebSocket updates for live status monitoring
6262

6363
### Key Components
@@ -79,7 +79,7 @@ npm run build:spec # Build OpenAPI specification
7979
- **Headers required**: `Authorization`, `Auth-Group`
8080
- **Mock users** available for testing
8181

82-
### Authorization (RBAC + ABAC)
82+
### Authorization (RBAC)
8383

8484
- **platformAdmin**: Full system access
8585
- **teamAdmin**: Manage own team resources

src/authz.test.ts

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -267,34 +267,6 @@ describe('Platform admin, team admin and team member scenarios', () => {
267267
})
268268
})
269269

270-
describe('ABAC attribute denial', () => {
271-
const spec: OpenAPIDoc = {
272-
components: {
273-
schemas: {
274-
Team: { type: 'object', 'x-acl': { teamMember: ['update'] }, properties: {} },
275-
},
276-
},
277-
paths: {},
278-
security: [],
279-
}
280-
const teamId = 'teamA'
281-
let authz: Authz
282-
beforeEach(() => {
283-
authz = new Authz(spec).init(sessionTeam)
284-
sessionTeam.authz = { [teamId]: { deniedAttributes: { Team: ['foo', 'bar'] } } }
285-
})
286-
test('Denied attributes are respected', () => {
287-
expect(() => authz.hasSelfService(teamId, 'foo')).not.toThrow()
288-
expect(() => authz.hasSelfService(teamId, 'bar')).not.toThrow()
289-
})
290-
test('Allowed attribute is not denied', () => {
291-
expect(() => authz.hasSelfService(teamId, 'baz')).not.toThrow()
292-
})
293-
afterEach(() => {
294-
sessionTeam.authz = {}
295-
})
296-
})
297-
298270
describe('Fallback to CASL when no self-service permission', () => {
299271
const spec: OpenAPIDoc = {
300272
components: {

src/middleware/authz.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const HttpMethodMapping: Record<string, string> = {
1111
}
1212

1313
/**
14-
* Authorize a request based on RBAC and ABAC rules.
14+
* Authorize a request based on RBAC rules.
1515
* Called by the security handler.
1616
* Throws HttpError if authorization fails.
1717
*/

0 commit comments

Comments
 (0)