-
Notifications
You must be signed in to change notification settings - Fork 242
OpenFGA Integration #673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
daveads
wants to merge
54
commits into
permitio:master
Choose a base branch
from
daveads:feat/openfga-policy-engine
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
OpenFGA Integration #673
Changes from all commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
2008c54
Draft
daveads 81f9fa1
test
daveads 59b2f89
init test**
daveads b84bd88
inital test
daveads 0778841
configs
daveads 2c30962
fix...
daveads 646a244
packages/opal-common/opal_common/engine/paths.py
daveads d29c71e
test...
daveads f802eb2
implemented using api calls drop openfga_sdk
daveads fa9df9d
openfga test
daveads 2a89c34
test
daveads 7c98c35
docker test
daveads c450108
..
daveads f19b265
support for .yaml policy file
daveads 832d903
bug free
daveads e9b013b
docker
daveads 42374cc
Done
daveads bebad51
based off review
daveads 0862044
fix improper indentation
daveads 150edd9
review
daveads 773bea4
..
daveads 3ecba01
Merge branch 'master' into feat/openfga-policy-engine
daveads b7f27e9
formatted
daveads 96a55db
Merge branch 'master' into feat/openfga-policy-engine
daveads e1bacf0
added INLINE_OPENFGA_EXEC_PATH
daveads d4ecc3c
formatter
daveads 73d31da
test
daveads d602c0b
..
daveads 4d57122
..
daveads 4900a9e
openfga app-test
daveads fe7da70
...
daveads 96c54b4
EXEC_PATH openfga
daveads 9451b04
doc
daveads 2f093c9
openfga docs
daveads a8b147f
formatted
daveads 71ee7d0
..
daveads d417531
format
daveads f45f366
docker
daveads f8c3eea
..
daveads 93b853c
Merge branch 'master' into feat/openfga-policy-engine
danyi1212 31c0204
Merge branch 'master' into feat/openfga-policy-engine
danyi1212 2c22639
format
daveads 3550ea9
merge master
daveads 4880a02
test
daveads 5d567ee
formatt
daveads 3eaa392
Merge branch 'master' into feat/openfga-policy-engine
daveads 5ee38c3
merged master
daveads c4d16c2
docs
daveads c05b885
format
daveads dd19cfc
Update documentation/docs/tutorials/openfga.mdx
gemanor a17ee8e
Update documentation/docs/tutorials/openfga.mdx
gemanor 3c5adb2
Update documentation/docs/tutorials/openfga.mdx
gemanor 088f9bc
Merge branch 'master' into feat/openfga-policy-engine
daveads d1421cc
Merge branch 'master' into feat/openfga-policy-engine
daveads File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| name: OpenFGA Tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ test ] | ||
| pull_request: | ||
| branches: [ test ] | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v3 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: '3.x' | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install pytest pytest-asyncio aiohttp docker | ||
|
|
||
| - name: Start services | ||
| run: | | ||
| ./app-tests/run-openfga-services.sh | ||
|
|
||
| - name: Run tests | ||
| run: | | ||
| pytest app-tests/openfga-test.py -v | ||
|
|
||
| - name: Cleanup | ||
| if: always() # Run cleanup even if tests fail | ||
| run: | | ||
| ./app-tests/clean-openfga-services.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Stop and remove containers, networks, volumes | ||
| echo "Cleaning up services..." | ||
| docker compose -f docker-compose-app-tests-openfga.yml down -v | ||
|
|
||
| echo "Cleanup complete" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| version: '3' | ||
| services: | ||
| broadcast_channel: | ||
| image: postgres:alpine | ||
| environment: | ||
| - POSTGRES_DB=postgres | ||
| - POSTGRES_USER=postgres | ||
| - POSTGRES_PASSWORD=postgres | ||
| networks: | ||
| - opal-network | ||
|
|
||
| opal_server: | ||
| image: permitio/opal-server:latest | ||
| environment: | ||
| - OPAL_BROADCAST_URI=postgres://postgres:postgres@broadcast_channel:5432/postgres | ||
| - UVICORN_NUM_WORKERS=4 | ||
| - OPAL_POLICY_REPO_URL=https://github.com/daveads/opal-example-policy-openfga | ||
| - OPAL_POLICY_REPO_POLLING_INTERVAL=30 | ||
| - OPAL_DATA_CONFIG_SOURCES={"config":{"entries":[{"url":"http://opal_server:7002/policy-data","topics":["policy_data"],"dst_path":"/static"}]}} | ||
| - OPAL_LOG_FORMAT_INCLUDE_PID=true | ||
| ports: | ||
| - "7002:7002" | ||
| depends_on: | ||
| - broadcast_channel | ||
| networks: | ||
| - opal-network | ||
|
|
||
| opal_client_openfga: | ||
| image: permitio/opal-client-openfga:latest | ||
| environment: | ||
| - OPAL_SERVER_URL=http://opal_server:7002 | ||
| - OPAL_LOG_FORMAT_INCLUDE_PID=true | ||
| - OPAL_POLICY_STORE_TYPE=OPENFGA | ||
| - OPAL_POLICY_STORE_URL=http://0.0.0.0:8080 | ||
| - OPAL_OPENFGA_STORE_ID=01JAT34GM6T5WRVMXXDYWGSYKN | ||
| - OPAL_INLINE_OPENFGA_ENABLED=true | ||
| #- OPAL_LOG_LEVEL=DEBUG | ||
|
|
||
| ports: | ||
| - "7766:7000" | ||
| - "8080:8080" | ||
| - "3000:3000" | ||
| networks: | ||
| - opal-network | ||
| depends_on: | ||
| - opal_server | ||
| command: sh -c "exec ./wait-for.sh opal_server:7002 --timeout=40 -- ./start.sh" | ||
| volumes: | ||
| - openfga_backup:/opal/backup:rw | ||
|
|
||
| networks: | ||
| opal-network: | ||
| driver: bridge | ||
|
|
||
| volumes: | ||
| openfga_backup: | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.