Deputy is a Digital Library for cybersecurity exercise artifacts. Deputy functionality is divided into 3 categories:
-
deputy-package-serverExecutable that acts as a repository for the artifacts -
deputyCLI program that acts as a client for the repository. -
deputy-libraryRust library containing shared code and structures between server and the client program
Use attached .devcontainer in vscode for better development experience.
Executable at target/debug/deputy is automatically added to the path and working configuration
is specified at /home/vscode/.deputy/configuration.toml.
To test the CLI against a locally running deputy-package-server, set the .devcontainer/deputy-development/deputy-configuration.toml files main-registry to http://127.0.0.1:9000/.
For now testing out changes in deputy involves two steps
-
cargo build -p deputy -
Test the
deputycommand in CLI
Running on Next.js, located in the web-client directory.
To use the hot reloading feature:
-
yarnBuild initial packages -
yarn devRun the local server
To run the production build (no hot reloading):
-
yarnBuild initial packages -
yarn buildBuild production artifacts -
yarn startRun the local server. If there are conflicts with the default port3000then assign your ownPORTenvironment variable before thenext startcommand inpackage.json
Additional configuration:
- Modify the
.envfile to your liking, for example, set theDOCUMENTATION_URLto your own documentation page
Login credentials in the development environment are
Username: [email protected]
Password: Testimine.123
Deputy package server uses a MySQL database for saving metadata of packages. Default credentials are mysql_user:mysql_pass.
For local testing, change the URL of the database in deputy-package-server/example-config.yml from mariadb to 127.0.0.1, remove previous containers, if necessary.
Get deputy-package-server running with
cargo run -p deputy-package-server -- deputy-package-server/example-config.yml
For front end, run
yarn dev
If there are no test packages showing, you need to first upload them with deputy publish inside the test package folder or use deputy publish -p <package_path> to specify the package path.