Skip to content

Add OAuth2 in Backend #298

Closed
12 of 12 issues completed
Closed

Description

@andrei2699

Should be done with OPA

https://www.openpolicyagent.org/docs/latest/

Policies should be defined externally of ScriptBee WebApp


[ Request with Bearer Token ]
│
▼
1. JWT Validation (Signature, exp, aud)
│
▼
2. IClaimsTransformation
├─ Read External ID (sub / oid)
├─ Memory Cache Hit? ──(Yes)──► Attach InternalUserId Claim
└─ Cache Miss? ────────(No)───► Find/Create in Users DB ──► Cache ──► Attach Claim
│
▼
3. Custom Authorization Handler
└─ Check: Does InternalUserId have Permission X in Route's ProjectId?
│
▼
4. Minimal API Endpoint Executes

Metadata

Metadata

Assignees

Labels

area/authAuthentication and Authorizationarea/webappScriptBee WebAppdocumentationScriptBee documentation

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions