This repository contains a client implementation for OpenCAPIF, capable of performing all operations typically handled by a CAPIF provider. It includes functionality for provider registration, user authentication, API publishing, and more.
Ensure the following dependencies are installed on your system (Ubuntu 22.04 or similar):
sudo apt update
sudo apt install -y jq make gcc libcurl4-openssl-devClone the repository with submodules to ensure all dependencies are pulled:
git clone --recurse-submodules https://github.com/aaronmontilla/openCapif.git
cd openCapifCompile the client by running:
meson setup builddir .
meson compile -C builddirOr the project can also be built by Make using:
makeFirst include the IP address inside /etc/hosts file by adding this line:
"YOUR IP ADDRESS" capifcore register capifhost
Once this is done get the certificates by running:
./get_certs "Username"Start the client:
./builddir/opencapif_processOr if it was built using Make use:
./opencapif_processFollow the on-screen instructions to proceed with CAPIF operations.
The client supports a full range of provider-related actions within a CAPIF instance:
-
login_admin_curl() – Authenticate as admin
-
create_user_curl() – Create a new CAPIF user
-
get_auth_curl() – Retrieve access token for a user
-
register_provider() – Register a new API provider
-
delete_user() – Delete a CAPIF user
-
delete_provider() – Remove an API provider
-
publish_api() – Publish a new API
-
delete_api() – Unpublish an existing API
-
retrieve_apis() – List available APIs