Skip to main content

Auth: hbf-session-manager

How this service handles authentication. Full flows: docs/architecture/auth-flows.md

Tokens This Service Accepts

Token typeWhere validatedGuard / middleware
User JWTRemote validation via hbf-core /users/me (with optional error handling)HBFGuard

Tokens This Service Sends

CallingToken usedHow attached
hbf-coreCORE_TOKEN env varBearer header
hbf-event-publisherCORE_TOKEN env varBearer header
hbf-nlpCORE_TOKEN env varBearer header

Tokens This Service Issues

None.

Roles / Scopes Enforced

Endpoint patternRequired role
Admin or moderator endpointsHBF_ORG_ADMIN or isModerator (via OrgAdminOrModeratorGuard)

Auth Notes

  • HBFGuard supports an optional error handling mode. When enabled, auth failures do not immediately reject the request but are handled gracefully (e.g., for endpoints that behave differently for authenticated vs unauthenticated callers).
  • The same CORE_TOKEN is used for outbound calls to multiple downstream services: hbf-core, hbf-event-publisher, and hbf-nlp.
  • Env config: CORE_URL (hbf-core base URL), CORE_TOKEN (service token for downstream calls), ENV (environment identifier).