Casbin

Casbin

  • ドキュメント
  • API
  • エディター
  • IDE プラグイン
  • Single Sign-On (SSO)
  • フォーラム
  • ヘルプ
  • ブログ
  • Pricing
  • Contact Sales
  • Languages icon日本語
    • English
    • 中文
    • 한국어
    • Русский
    • Français
    • Deutsch
    • 翻訳に協力する
  • GitHub

›拡張

基本

  • 概要
  • はじめよう
  • 仕組み
  • チュートリアル

モデル

  • サポートされるモデル
  • モデルの構文
  • エフェクト
  • 関数
  • RBAC
  • RBAC with Pattern
  • ドメイン付きRBAC
  • Casbin RBAC v.s. RBAC96
  • ABAC
  • 優先モデル
  • スーパー管理者

ストレージ

  • モデル ストレージ
  • ポリシーストレージ
  • ポリシーサブセットの読み込み

拡張

  • Enforcers
  • アダプター
  • Watchers
  • 派遣者
  • ロールマネージャー
  • ミドルウェア
  • GraphQL Middlewares
  • Cloud Native Middlewares

API

  • API の概要
  • 管理API
  • RBAC API
  • Domains API による RBAC
  • RoleManager API
  • データ権限

高度な使い方

  • マルチスレッド
  • Benchmarks
  • パフォーマンス最適化
  • Kubernetes の承認
  • Envoyによるサービスメッシュの承認

管理

  • 管理者ポータル
  • カスビンサービス
  • ログとエラー処理
  • フロントエンドの使用法

エディター

  • オンラインエディター
  • IDE プラグイン

もっと見る

  • Adopters
  • コントリビューション
  • プライバシーポリシー
  • 利用規約
Translate

Watchers

etcd のような分散型メッセージングシステムを使用して、複数のCasbin エンフォーサーインスタンス間で一貫性を保つことができます。 したがって、ユーザーは複数のCasbinエンフォーサーを同時に使用して、大量の権限チェックリクエストを処理できます。

ポリシーストレージアダプタと同様に、私たちはメインライブラリにウォッチャーコードを入れません。 新しいメッセージングシステムのサポートは、ウォッチャーとして実装する必要があります。 Casbinウォッチャーの完全なリストは以下のように提供されています。 新しいウォッチャーに対するサードパーティの貢献を歓迎します。お知らせください。このリストに記載します:)

Go
Java
Node.js
Python
.NET
Ruby
PHP
ウォッチャータイプ作成者説明
Etcd WatcherKV ストアCasbinetcd の監視者
Redis WatcherKV ストアCasbinRedis のウォッチャー
Redis WatcherKV ストア@billcobblerRedis のウォッチャー
TiKVウォッチャーKV ストアCasbinTiKV の監視人
Kafka WatcherSMSシステム@wgarunapApache Kafka の腕時計
NATS WatcherSMSシステムSolutoNATS の監視人
ZooKeeperウォッチャーSMSシステムGrepsrApache ZooKeeper の の腕時計
NATS, RabbitMQ, GCP Pub/Sub, AWS SNS & SQS, Kafka, InMemorySMSシステム@rusenask主要なクラウドプロバイダーと自己ホストインフラストラクチャで動作する Go Cloud Dev Kit に基づくウォッチャー
RocketMQウォッチャーSMSシステム@fmyxyzApache RocketMQ の腕時計
ウォッチャータイプ作成者説明
Etcd アダプターKV ストア@mapleafgoetcd の監視者
Redis WatcherKV ストアCasbinRedis のウォッチャー
Kafka WatcherSMSシステムCasbinApache Kafka の腕時計
ウォッチャータイプ作成者説明
Etcd WatcherKV ストアCasbinetcd の監視者
Redis WatcherKV ストアCasbinRedis のウォッチャー
Pub/Sub WatcherSMSシステムCasbinGoogle Cloud Pub/Sub のウッチャー
Postgres WatcherデータベースMatteo CollinaPostgreSQL のウォッチャー
ウォッチャータイプ作成者説明
Redis WatcherKV ストアScienceLogicRedis のウォッチャー
PostgreSQLウォッチャーデータベースCasbinPostgreSQL のウォッチャー
ウォッチャータイプ作成者説明
Redis WatcherKV ストア@SbouRedis のウォッチャー
ウォッチャータイプ作成者説明
Redis WatcherKV ストアCasbinRubyRedis のウォッチャー
RabbitMQ ウォッチャーSMSシステムCasbinRubyRabbitMQ の監視人
WatcherTypeAuthorDescription
Redis WatcherKV storeTinywanWatcher for Redis

WatcherEx

In order to support incremental synchronization between multiple instances, we provide the WatcherEx interface. We hope it can notify other instances when the policy changes, but there is currently no implementation of WatcherEx. We recommend that you use dispatcher to achieve this.

Compared with Watcher interface, WatcherEx can distinguish what type of update action is received, e.g., AddPolicy and RemovePolicy.

WatcherEx Apis:

apidescription
SetUpdateCallback(func(string)) errorSetUpdateCallback sets the callback function that the watcher will call, when the policy in DB has been changed by other instances. A classic callback is Enforcer.LoadPolicy().
Update() errorUpdate calls the update callback of other instances to synchronize their policy. It is usually called after changing the policy in DB, like Enforcer.SavePolicy(), Enforcer.AddPolicy(), Enforcer.RemovePolicy(), etc.
Close()Close stops and releases the watcher, the callback function will not be called any more.
UpdateForAddPolicy(sec, ptype string, params ...string) errorUpdateForAddPolicy calls the update callback of other instances to synchronize their policy. It is called after a policy is added via Enforcer.AddPolicy(), Enforcer.AddNamedPolicy(), Enforcer.AddGroupingPolicy() and Enforcer.AddNamedGroupingPolicy().
UpdateForRemovePolicy(sec, ptype string, params ...string) errorUPdateForRemovePolicy calls the update callback of other instances to synchronize their policy. It is called after a policy is removed by Enforcer.RemovePolicy(), Enforcer.RemoveNamedPolicy(), Enforcer.RemoveGroupingPolicy() and Enforcer.RemoveNamedGroupingPolicy().
UpdateForRemoveFilteredPolicy(sec, ptype string, fieldIndex int, fieldValues ...string) errorUpdateForRemoveFilteredPolicy calls the update callback of other instances to synchronize their policy. It is called after Enforcer.RemoveFilteredPolicy(), Enforcer.RemoveFilteredNamedPolicy(), Enforcer.RemoveFilteredGroupingPolicy() and Enforcer.RemoveFilteredNamedGroupingPolicy().
UpdateForSavePolicy(model model.Model) errorUpdateForSavePolicy calls the update callback of other instances to synchronize their policy. It is called after Enforcer.SavePolicy()
UpdateForAddPolicies(sec string, ptype string, rules ...[]string) errorUpdateForAddPolicies calls the update callback of other instances to synchronize their policy. It is called after Enforcer.AddPolicies(), Enforcer.AddNamedPolicies(), Enforcer.AddGroupingPolicies() and Enforcer.AddNamedGroupingPolicies().
UpdateForRemovePolicies(sec string, ptype string, rules ...[]string) errorUpdateForRemovePolicies calls the update callback of other instances to synchronize their policy. It is called after Enforcer.RemovePolicies(), Enforcer.RemoveNamedPolicies(), Enforcer.RemoveGroupingPolicies() and Enforcer.RemoveNamedGroupingPolicies().
← アダプター派遣者 →
  • WatcherEx
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