Skip to content

Casbin basic settings in Gin. Prepare to be merged to Protomicro cli for k8s/istio auth code generation. [WIP]

Notifications You must be signed in to change notification settings

gomaglev/casbin-multi-tenancy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[WIP]

Multiple tenancy casbin use case sample

A sample from a running system. It will be migrated to gRPC&gRPC gateway same as Protomicro in this repo. After migrated, it will be used as one of the authorization/authentication selection for dev & unit test.

Casbin basic settings and usage in Gin. It's not a good idea to use it in every microservice. Because authorization and authentication code should be avoid in each microservice service.

In Protomicro, authorization and authentication will be added to k8s/istio layer when generating source code using cli.

Main files

model.conf - how to use r = sub, dom, obj, act

config.toml - only casbin related configurations

i18n/*toml - why? only if authentication / authorization errors need to be shown in multiple languages

About

Casbin basic settings in Gin. Prepare to be merged to Protomicro cli for k8s/istio auth code generation. [WIP]

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages