CPG-MP FSD Profile

FSD — Merchant Portal

A. Document controlA. Kiểm soát tài liệu

Doc IDCPG-FSD-CPG-MP_FSD_Profile
VersionPhiên bản1.0
StatusTrạng tháiDraft
OwnerCPG BA / Architecture
AudienceĐối tượngFrontend, Backend, QA, Product
ClassificationPhân loạiInternal
Effective dateNgày hiệu lực01/12/2026
Related docs Merchant Portal Index · BR/NFR Catalog

B. Version historyB. Lịch sử phiên bản

Version Date Author ChangesThay đổi
1.0 01/12/2026 Khoa Trinh Version 1.0 — MP-facing thin FSD for Round A SPEC (no Crypto Wallets)

C. Table of contentsC. Mục lục

D. ContentD. Nội dung

1. Module Scope

The Profile Module on Merchant Portal lets authenticated merchant users manage their own profile, notification inbox, and security settings (password, 2FA, sessions, anti-phishing code).

In scope:

  • General: avatar, editable name/phone, read-only role (and other system fields as shown by FE)
  • Notifications: list / read / delete / mark all read
  • Security: password change, TOTP 2FA enable/disable, session list/revoke, anti-phishing code

Out of scope:

  • Crypto Wallets (retired from Profile docs; legacy FE tab / auth wallets API deferred — Round A GAP)
  • CRM-only IAM fields (Position, Group administration)
  • Full MP UC/TC Profile suite (Round A SPEC links trimmed CRM UC/TC + TC-MP-PRF-* on SPEC; dedicated CPG-MP_UC_Profile / CPG-MP_Profile_TestCases are GAP)

2. User Roles

Any authenticated merchant user may open their own Profile. Actions follow merchant RBAC / self-service rules on merchant-auth-service.

Role Permissions (illustrative keys)
Merchant Admin profile.view, profile.update, profile.security, profile.notifications
Merchant Finance / Operator / Support / Developer / Viewer Self-service profile per granted profile.* keys

No profile.wallet in this FSD.

3. Functional Requirements

F1. General profile

View/update editable fields; upload avatar (JPG/PNG/GIF, max 2MB). Role (and similar system fields) read-only.

Rule ID Rule
PRF-GEN-01 Self-service only
PRF-GEN-02 Avatar validation (type/size)
PRF-GEN-03 Role/system fields not editable

F2. Notifications

List notifications; mark read; delete; mark all read; empty state when none.

Rule ID Rule
PRF-NOT-01 Unread indicator
PRF-NOT-02 Pagination / performance acceptable
PRF-NOT-03 Empty ≠ error

F3. Change password

Current password + policy + lockout behavior on repeated failure.

Rule ID Rule
PRF-SEC-01 Current password required
PRF-SEC-02 Password policy enforced
PRF-SEC-03 Lockout after repeated failures (shared UX with CRM)

F4. Two-factor authentication (2FA)

Enable/disable TOTP via setup/verify/disable endpoints. Product may cross-reference Setting Service 2FA UX notes when shared; SPEC may cite open Q if BR-MP-SET-002 is not yet in BR catalog.

Rule ID Rule
PRF-2FA-01 OTP verify before enabled
PRF-2FA-02 Disable requires OTP when enabled

F5. Sessions

List sessions; revoke others; current session remains.

Rule ID Rule
PRF-SES-01 Current session preserved when revoking others
PRF-SES-02 Revoked sessions cannot refresh

F6. Anti-phishing code

GET/PUT/DELETE phishing code on merchant-auth.

Rule ID Rule
PRF-PC-01 Validation per merchant-auth
PRF-PC-02 Masked display when set

4. User Interface

Three tabs: General, Notifications, Security. No Crypto Wallets tab in this FSD.

5. Data Requirements

Profile fields and phishing code on merchant user; notification records via notification-service; sessions via merchant-auth. No user_wallets in MP Profile scope.

6. API Routes (merchant-auth / notification — illustrative)

Method Path Purpose
GET/PUT /api/v1/authz/me Profile
POST /api/v1/authz/me/avatar Avatar (if exposed)
POST /api/v1/authz/me/password Change password
GET/POST /api/v1/authz/me/2fa/* / /api/v1/authz/2fa/* 2FA
GET/DELETE /api/v1/authz/me/sessions Sessions
GET/PUT/DELETE /api/v1/authz/me/phishing-code Phishing code
GET/PATCH/DELETE Notification service routes Notifications

No wallets routes in this FSD.

7. Security

  • Tenant-scoped self-service; never mutate another user’s profile
  • Do not log passwords, OTP, phishing codes, or tokens
  • Password-change lockout and 2FA challenges follow merchant-auth implementation

Use CasesUse Cases

No dedicated 08_UC page is published for this FSD yet. See the Use Cases index:Chưa có trang 08_UC riêng cho FSD này. Xem mục lục Use Cases:

E. ReferencesE. Tham chiếu