Skip to content

aserto-demo/go-rbac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go RBAC Examples

This repository contains a number of Go applications, each demonstrates a different approach to implementing Resource-Based Authorization (RBAC) for a simple HTTP API.

Running the Examples

To run an example, cd to its directory and run go run ..

For example, to run the casbin example:

$ cd casbin
$ go run .
Staring server on 0.0.0.0:8080

You can now send requests using curl. For example:

$ curl -X POST -f -u beth@the-smiths.com:x http://localhost:8080/api/megaSeeds
curl: (22) The requested URL returned error: 403

$ curl -X GET -f -u beth@the-smiths.com:x http://localhost:8080/api/megaSeeds
"Got permission"

About

Examples of RBAC implementations in Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages