Fix unknown permission issue with credential-store (#1524)

This also affected credential libraries and managed groups. It seems
that any end-to-end tests of these grants currently had them included in
wildcards instead of individually, but these types were never added to
the valid list for resources. Additionally, credential store wasn't
added as a valid top level type for pinning purposes.
This commit is contained in:
Jeff Mitchell authored and GitHub committed 2021-09-13 13:56:44 -04:00
1 parent 30736b3bcd
commit 92809b733a
7 files changed
+41 -51

No files matched your search

@@ -21,6 +21,7 @@ import (
"github.com/hashicorp/boundary/internal/servers/controller/handlers"
"github.com/hashicorp/boundary/internal/servers/controller/handlers/authmethods"
"github.com/hashicorp/boundary/internal/servers/controller/handlers/authtokens"
"github.com/hashicorp/boundary/internal/servers/controller/handlers/credentialstores"
"github.com/hashicorp/boundary/internal/servers/controller/handlers/groups"
"github.com/hashicorp/boundary/internal/servers/controller/handlers/host_catalogs"
"github.com/hashicorp/boundary/internal/servers/controller/handlers/roles"
@@ -76,10 +77,11 @@ var (
},
scope.Project.String(): {
resource.Group: groups.CollectionActions,
resource.HostCatalog: host_catalogs.CollectionActions,
resource.Role: roles.CollectionActions,
resource.Target: targets.CollectionActions,
resource.CredentialStore: credentialstores.CollectionActions,
resource.Group: groups.CollectionActions,
resource.HostCatalog: host_catalogs.CollectionActions,
resource.Role: roles.CollectionActions,
resource.Target: targets.CollectionActions,
},
}
)
@@ -146,6 +146,12 @@ var orgAuthorizedCollectionActions = map[string]*structpb.ListValue{
}
var projectAuthorizedCollectionActions = map[string]*structpb.ListValue{
"credential-stores": {
Values: []*structpb.Value{
structpb.NewStringValue("create"),
structpb.NewStringValue("list"),
},
},
"groups": {
Values: []*structpb.Value{
structpb.NewStringValue("create"),