Casbin

Casbin

  • 문서
  • API
  • 편집기
  • IDE Plugins
  • Single Sign-On (SSO)
  • Forum
  • 도움말
  • 블로그
  • Pricing
  • Contact Sales
  • Languages icon한국어
    • English
    • 中文
    • Русский
    • Français
    • Deutsch
    • 日本語
    • 번역 참여하기
  • GitHub

›고급 사용법 (Advanced usage)

기초

  • 개요(Overview)
  • 시작하기
  • 작동 원리
  • 자습서

모델

  • 지원하는 접근 제어 모델
  • 모델(Model) 문법
  • Effector
  • 함수
  • RBAC
  • RBAC with Pattern
  • RBAC + 도메인
  • Casbin RBAC v.s. RBAC96
  • ABAC
  • Priority Model
  • Super Admin

저장소

  • 모델(Model) 저장
  • 정책(Policy) 저장
  • 정책(Policy) 부분 집합 불러오기

확장 기능

  • Enforcers
  • 어댑터
  • 감시자
  • Dispatchers
  • 역할(Role) 관리자
  • 미들웨어
  • GraphQL Middlewares
  • Cloud Native Middlewares

API

  • API Overview
  • Management API
  • RBAC API
  • RBAC with Domains API
  • RoleManager API
  • Data Permissions

고급 사용법 (Advanced usage)

  • 멀티 스레딩
  • 벤치마크
  • Performance Optimization
  • Authorization of Kubernetes
  • Authorization of Service Mesh through Envoy

관리

  • 관리자 포탈
  • Casbin 서비스
  • 로깅 및 오류 처리
  • Frontend Usage

Editor

  • 온라인 편집기
  • IDE Plugins

자세히

  • Casbin 적용 사례
  • Contributing
  • Privacy Policy
  • Terms of Service
Translate

Authorization of Service Mesh through Envoy

Envoy-authz is a middleware of Envoy which performs external RBAC & ABAC authorization through casbin. This middleware uses Envoy's external authorization API through a gRPC server. This proxy would be deployed on any type of envoy-based service meshes like Istio.

Requirements

  • Envoy 1.17+
  • Istio or any type of service mesh
  • grpc dependencies

Dependencies are managed through go.mod.

Working of Middleware

  • A client would make a http request.
  • Envoy proxy would send that request to grpc server.
  • The grpc server would then authorize the request based on casbin policies.
  • If authorized, the request would be sent through or else, it gets denied.

The grpc server is based on protocol buffer from external_auth.proto from Envoy.

// A generic interface for performing authorization check on incoming
// requests to a networked service.
service Authorization {
  // Performs authorization check based on the attributes associated with the
  // incoming request, and returns status `OK` or not `OK`.
  rpc Check(v2.CheckRequest) returns (v2.CheckResponse);
}

From the above proto file, we have to use Check() service in the authorization server.

Usage

  • Define the Casbin policies under config files by following this guide.

You can verify/test your policies on online casbin-editor.

  • Start the authorizing server by running:-
$ go build .
$ ./authz 
  • Load the envoy configuration:-
$  envoy -c authz.yaml -l info

Once the envoy starts, it will start intercepting requests for the authorization process.

Integrating to Istio

You need to send custom headers, which would contain usernames in the JWT token OF headers for this middleware to work. You can check the official Istio docs to get more info on modifying Request Headers.

← Authorization of Kubernetes관리자 포탈 →
  • Requirements
  • Working of Middleware
  • Usage
  • Integrating to Istio
Casbin
Docs
Getting StartedManagement APIRBAC APIMiddlewares
Community
Who's using Casbin?Stack Overflow
Casbin          jCasbin
Node-Casbin   PHP-CasbinPyCasbin          Casbin.NETCasbin-CPP        Casbin-RS
Follow @casbinHQ
Copyright © 2022 Casbin Organization