Skip to main content

Auth: hbf-notifications

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

Tokens This Service Accepts

Token typeWhere validatedGuard / middleware
User JWThbf-core /users/meHBFGuard
Service JWTLocal validation, checks for HBF_SERVICE roleJWTGuard

Tokens This Service Sends

CallingToken usedHow attached
hbf-coreUser JWT (forwarded)Authorization: Bearer <token> header

Tokens This Service Issues

None.

Roles / Scopes Enforced

Endpoint patternRequired role
Service-to-service endpointsHBF_SERVICE (ValidRoles.HBF_SERVICE)
Org-scoped endpointsOrg member role (via MemberOrgRoleGuard)

Auth Notes

  • JWTGuard specifically checks for the HBF_SERVICE role (ValidRoles.HBF_SERVICE), enabling service-to-service authentication distinct from user authentication.
  • HBFGuard delegates token validation to hbf-core by calling /users/me. The request is authenticated only if hbf-core confirms the token.
  • MemberOrgRoleGuard enforces that the caller has an active membership in the target organization.
  • Config: CORE_URL points to the hbf-core instance used for token validation.