Skip to main content

security-auth

Apply EduHub authentication, authorization, and security conventions. Use when working on Keycloak, NextAuth, JWT/session handling, role checks, Hasura permissions, or security-sensitive frontend and backend behavior.

来源信息

仓库
eduhub-org/eduhub
最近来源活动
2026年4月24日 10:04
检测到的 SKILL.md 语言
英语
星标
14
分支
9

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
security-auth
description
Apply EduHub authentication, authorization, and security conventions. Use when working on Keycloak, NextAuth, JWT/session handling, role checks, Hasura permissions, or security-sensitive frontend and backend behavior.
# Security Auth Use this skill for authentication, authorization, and security-sensitive changes. ## Core Architecture EduHub authentication spans: - Keycloak for identity and realm roles - NextAuth session handling in the frontend - Hasura role-based permissions - frontend role-aware GraphQL hooks Changes in one layer often require checking the others. ## Core Rules - preserve least-privilege behavior - do not hardcode a lower or broader role than the user actually has - verify both authenticated and unauthorized behavior - treat admin, instructor, and participant flows as distinct ## Frontend Expectations - use existing auth/session helpers instead of inventing parallel state - keep role checks explicit and readable - when gating UI actions, ensure unauthorized users cannot trigger the underlying write path indirectly ## GraphQL Expectations - use role-aware hooks for GraphQL operations - verify Hasura permissions match the actual caller role - when adding fields to existing fragments, check whether all consuming roles are allowed to read them ## Sensitive Change Checklist For auth or permission changes, check: 1. login/session flow 2. frontend role checks 3. GraphQL role headers and hooks 4. Hasura metadata permissions 5. unauthorized and authorized test paths ## Output Style For This Skill When you make a security-relevant change, state clearly: 1. which role or permission boundary changed 2. which layers were updated 3. how unauthorized behavior was verified
在 GitHub 查看