Embed the default policy in the binary

This commit is contained in:
Quentin Gliech
2022-06-02 13:57:21 +02:00
parent 173351cb75
commit 9afec75dc8
16 changed files with 105 additions and 41 deletions

View File

@@ -9,6 +9,7 @@ See the [Documentation](https://matrix-org.github.io/matrix-authentication-servi
- [Install Rust and Cargo](https://www.rust-lang.org/learn/get-started)
- [Install Node.js and npm](https://nodejs.org/)
- [Install Open Policy Agent](https://www.openpolicyagent.org/docs/latest/#1-download-opa)
- Clone this repository
- Generate the frontend:
```sh
@@ -17,6 +18,14 @@ See the [Documentation](https://matrix-org.github.io/matrix-authentication-servi
npm run build
cd ../..
```
- Build the Open Policy Agent policies
```sh
cd crates/policy/policies
make
# OR, if you don't have `opa` installed and want to build through the OPA docker image
make DOCKER=1
cd ../../..
```
- Generate the sample config via `cargo run -- config generate > config.yaml`
- Run the database migrations via `cargo run -- database migrate`
- Run the server via `cargo run -- server -c config.yaml`