Add read:self and cancel:self to sessions; add dev unpriv user (#923)

* Sessions support for read:self and cancel:self permissions. This is automatic with fallback; no API change is needed.

* Strips out values from listing if only self actions are allowed on the resource and the user ID is different. This prevents a default ACL of id=*;type=session;actions=read:self,cancel:self from causing all values to be visible when listing.

* Adds an unprivileged user to development/testing instances. This user has only default permissions plus the ability to authorize sessions in the default target.
This commit is contained in:
Jeff Mitchell authored and GitHub committed 2021-02-11 13:14:18 -05:00
1 parent d279a906ce
commit 22462cdd84
28 files changed
+626 -196

No files matched your search

@@ -13,9 +13,6 @@ import (
func TestMultiControllerMultiWorkerConnections(t *testing.T) {
require := require.New(t)
amId := "ampw_1234567890"
user := "user"
password := "passpass"
logger := hclog.New(&hclog.LoggerOptions{
Level: hclog.Trace,
})
@@ -24,11 +21,8 @@ func TestMultiControllerMultiWorkerConnections(t *testing.T) {
require.NoError(err)
c1 := controller.NewTestController(t, &controller.TestControllerOpts{
Config: conf,
DefaultAuthMethodId: amId,
DefaultLoginName: user,
DefaultPassword: password,
Logger: logger.Named("c1"),
Config: conf,
Logger: logger.Named("c1"),
})
defer c1.Shutdown()