https://github.com/casbin/tyk-authz
Casbin authorization plugin for tyk API gateway
https://github.com/casbin/tyk-authz
abac acl api-gateway auth authorization authz casbin rbac tyk
Last synced: 11 months ago
JSON representation
Casbin authorization plugin for tyk API gateway
- Host: GitHub
- URL: https://github.com/casbin/tyk-authz
- Owner: casbin
- License: apache-2.0
- Created: 2022-07-10T07:09:55.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-07-13T15:14:23.000Z (over 3 years ago)
- Last Synced: 2024-10-29T10:05:04.703Z (about 1 year ago)
- Topics: abac, acl, api-gateway, auth, authorization, authz, casbin, rbac, tyk
- Language: Go
- Homepage: https://github.com/casbin/casbin
- Size: 38.1 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tyk-authz
Casbin authorization plugin for Tyk.
## Installation
Compile it:
``` bash
docker run --rm -v `pwd`:/plugin-source tykio/tyk-plugin-compiler:v3.2.3 plugin.so
```
Copy the example Tyk Gateway api definition `examples\casbin-authz-api-example.json` (as well as the model&policy configfile) and the compiled `plugin.so` to the Tyk plugins directory.
Modify the path in the `casbin-authz-api-example.json` to point to the compiled `plugin.so` file & config files.
Start the Tyk Gateway and test the plugin.
```bash
curl http://localhost:8080/test/get -i # it will receive a 401
curl -H "username:alice" http://localhost:8080/test/get -i -v # it will receive a 200
```