¶ Ibnu Sina Security and Access
| Layer |
Owner |
Purpose |
| Identity |
Utopia Hub |
Proves the person and issues the JWT |
| Membership |
Ibnu Sina |
Active local user record; invitation-based Ops access |
| Permission |
Ibnu Sina PBAC |
View/manage level for each module |
| Branch |
Ibnu Sina |
Allowed branches and per-branch overrides |
| Record scope |
Planned |
all/team; not implemented |
| Work list |
Ibnu Sina |
Makes a person selectable for Driver, Warehouse or another operational function |
Never replace one layer with another. A Driver work-list entry does not grant portal administration, and a portal role does not make someone a selectable Driver.
- Verify JWT signature and issuer against the shared Hub.
- Keep portal cookies HTTP-only, secure in production and scoped to the Ibnu Sina domain.
- Use a BU-specific cookie prefix to avoid cross-application collisions.
- Silent SSO adopts the Hub access token but must not consume/rotate the Hub refresh token.
- A valid Hub identity without an active local user receives no access.
- Auto-provisioning, when enabled, must fail closed for new accounts and fail open for the re-check of an existing account during a Hub outage.
- Administrator is the locked system-level role.
- Sales, Operations, Account, Manager and Boss are templates; custom roles may adjust module levels.
- Review permission changes as access changes, not ordinary profile edits.
- Branch access and module access must both pass.
- The absent team scope must be documented for any module where users expect “only my records”.
- Keep sensitive capabilities such as refund approval, line unlock, integration-token management and user administration narrowly assigned.
¶ Ops and warehouse access
- OE provision looks up an invited local user; it must not create arbitrary Hub users.
/ops Driver actions check the signed-in person owns the Trip.
- Warehouse endpoints check active Warehouse work-list membership.
- The additional Warehouse PBAC check is recorded as deferred; this is a known defence-in-depth gap.
/oe machine operations rely on scoped API tokens. Limit scope, rotate regularly and revoke unused tokens.
| Data |
Protection expectation |
| Customer phone/address |
Branch/module need-to-know access |
| IC/identity images |
Private storage, signed URL, narrow audience and retention policy |
| Payment slips and bank details |
Private storage and Finance-limited access |
| Supplier/accounting codes |
Restrict to relevant operational/Account users |
| API tokens and partner secrets |
Secret manager only; never logs, wiki or screenshots |
| Hub profile detail |
Resolve on demand; mirror only fields needed for joins and lists |
- Validate MIME type, extension, count and maximum size server-side.
- Generate server-controlled object paths.
- Do not trust browser-provided filenames.
- Keep evidence private unless the feature explicitly needs a public asset.
- Deleting a proof should preserve the appropriate audit/evidence policy rather than silently erasing history.
¶ Audit and anomaly review
Review audit trails for unexpected permission changes, cancelled/exported money records, Order-line unlocks, stock adjustments, serial reassignment and repeated integration retries. Correlate the authenticated local user with the Hub profile identity and request/reference ID.
For suspected credential or account misuse:
- Disable the local user or revoke the affected API token.
- Revoke/rotate the Hub or partner credential through its owning system.
- Preserve audit, request and integration records.
- Identify affected branches, records, money and stock movements.
- Correct through explicit business actions or forward migrations—never by deleting evidence.