Security Architecture and Trust Boundaries

Security as part of the design: trust boundaries, identities, authentication versus authorization, least privilege, data protection, maker-checker approvals and a threat model.

  • Intermediate to advanced
  • About 18 minutes
  • Includes an exercise and a knowledge check

The concept Security belongs in the architecture

Security is not a final review before deployment. Apex handles financial transactions, loan account references, operational decisions and possibly sensitive customer data. Begin by finding the trust boundaries: the points where data or requests cross between environments with different security assumptions. External provider to Apex, public API gateway to private services, service to database, finance screen to backend API, account or network boundaries, and administrative access to production.

At the top, a wide photo of a road border crossing with gates and inspection lanes. Below, Apex as zones from left to right with a check at every crossing. External: providers and the bank, not controlled by Apex and not trusted by default. Into the public-facing API gateway: authenticated integration, signature verification and rate limiting. Into the private application: input validation, role and attribute checks and short-lived credentials. Into the data zone: least-privilege service identity, TLS in transit, and encryption at rest with KMS keys. A separate administrative zone for production access is restricted, approved and audited. Nothing is trusted just because it is already inside.
Crossing a border means showing who you are. Every trust boundary needs its own check.

Who acts Security principals

The system has several kinds of identity: the payment provider integration, the banking integration, finance operations users, finance supervisors, customer support users, application service identities and platform administrators. They must not share unrestricted permissions.

Two questions Authentication and authorization

QuestionAnswered byApex example
Who are you?AuthenticationA finance user signs in through the enterprise identity provider
What may you do?AuthorizationAn analyst may investigate an assigned exception but not approve a high-risk adjustment; a supervisor may approve

A provider may submit payment notifications but never read unrelated customer data. Design permissions around specific capabilities, and give every user and service only what its job needs (least privilege):

  • Payment ingestion writes payment records.
  • Reconciliation reads the relevant payment and settlement records and writes outcomes.
  • Finance users access the exception cases assigned to them.
  • Supervisors approve defined resolution actions.
  • Reporting reads approved reporting data.

Protect the data In transit and at rest

Consider TLS for external and internal traffic where appropriate, encryption at rest, a managed key service, secret storage and rotation, database access restrictions, network segmentation, masking of sensitive data and protected backups.

High-risk operations Maker-checker approval

A reconciliation result can be produced automatically. Changing a financial record is a different operation. When an analyst asks for a manual resolution, the system records who asked, which record, why, who approved, what changed, when, and the supporting evidence. Depending on the customer’s controls, sensitive changes need maker-checker approval: one person initiates, another authorizes.

Maker-checker in four steps. 1, the maker, a finance analyst, asks to resolve EXC-3107 with a reason and evidence. 2, the checker, a finance supervisor and a different person, approves or rejects. 3, only after approval is the reconciliation outcome changed. 4, an audit record that cannot be edited is written with the evidence. A stamp reads maker not equal to checker. The audit record captures who requested it, which record, why, who approved it, what changed, when, and supporting evidence.
Two people for one sensitive change, and a record of both.
RoleMayMay not
Finance analystView transactions and exceptions; create resolution requests with a reason and evidenceApprove any request, including their own
Finance supervisorApprove or reject other people's requests, within the approval limitApprove a request they created; approve above the limit
Finance managerApprove above the supervisor limit (amount to confirm with Apex)Change audit records
Operations leadAssign and reassign exception casesApprove financial changes
AuditorRead everything, including the audit historyChange anything
Provider integrationPOST payment notifications for its own providerRead any record
Reconciliation serviceWrite reconciliation resultsApprove or change financial records

Every rule is enforced in the backend, on every request. The service checks the caller's role, the approval limit, and that the approver is not the maker, before anything changes. A request that was already approved or rejected cannot be decided again. Hiding a button in the UI is a convenience, never a control: Module 07 tests these rules by calling the API directly.

Think like an attacker A threat model

ThreatPossible mitigation
Forged provider notificationSignature verification and authenticated integration
Unauthorized case accessRole- and attribute-based authorization
Duplicate financial processingIdempotency and unique constraints
Sensitive data exposed in logsMasking and structured logging controls
Compromised service credentialsShort-lived credentials and least privilege
Unauthorized manual adjustmentApproval workflow and an unchangeable audit trail
Malicious or malformed inputValidation and safe parsing
Excessive API trafficRate limiting and abuse monitoring

Practice Review the security architecture

Practical exercise

Exercise 06: the security architecture document

Produce the security design for Apex.

  1. A trust-boundary diagram with external, public-facing, private application, data and administrative zones.
  2. An identity and permission matrix.
  3. A list of sensitive data fields.
  4. Encryption and secret-management requirements.
  5. A threat and mitigation register.
  6. An approval and audit design for manual adjustments.
Show sample matrix rows
  • Provider A integration: may POST payment notifications; may not read any record.
  • Finance analyst: may read assigned cases and request resolutions; may not approve.
  • Finance supervisor: may approve or reject resolution requests made by someone else.
  • Reconciliation service: reads payments and settlements, writes results; no access to identity data.
  • Platform administrator: production access only through an approved, audited session.

3 questions

Check your understanding

1. What is the difference between authentication and authorization?
2. What is a trust-boundary diagram for?
3. An analyst requests a manual resolution. Who may approve it?
Answer every question to submit.

What you can do now

  • Find trust boundaries and the checks each one needs.
  • Design least-privilege permissions per identity.
  • Plan data protection and secret management.
  • Design maker-checker approval with a complete audit record.