We would love for you to contribute to this project and help make it even better than it is today! 💎
As a contributor, here are the guidelines we would like you to follow:
Come talk to us about OPAL, or authorization in general - we would love to hear from you ❤️
You can:
- Raise questions in our GitHub discussions
- Report issues and ask for features in GitHub issues
- Follow us on Twitter to get the latest OPAL updates
- Join our Slack community to chat about authorization, open-source, realtime communication, tech or anything else! We are super available on Slack ;)
If you are using our project, please consider giving us a ⭐️
If you find a bug in the source code, you can help us by submitting an issue or even better, you can submit a Pull Request with a fix.
Before you submit an issue, please search the issue tracker; maybe an issue for your problem already exists, and the discussion might inform you of workarounds readily available.
We want to fix all the issues as soon as possible, but before fixing a bug, we need to reproduce and confirm it. In order to reproduce bugs, we require that you provide:
- Full logs of OPAL server and OPAL client
- Your configuration for OPAL server and OPAL client
- i.e.: Docker Compose, Kubernetes YAMLs, environment variables, etc.
- Redact any secrets/tokens/API keys in your config
You can request a new feature by submitting an issue to our GitHub Repository. Please provide as much detail and context as possible, along with examples or references to similar features, as this will help us understand your request better.
We encourage you to contribute to OPAL by submitting a Pull Request with your feature implementation and are happy to guide you through the process.
Custom Fetch Providers are a great way to extend OPAL, and we would love to see your implementation of a new fetch provider! To get started, you can check out the tutorial on how to Write Your Own Fetch Provider.
We are always looking to improve OPAL and would love to hear your ideas!
Pull requests are welcome! 🙏
Please follow these guidelines:
- Create an Issue: Open a GitHub Issue for your feature or bug fix.
- Fork & Branch: Fork this repository and create a new branch based on
master
. Name your branch descriptively (e.g.,fix/issue-123
,feature/new-fetch-provider
). - Write Tests: If your changes affect functionality, include tests.
- Update Documentation: Ensure any new features or configurations are documented.
- Check Quality: Run all tests and linters:
pytest pre-commit run --all-files
- Submit PR: Open a pull request, linking to the issue and explaining your changes clearly.
We aim to review all PRs promptly. After you submit a PR, here’s what you can expect:
- Initial Review: A maintainer will review your PR within a few days. If there are any issues, they will provide feedback.
- Feedback: If changes are needed, please make the necessary updates and push them to your branch. The PR will be updated automatically.
- Approval: Once your PR is approved, it will be merged into the main branch.
- Release: Your changes will be included in the next release of OPAL. We will update the changelog and release notes accordingly.
- Announcement: We will announce your contribution in our community channels and give you a shoutout! 🎉
Before submitting your contribution, ensure the following:
- Issue created and linked in the PR
- Branch created from
master
and appropriately named - Tests written and passing
- Documentation updated (if applicable)
- Code formatted and linted
- Changes thoroughly explained in the PR description
We are excited to have you onboard as a contributor to OPAL! 🎉
- Fork the repository and clone it to your local machine.
- Create a virtual environment and install the dependencies:
python3 -m venv venv source venv/bin/activate pip install -r requirements.txt
- Install the pre-commit hooks:
pre-commit install
You can run the OPAL server and client locally using the OPAL CLI or using uvicorn directly.
Configure OPAL by setting environment variables:
export OPAL_POLICY_REPO_URL=https://github.com/permitio/opal-example-policy-repo
export OPAL_DATA_CONFIG_SOURCES={"config":{"entries":[{"url":"http://localhost:7002/policy-data","topics":["policy_data"],"dst_path":"/static"}]}}
export OPAL_SERVER_URL=http://localhost:7002
More information about the available configurations can be found in the OPAL documentation.
opal-server run
opal-client run
uvicorn opal_server.main:app --reload
uvicorn opal_client.main:app --reload
You can build the Docker images for the OPAL server and client using the following commands:
make docker-build-server
make docker-build-client # with inline OPA engine
make docker-build-client-cedar # with inline cedar agent engine
make docker-build-client-standalone # without inline engine
When contributing to the documentation, you can run the documentation locally and preview your changes live.
- Navigate to the
docs
directory:cd documentation
- Install the dependencies:
npm install
You can run the documentation live using the following command:
npm run start
You can run the linting and formatting checks using the following command:
pre-commit run --all-files
You can run the tests using the following command:
pytest
The E2E tests run OPAL Server and Client in a docker-compose environment and test the core features of OPAL.
They are external to the OPAL packages and are located in the app-tests
directory.
Read more about how to run the E2E tests in the app-tests README.
We’re excited to see your contributions and will do our best to support you through the process! 👏