Skip to content

riskytrees/api-service

Repository files navigation

riskytrees API Service

This is the primary backend web service for managing complex, configurable, attack trees.

Running Locally

Pre-requisites

Required environment variables

You will first want to populate a .env file (or use tests/mocklab_odic.env) to ensure logins and the primary session token signing key are set.

  1. RISKY_TREES_GOOGLE_REDIRECT_URL

  2. RISKY_TREES_GOOGLE_CLIENT_ID

  3. RISKY_TREES_GOOGLE_CLIENT_SECRET

  4. RISKY_TREES_GOOGLE_AUTH_URL

  5. RISKY_TREES_GOOGLE_TOKEN_URL

  6. RISKY_TREES_GOOGLE_ISSUER_URL

  7. RISKY_TREES_GOOGLE_JWKS_URL

  8. RISKY_TREES_GITHUB_REDIRECT_URL

  9. RISKY_TREES_GITHUB_CLIENT_ID

  10. RISKY_TREES_GITHUB_CLIENT_SECRET

  11. RISKY_TREES_GITHUB_AUTH_URL

  12. RISKY_TREES_GITHUB_TOKEN_URL

  13. RISKY_TREES_GITHUB_ISSUER_URL

  14. RISKY_TREES_GITHUB_JWKS_URL

  15. RISKY_TREES_JWT_SECRET

Tool chain

  1. You will need to install rust: https://www.rust-lang.org/tools/install
  2. You will also need docker installed: https://www.docker.com/get-started/

Building & Running

  1. To setup the database, run ./tests/simulatedb.sh
  2. To build, cd into the riskytrees subdirectory and run: cargo build.
  3. To run, execute: export ROCKET_ADDRESS=0.0.0.0 && source ../tests/mocklab_odic.env && cargo run. (Replace ../tests/mocklab_odic.env with the path to your .env file if you changed anything.)

About

Attack Tree Modeling Tool

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages