瀏覽代碼

auth: use canonical path for pre-defined guest role

Xiang Li 11 年之前
父節點
當前提交
a1616afc5d
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      etcdserver/auth/auth.go

+ 4 - 4
etcdserver/auth/auth.go

@@ -53,8 +53,8 @@ var rootRole = Role{
 	Role: RootRoleName,
 	Permissions: Permissions{
 		KV: RWPermission{
-			Read:  []string{"*"},
-			Write: []string{"*"},
+			Read:  []string{"/*"},
+			Write: []string{"/*"},
 		},
 	},
 }
@@ -63,8 +63,8 @@ var guestRole = Role{
 	Role: GuestRoleName,
 	Permissions: Permissions{
 		KV: RWPermission{
-			Read:  []string{"*"},
-			Write: []string{"*"},
+			Read:  []string{"/*"},
+			Write: []string{"/*"},
 		},
 	},
 }