-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add v1 API logic to RBAC plugin (#488)
* add initial test file Signed-off-by: Maia Iyer <[email protected]> * Added rbac v1 checks Signed-off-by: Maia Iyer <[email protected]> * fixed agents ban in rbac v1 list Signed-off-by: Maia Iyer <[email protected]> * nit fix Signed-off-by: Maia Iyer <[email protected]> * nit fix Signed-off-by: Maia Iyer <[email protected]> --------- Signed-off-by: Maia Iyer <[email protected]>
- Loading branch information
Showing
2 changed files
with
78 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package authorization | ||
|
||
import ( | ||
"testing" | ||
//"github.com/spiffe/tornjak/pkg/agent/authentication/user" | ||
) | ||
|
||
func TestNewRBACAuthorizer(t *testing.T) { | ||
// INIT failures | ||
// fail when no roles defined | ||
_, err := NewRBACAuthorizer("", nil, nil, nil) | ||
if err == nil { | ||
t.Fatal("ERROR: successfully initialized RBAC without roles") | ||
} | ||
} |