tencentblueking / bk-iam Goto Github PK
View Code? Open in Web Editor NEWBK-IAM is a centralized permission management service provided by The Tencent BlueKing; based on ABAC
License: Other
BK-IAM is a centralized permission management service provided by The Tencent BlueKing; based on ABAC
License: Other
我们同一个ldap,ou=People,dc=xxx 想在蓝鲸中配置成两个登录域,但是实践的时候出现,可以新增ldap目录,但是同步用户数据更新的时候,出现【Duplicate entry 'People' for key 'code'】不允许配置两个相同People的操作,我们该如何配置,才能将同一个ldap配置成两个登录域
需求背景
部分客户和系统希望对权限的控制均由管理员下放,不希望用户自主申请;把每个saas没有权限,跳转申请的的功能屏蔽掉。有些用户本来就不可以去申请这个资源的权限的,但是留了入口他也能申请,会有一堆这种权限申请的单子
需求
1、当前交互为无权限的操作置灰,且点击后支持前往申请。期望支持无权限的直接隐藏
2、若需求1暂不能支持。希望能够提供查询指定用户权限策略的接口
后续会不会支持helm k8s部署?
helm chart graceful rolling update
获取二级管理员的用户组时,希望返回用户组的人员模板数量
代码:https://github.com/TencentBlueKing/bk-iam/blob/master/pkg/database/utils.go
使用场景:
// 生成统一的DB事务
tx, err := database.GenerateDefaultDBTx()
defer database.RollBackWithLog(tx)
// err如果不为nil,tx会为nil
if err != nil {
err = errorWrapf(err, "define tx fail")
return
}
// RollBackWithLog will rollback and log if error
func RollBackWithLog(tx *sqlx.Tx) {
// 这里加个tx nil判断 return最好
err := tx.Rollback()
if err != sql.ErrTxDone && err != nil {
logging.GetSQLLogger().Error(err)
}
}
是BUG反馈
还是需求提交
(Is this a BUG REPORT or FEATURE REQUEST)? (choose one):
需求提交
bk-iam-app SaaS/bk-iam后台版本(The versions used):
当前最新版本仍未有该功能
需求背景:
目前很多外部自研saas进行权限中心接入,接入过程经常需要进行注册数据调整(例如变更system_id)或回退注册动作进行重新操作,目前实现这个修改动作需要采用数据库方案, 不够便捷也不够安全
期望是什么(What you expected to happen):
发生了什么(What happened):
问题:bkiam后台服务使用 mysql 8.0.23 进行承载数据时,普通用户在根据 action_id 为 access_developer_center
进行鉴权时,后台日志出现以下报错:
Error 1064: You have an error in your SQL syntax; check the manual the corresponds to your MySQL server version for the right syntax to user near 'groups
FROM subject_system_group
WHERE system_id = 'bk_paas' AND subject_pk ' at line 3
经检查,是由于 iam 后台所定义的 sql 查询语句使用了 groups
的关键字,这是 mysql 8 新增的保留关键字,所以导致语法错误。
期望是什么(What you expected to happen):
在不修改数据库表结构的前提下,建议是把 SQL 语句中的所有关键字都使用反引号 `
进行包括起来 ,也可以遵循 MySQL 的 不完全限定名 unqualified name ,使用 table_name.column_name
的方式进行编写 SQL 语句。
如:
SELECT
`subject_pk`,
`groups`,
FROM
`subject_system_group`
WHERE
`system_id` = ?
AND
`subject_pk` IN (?)
如何复现(How to reproduce it):
只需要把 bkiam 后台切换成 mysql8 即可。
相关的日志详情(SaaS 及后台日志说明 https://bk.tencent.com/docs/document/6.0/160/8398)和截图等(Log & Screenshot):
备注(Anything else we need to know):
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.