PS: remember to clone with --recurse-submodules
git clone --recurse-submodules https://github.com/spydx/capability-poc.git
cd capability-poc
git submodule update --remote --recursive
The recommended way to start this example is to use docker-compose
.
The build process will depend on your internet connection take anything from 15 min to 20+ min to build all the components.
After installing Docker:
Bring everything up
> docker-compise build # approx 15+ min
> docker-compose up
Launch a browser and access http://localhost:3000/
The process to be done is:
-
- GnapRequest
-
- Login at the AS
-
- Continuation Request (Authorization)
-
One or more of the desired actions.
Username | Password |
---|---|
kenneth | password |
alice | password |
bob | password |
You will need:
- Rust/Cargo : install
- SQLx-cli :
cargo install sqlx-cli
install - sqlx needs SQLite support, so either specify or leave for default.
- npm for nextjs.
- Add
host.docker.internal
pointing to127.0.0.1
to in the local hosts file.
You will need:
sudo apt install build-essential
sudo apt install libssl-dev
sudo apt install pkg-config
rustup toolchain install nightly # do this if cargo doesn't do it automatically
cargo check # after all above, this should work from the project root.
- GNAP
> cd gnap
> docker-compose up -d # bring up REDIS and MongoDB.
> cd gnap_as
> cargo run
- simple-api
> cd simple-api
> cargo run
- cap-client
> cd cap-client
> npm install
> npm run dev
> open http://localhost:3000/
Sometimes the Mongo database stops working correctly.
If it does, then removing the data in the folder ./gnap/data/mongodb
will cause a rebuild of the database to the clean working state with docker-compose up
.
@software{Fossen_Exploring_Capability-based_security_2022,
author = {Fossen, Kenneth},
month = {6},
title = {{Exploring Capability-based security in software design with Rust}},
url = {https://github.com/spydx/capability-poc},
version = {1.0.0},
year = {2022}
}