Skip to content

Commit 88a6b15

Browse files
authored
Merge pull request #116 from authorizon/provider_guide_fixes
Provider guide fixes
2 parents f72d485 + 8f5431b commit 88a6b15

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

docs/HOWTO/write_your_own_fetch_provider.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ The guide has 3 main parts:
66
1) [Background](#background) - explains why we need custom fetch providers, gives examples for use cases and explains what fetch providers are.
77
2) [Writing your own fetch provider](#writing-providers) - step-by-step explanation how to write your own fetch provider.
88
3) [Using a custom fetch provider](#using-providers) - given a custom fetch provider (either published by someone else or written by you), shows how to use the provider in your own OPAL setup.
9+
10+
## TL;DR
11+
This tutorial is long and detailed, but the gist of it is:
12+
* All Fetch Providers are simply python classes that derive from [BaseFetchProvider](https://github.com/authorizon/opal/blob/master/opal_common/fetcher/fetch_provider.py#L9).
13+
* You need to implement the fetching logic in `_fetch_()` and optionally `_process_()`.
14+
* Once you finish implementing your provider, you can publish it as a pip package. You can then tell OPAL to use it with the configuration env var `OPAL_FETCH_PROVIDER_MODULES`.
15+
* We created a well-documented [example fetch provider for Postgres SQL](https://github.com/authorizon/opal-fetcher-postgres). If you prefer to learn from a real code example you can simply clone it and play with it.
16+
917
## <a name="background"></a>Background
1018

1119
One of the core features of OPAL (besides realtime syncing of authorization state) is the ability to **aggregate state** from multiple data sources into OPA.

setup/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Project homepage: https://github.com/authorizon/opal
88
"""
99

10-
VERSION = (0, 1, 10)
10+
VERSION = (0, 1, 11)
1111
VERSION_STRING = '.'.join(map(str,VERSION))
1212

1313
__version__ = VERSION_STRING

0 commit comments

Comments
 (0)