Backport of [CC-6039] Update builtin policy descriptions into release/1.16.x (#18745)
backport of commit aa8dee9c1ae9896ed689a441b96ebc5987dfd76b Co-authored-by: Jeremy Jacobson <jeremy.jacobson@hashicorp.com>
This commit is contained in:
parent
00aafa47c1
commit
037cf8f44b
|
@ -107,7 +107,7 @@ func TestFSM_SnapshotRestore_CE(t *testing.T) {
|
||||||
policy := &structs.ACLPolicy{
|
policy := &structs.ACLPolicy{
|
||||||
ID: structs.ACLPolicyGlobalManagementID,
|
ID: structs.ACLPolicyGlobalManagementID,
|
||||||
Name: "global-management",
|
Name: "global-management",
|
||||||
Description: "Builtin Policy that grants unlimited access",
|
Description: structs.ACLPolicyGlobalManagementDesc,
|
||||||
Rules: structs.ACLPolicyGlobalManagementRules,
|
Rules: structs.ACLPolicyGlobalManagementRules,
|
||||||
}
|
}
|
||||||
policy.SetHash(true)
|
policy.SetHash(true)
|
||||||
|
|
|
@ -1582,7 +1582,7 @@ func TestStateStore_ACLPolicy_SetGet(t *testing.T) {
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
require.NotNil(t, rpolicy)
|
require.NotNil(t, rpolicy)
|
||||||
require.Equal(t, "global-management", rpolicy.Name)
|
require.Equal(t, "global-management", rpolicy.Name)
|
||||||
require.Equal(t, "Builtin Policy that grants unlimited access", rpolicy.Description)
|
require.Equal(t, structs.ACLPolicyGlobalManagementDesc, rpolicy.Description)
|
||||||
require.Equal(t, structs.ACLPolicyGlobalManagementRules, rpolicy.Rules)
|
require.Equal(t, structs.ACLPolicyGlobalManagementRules, rpolicy.Rules)
|
||||||
require.Len(t, rpolicy.Datacenters, 0)
|
require.Len(t, rpolicy.Datacenters, 0)
|
||||||
require.Equal(t, uint64(1), rpolicy.CreateIndex)
|
require.Equal(t, uint64(1), rpolicy.CreateIndex)
|
||||||
|
|
|
@ -47,11 +47,11 @@ const (
|
||||||
// may rename if desired but cannot delete or modify the rules.
|
// may rename if desired but cannot delete or modify the rules.
|
||||||
ACLPolicyGlobalManagementID = "00000000-0000-0000-0000-000000000001"
|
ACLPolicyGlobalManagementID = "00000000-0000-0000-0000-000000000001"
|
||||||
ACLPolicyGlobalManagementName = "global-management"
|
ACLPolicyGlobalManagementName = "global-management"
|
||||||
ACLPolicyGlobalManagementDesc = "Builtin Policy that grants unlimited access"
|
ACLPolicyGlobalManagementDesc = "A built-in policy that grants read and write access to all Consul features"
|
||||||
|
|
||||||
ACLPolicyGlobalReadOnlyID = "00000000-0000-0000-0000-000000000002"
|
ACLPolicyGlobalReadOnlyID = "00000000-0000-0000-0000-000000000002"
|
||||||
ACLPolicyGlobalReadOnlyName = "builtin/global-read-only"
|
ACLPolicyGlobalReadOnlyName = "builtin/global-read-only"
|
||||||
ACLPolicyGlobalReadOnlyDesc = "Builtin Policy that grants unlimited read-only access to all components"
|
ACLPolicyGlobalReadOnlyDesc = "A built-in policy that grants read-only access to all Consul features"
|
||||||
|
|
||||||
ACLReservedIDPrefix = "00000000-0000-0000-0000-0000000000"
|
ACLReservedIDPrefix = "00000000-0000-0000-0000-0000000000"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue