Browse Source

auth: use canonical path for pre-defined guest role

Xiang Li 10 years ago
parent
commit
a1616afc5d
1 changed files with 4 additions and 4 deletions
  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{"/*"},
 		},
 	},
 }