identity-permissions-tenancy
Operate on BiSheng JWT auth, RBAC/ReBAC/OpenFGA permissions, tenant isolation, admin scope, approval center, commercial gateway integration, and cursor permission performance.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- identity-permissions-tenancy
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Operate on BiSheng JWT auth, RBAC/ReBAC/OpenFGA permissions, tenant isolation, admin scope, approval center, commercial gateway integration, and cursor permission performance.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/troubleshooting.md2.8 KB
- 参考文档references/workflows.md4.5 KB
- 脚本scripts/check_arch_rules.py2.1 KB
03 SKILL.md 正文
identity-permissions-tenancy
Use this sub-skill when a task touches BiSheng authentication, authorization, resource ownership, OpenFGA/ReBAC, RBAC menu permissions, multi-tenant isolation, admin scope, approval workflows, SSO/org sync, commercial gateway behavior, or cursor-pagination permission performance.
Start here
Run bundled helper commands from this sub-skill directory, or adjust the script path to this directory after import.
- Run the read-only pattern checker before or after a permission/tenant-sensitive edit:
python scripts/check_arch_rules.py --repo-root <bisheng-checkout> - Read references/workflows.md for auth, PermissionService, tenant ContextVar, gateway, approval, and cursor workflows.
- Read references/troubleshooting.md for missing permissions, invisible resources, tenant leaks, SSO/gateway, and cursor list failures.
Owned responsibilities
- JWT/auth user loading, menu keys, and role/user/group relationships.
- PermissionService, OpenFGA/ReBAC model, failed tuple retry, owner grants, relation models, and resource authorization.
- Tenant ContextVar, SQLAlchemy tenant filter, tenant storage prefixes, tenant tree/admin scope, user-tenant membership, and quota hierarchy.
- Approval center and menu-approval mode when they affect access decisions.
- Commercial gateway integration, SSO/OAuth/LDAP/WeCom org sync, sensitive-word gateway filters, and rate/online limits.
- Cursor pagination patterns where permission filtering and DM8 keyset compatibility determine list correctness.
Route sibling areas instead of duplicating them
- Use
backend-corefor generic FastAPI routes, schemas, service layering, and non-permission models. - Use
frontend-appsfor React route guards and UI rendering after the backend permission contract is known. - Use
knowledge-ragfor parser/vector/retrieval internals after visibility is proven correct. - Use
workflow-enginefor graph execution after app visibility and permissions are proven correct. - Use
deployment-maintenancefor running operational backfill/migration scripts.
Non-negotiables
- New resource authorization must go through PermissionService/OpenFGA-aware services; do not add direct role-access table shortcuts.
- Resource creation must write owner/authorization tuples or enqueue failed tuple compensation as designed.
- ORM tenant filtering applies to SELECT; raw SQL and bulk update/delete require explicit tenant-safe handling.
- Use tenant bypass helpers only for intentional cross-tenant maintenance reads/writes.
- Cursor pagination under permission filtering must advance by the last DB row, not the last visible row.
- Frontend 403 and menu visibility bugs should not be patched until backend/menu/plugin permission data is understood.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).