Skip to content

[ACCOUNT-LOCKOUT-POLICY-CONFIGURABLE-01] auto-lockout 常量 → per-tenant Policy struct 升级 #635

Closed as not planned

Description

@ghbvf

现状 / 修复方向

auto-lockout 常量 → per-tenant Policy struct 升级 — 现状(PR-618 落地后): cells/accesscore/internal/accountlockout/policy.go 用 hardcoded const Threshold=5 / StaleWindow=15min / LockoutTTL=15min(Keycloak / ASP.NET Identity 业界默认对齐),无 per-tenant 调参。修复方向: 触发条件出现时(per-tenant SaaS / 行业合规要求异常阈值)抽 Policy struct { Threshold int; StaleWindow time.Duration; LockoutTTL time.Duration } + Validate() + accountlockout.WithPolicy(p Policy) Option,从 const → 注入;composition root 从 assembly.yaml / config 派生。触发条件:业务出现 per-tenant 策略需求

Files

cells/accesscore/internal/accountlockout/policy.go + cmd/corebundle/access_module.go

Trigger

业务出现 per-tenant 策略需求

Source

PR-618 (ACCESSCORE-ACCOUNT-LOCKOUT-AUTO-LOCK-01) YAGNI 自审路径


Migrated from docs/backlog/20260520/ on 2026-05-20 by scripts/migrate-backlog-to-project.sh.
Priority=P3 Estimate=Cx2 — 设置到 Project v2 fields by admin(需 project scope token)。

Activity

  1. ghbvf commented on Jun 6, 2026

    @ghbvf
    OwnerAuthor

    🔀 关闭——承接 by ABAC policy 模型。per-tenant 化 account-lockout(threshold/window/TTL)本质是「per-tenant policy 调参」,其机制由 EPIC #1337 的 ABAC policy-as-code 域模型 #1344(PR-6) + 评估引擎 #1345(PR-7) 提供;届时 lockout 调参只是 policy 模型之上的薄应用,无需独立离散 issue 跟踪。

    当前 hardcoded const(Threshold=5 / StaleWindow=15min / LockoutTTL=15min,对齐 Keycloak / ASP.NET Identity 业界默认)行为正确、无回归。若 ABAC 落地后 per-tenant lockout 成为具体需求,再从 policy 模型派生子项。

  2. moved this from Backlog to Done in gocellon Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-auth认证 Authn + 授权 AuthzbacklogBacklog item — automation trigger 入 projectpri-p3Priority P3type-feat新功能

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions