fix(security): restrict service monitors to probe tasks

This commit is contained in:
naiba
2026-08-15 05:00:28 +00:00
parent 42d9e4c8c3
commit 38824dbc11
16 changed files with 338 additions and 20 deletions
+4 -1
View File
@@ -23,7 +23,10 @@ func initUser() {
var users []model.User
DB.Find(&users)
// for backward compatibility
// Backward compatibility for pre-user-scoped Agents. AgentSecretKey is a
// deployment-wide migration/master credential, so user 0 is intentionally
// not tenant-scoped. Do not remove this mapping until every legacy Agent has
// rotated to a per-user/per-Agent credential; doing so would disconnect them.
UserInfoMap[0] = model.UserInfo{
Role: model.RoleAdmin,
AgentSecret: Conf.AgentSecretKey,