Skip to content

Write the README - #3

Merged
tdaly61 merged 1 commit into
openMF:devfrom
GiulioRinalduzzi:docs/auth-readme
Sep 5, 2026
Merged

tdaly61 merged 1 commit into
openMF:devfrom
GiulioRinalduzzi:docs/auth-readme

Conversation

@GiulioRinalduzzi

Copy link
Copy Markdown
Contributor

The repo was seeded with the scaffold placeholder still in place, so the only thing the README said about paymenthub-ee-auth was its own name. Every other migrated component has a written one; this closes the gap.

It now covers what the service is: it issues the RSA-signed JWTs the rest of Payment Hub EE checks, and owns the users, roles and permissions behind them. The token endpoints and their lifetimes (10 minutes for an access token, 12 hours for a refresh token), the user/role/permission APIs and the read-only workflow views under /api/v1, and the point that other components verify a token against the public key published at /oauth/token_key rather than calling this service per request — so it is not on the hot path of a payment.

It also states the multi-tenant rule, which is the thing that makes a first call fail in a way that is hard to guess: every request except /oauth/token_key has to name a tenant, in the Platform-TenantId header or a tenantIdentifier parameter, and a request without one is rejected before authentication runs, because the tenant decides which database the user is looked up in.

Plus the practical parts: port 5000, the MySQL instance holding the tenant list, the fact that the committed application.properties points at the in-cluster host name operations-mysql and which properties to override for a local run, and that jwt.pem is a development key pair a real deployment must replace, since anything holding the private key can mint a token every other component accepts.

Every claim was read off the code, not assumed: the class-level @RequestMapping("/api/v1") on UsersApi, RolesApi, PermissionsApi and OperationsDetailedApi; the HTTP methods on the three /oauth paths (POST, GET, POST); the two validity values in application.properties; the tenant filter registering at securityFilterOrder - 4 so it runs ahead of Spring Security; and the Flyway loop over repository.findAll() at startup. EclipseLink rather than Hibernate is from the hibernate-core exclusion in build.gradle, and no actuator is claimed because the dependency is not there.

Docs only — no code, build or config changes.

The repo was seeded with the scaffold placeholder still in place, so the
only thing it said about itself was its own name. It now describes the
service: the token endpoints and their lifetimes, the user/role/
permission and read-only workflow APIs under /api/v1, how other
components verify a token with the published public key rather than
calling here, and the multi-tenant rule that every call except
/oauth/token_key must name a tenant.

Also the parts a newcomer gets stuck on: the service listens on 5000 and
needs a MySQL holding the tenant list, the committed application.properties
points at the in-cluster host name, and jwt.pem is a development key pair
that a real deployment has to replace.

Every claim was read off the code rather than assumed: the /api/v1 class
level mapping on the four API classes, the HTTP methods on the three
/oauth paths, the token lifetimes in application.properties, the tenant
filter running ahead of security via securityFilterOrder - 4, and the
Flyway migration loop over every tenant at startup.
@GiulioRinalduzzi
GiulioRinalduzzi requested a review from a team August 21, 2026 07:36
@tdaly61
tdaly61 merged commit 73ed6ef into openMF:dev Sep 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants