Skip to content

BUG: align Transaction Service JWT validation with Auth Service #191

Closed
1 of 1 issue completed

Description

@ramioooz

Parent: BUG: Transaction Service SIT rollout blockers #190
Sprint parent: EPIC: Sprint 3 - Internal Transfers and Event Consistency #21
Related story: STORY: Orchestrate transfer saga with ledger-driven completion #103
Related PRs: auth-service#5, config-repo#32, transaction-service#13

Observed

Transaction Service configures OAuth2 resource-server JWT validation, but no JwtDecoder bean is created in SIT because no issuer/JWK configuration exists. The reviewed Auth Service currently issues HMAC-signed JWTs and does not expose JWKS.

Impact

Transaction Service cannot start in SIT after the datasource and Secret wiring are fixed. This is a security contract dependency, not a reason to disable authentication.

Acceptance criteria

  • Choose and document one consistent SIT token-validation contract.
  • Keep protected transfer endpoints fail-closed.
  • Ensure Auth Service and Transaction Service receive compatible issuer and key configuration through approved Secret delivery.
  • Do not commit JWT signing keys or weaken endpoint authorization.
  • Add focused tests for the selected decoder configuration.
  • Verify Auth login and an authorized Transaction request end to end in SIT.

The current HMAC Auth foundation and the future asymmetric/JWKS production design must remain clearly distinguished.

Activity

  1. added theissue type on Sep 3, 2026
  2. ramioooz commented on Sep 3, 2026

    @ramioooz
    MemberAuthor

    Current blocker and PRs

    The merged Transaction Service database configuration is now correct, but the first SIT rollout exposed a JWT contract mismatch: Transaction Service expected issuer/JWK validation while the current Auth foundation issues HMAC-SHA256 tokens.

    Implemented and verified:

    Related context:

    Merge order: PR #15 and PR #38 can merge in either order; no delay is required. Deploy only after both are merged. SIT also requires the separately managed auth-service-secrets Secret with key jwt-secret. No secret value is stored in Git.

    Transaction verification passed: 15 Maven tests, Helm lint, Helm rendering, and git diff --check. The new image/chart versions are 0.0.3/0.3.0.

  3. ramioooz commented on Sep 3, 2026

    @ramioooz
    MemberAuthor

    Secret-delivery follow-up

    Added the tracked prerequisite Task #192 and runbook PR digital-bank-java/infra-sit#28. The runbook documents interactive local-SIT creation of auth-service-secrets, safe presence/length verification, and the AWS Secrets Manager boundary. It does not commit or print secret material.

    End-to-end rollout remains after transaction-service#15, config-repo#38, and the required local SIT Secret are available.

  4. self-assigned this
    on Sep 3, 2026
  5. ramioooz commented on Sep 3, 2026

    @ramioooz
    MemberAuthor

    Local SIT preparation

    • Created the synthetic auth-service-secrets Secret in digital-bank-sit using the tracked infra-sit procedure.
    • Verified only Secret presence and that the decoded jwt-secret is at least 32 bytes; the value was not printed or committed.
    • Built digital-bank-java/transaction-service:0.0.3 locally from the reviewed transaction-service#15 branch.

    The cluster has not been rolled out with this code because transaction-service#15 and config-repo#38 remain open.

  6. ramioooz commented on Sep 3, 2026

    @ramioooz
    MemberAuthor

    2026-09-04 verification update

    The database configuration prerequisite is merged and Transaction Service mainline tests pass. JWT rollout remains pending review of transaction-service#15 and config-repo#38, then SIT deployment verification. The shared auth-service-secrets Secret is present in digital-bank-sit; no secret value is recorded here.

  7. ramioooz commented on Sep 5, 2026

    @ramioooz
    MemberAuthor

    Implementation PR is ready for review: digital-bank-java/transaction-service#19

    It aligns Transaction Service HMAC JWT verification with Auth Service key-length selection (HS256/HS384/HS512), preserves issuer and minimum-key validation, and includes focused regression coverage. Maven verification passed: 89 unit tests and 15 integration tests. After merge, rebuild and roll out Transaction Service in SIT, then verify Auth login plus an authorized transfer request. No token or secret values were recorded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions