keycloak-administration by dauquangthanh/hanoi-rainbow
npx skills add https://github.com/dauquangthanh/hanoi-rainbow --skill keycloak-administration提供系统化的 KeyCloak 管理指南,涵盖安装、配置、领域管理、安全加固和运维最佳实践。支持独立和集群部署,用于构建安全、可扩展的身份和访问管理(IAM)解决方案。
选择您的任务并加载相应的参考文档:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
1. 独立模式(开发/测试)
# 下载并启动 KeyCloak
wget https://github.com/keycloak/keycloak/releases/download/[VERSION]/keycloak-[VERSION].tar.gz
tar -xvzf keycloak-[VERSION].tar.gz
cd keycloak-[VERSION]
bin/kc.sh start-dev
# 访问:http://localhost:8080
# 首次访问时创建初始管理员用户
2. 生产模式(带数据库)
# 配置并构建
bin/kc.sh build --db=postgres
# 设置环境变量
export KC_DB=postgres
export KC_DB_URL=jdbc:postgresql://localhost/keycloak
export KC_DB_USERNAME=keycloak
export KC_DB_PASSWORD=password
export KC_HOSTNAME=keycloak.example.com
# 启动生产模式
bin/kc.sh start --optimized
3. Docker 部署
docker run -d \
--name keycloak \
-p 8080:8080 \
-e KEYCLOAK_ADMIN=admin \
-e KEYCLOAK_ADMIN_PASSWORD=admin \
quay.io/keycloak/keycloak:latest \
start-dev
4. Kubernetes - 使用 KeyCloak Operator 或 Helm charts
KC_HOSTNAME# 电子邮件设置
KC_SMTP_HOST=smtp.example.com
KC_SMTP_PORT=587
KC_SMTP_FROM=noreply@example.com
KC_SMTP_STARTTLS=true
https://keycloak.example.com/realms/{realm}/.well-known/openid-configuration
详情:参见 authentication-sso.md
ou=users,dc=example,dc=com详情:参见 user-federation.md
基本安全措施:
完整检查清单:参见 security-hardening.md
/health/ready 和 /health/live/metrics 端点获取 Prometheus 指标详情:参见 ha-scalability.md
完整故障排除指南:参见 troubleshooting.md
# 启动模式
bin/kc.sh start-dev # 开发
bin/kc.sh start --optimized # 生产
# 为数据库构建
bin/kc.sh build --db=postgres
# 导出/导入领域
bin/kc.sh export --dir /backup --realm my-realm
bin/kc.sh import --dir /backup
# 管理 CLI
bin/kcadm.sh config credentials --server http://localhost:8080 --realm master --user admin
bin/kcadm.sh create realms -s realm=my-realm -s enabled=true
bin/kcadm.sh create users -r my-realm -s username=john -s enabled=true
bin/kcadm.sh set-password -r my-realm --username john --new-password secret
如需详细指导,请加载相应的参考文件:
每周安装次数
102
仓库
GitHub 星标数
9
首次出现
2026年1月23日
安全审计
安装于
opencode91
gemini-cli88
codex88
github-copilot87
cursor75
kimi-cli74
Provides systematic KeyCloak administration guidance covering installation, configuration, realm management, security hardening, and operational best practices. Supports both standalone and clustered deployments for secure, scalable identity and access management (IAM) solutions.
Choose your task and load the appropriate reference:
1. Standalone Mode (Development/Testing)
# Download and start KeyCloak
wget https://github.com/keycloak/keycloak/releases/download/[VERSION]/keycloak-[VERSION].tar.gz
tar -xvzf keycloak-[VERSION].tar.gz
cd keycloak-[VERSION]
bin/kc.sh start-dev
# Access: http://localhost:8080
# Create initial admin user on first access
2. Production Mode with Database
# Configure and build
bin/kc.sh build --db=postgres
# Set environment variables
export KC_DB=postgres
export KC_DB_URL=jdbc:postgresql://localhost/keycloak
export KC_DB_USERNAME=keycloak
export KC_DB_PASSWORD=password
export KC_HOSTNAME=keycloak.example.com
# Start production mode
bin/kc.sh start --optimized
3. Docker Deployment
docker run -d \
--name keycloak \
-p 8080:8080 \
-e KEYCLOAK_ADMIN=admin \
-e KEYCLOAK_ADMIN_PASSWORD=admin \
quay.io/keycloak/keycloak:latest \
start-dev
4. Kubernetes - Use KeyCloak Operator or Helm charts
KC_HOSTNAME for production# Email settings
KC_SMTP_HOST=smtp.example.com
KC_SMTP_PORT=587
KC_SMTP_FROM=noreply@example.com
KC_SMTP_STARTTLS=true
Create OIDC client for your application
Set redirect URIs (exact URLs, no wildcards)
Configure client type :
Obtain configuration from realm endpoint:
https://keycloak.example.com/realms/{realm}/.well-known/openid-configuration
Integrate with your app (see integration-examples.md)
Details: See authentication-sso.md
ou=users,dc=example,dc=comDetails: See user-federation.md
Essential security measures:
Complete checklist: See security-hardening.md
/health/ready and /health/live/metricsDetails: See ha-scalability.md
Full troubleshooting guide: See troubleshooting.md
# Start modes
bin/kc.sh start-dev # Development
bin/kc.sh start --optimized # Production
# Build for database
bin/kc.sh build --db=postgres
# Export/Import realm
bin/kc.sh export --dir /backup --realm my-realm
bin/kc.sh import --dir /backup
# Admin CLI
bin/kcadm.sh config credentials --server http://localhost:8080 --realm master --user admin
bin/kcadm.sh create realms -s realm=my-realm -s enabled=true
bin/kcadm.sh create users -r my-realm -s username=john -s enabled=true
bin/kcadm.sh set-password -r my-realm --username john --new-password secret
For detailed guidance, load the appropriate reference file:
Weekly Installs
102
Repository
GitHub Stars
9
First Seen
Jan 23, 2026
Security Audits
Gen Agent Trust HubWarnSocketPassSnykFail
Installed on
opencode91
gemini-cli88
codex88
github-copilot87
cursor75
kimi-cli74
信息图可视化工具 - Markdown 图表模板库,轻松创建功能列表、时间线、流程图、SWOT分析等
101 周安装
Claude子代理创建指南:创建自动化子代理提升AI开发效率
101 周安装
ASCII 图表验证器:自动检测和修复框线图对齐问题 | 技术文档工具
101 周安装
微信多开工具 wechat-multi:Mac 微信双开/多开解决方案,支持自动修复与一键管理
101 周安装
游戏音频专家技能:3A大作声音设计、FMOD/Wwise中间件、Unity/Unreal音频优化
101 周安装
聚落设计:10大核心原则与6大参数创建逼真城市发展指南
101 周安装