FAQs
Q1. Does the Auth Service decide if user X can perform action Y?
Not for end-user requests. It stores and serves policies/roles and resolves them (Policy Action API). The actual allow/deny evaluation for incoming requests is done by the JWT-auth layer / consuming services. Within this service,
preauth+isAdmingate who may administer the data.
Q2. What database and collections does it use?
MongoDB, database
authdb_, collectionspolicy,policyRoleMapping, and read-onlymasterseeddata.
Q3. Is businessId always required?
Yes for all Policy and Role endpoints (integer, must be > 0). The only exception is
GET /v1/service-privileges, which does not takebusinessId.
Q4. How do I delete a policy — is it permanent?
DELETE /v1/policies/:idis a soft delete: it setsstatus=DELETEDand returns 204. Roles, by contrast, are permanently removed.
Q5. Can I rename a role?
No.
roleNameis immutable — the update validator rejects any PATCH body containingroleNamewithEQ-PRL-4000002.
Q6. What action format do policies expect?
Colon-separated
service:action(e.g.user:create,order:view:*). Slash formats are rejected withEQ-POL-4000008.
Q7. Are events emitted when a policy/role changes?
No. The event publisher is a no-op stub and is never called from the request path (see Events section).
Q8. How does the Policy Action endpoint decide which policies to return?
It loads the business’s roles (optionally filtered by
roleIds), then for each role returns its referenced allow-effect policies, keyed by role name.
Q9. How do I run it locally without MongoDB?
Set
AUTH_USE_INMEMORY=trueto use the in-memory adapter for local development and testing.
Q10. Where are error messages translated?
Messages are available in English, French, and Arabic, selected via the
Localeheader (fallback English).
Revision History
2026-08-05 | AN – Created the page and added the content.