Trust Manager
Introduction
The Self-* modules collect data about the infrastructure elements and submit this information to the associated Context Broker. The Trustmanager component then retrieves this data and calculates the trustworthiness of the infrastructure elements using the TOPSIS method.
Features
Trustworthness: The Trust manager rank all IE or based on their trustworthiness ( security and QoS) Adaptability: The attributes that trustmanager and the weights that have can be alter based on the need of the pilots
Place in architecture
The Trust Manager is a core component that assists the orchestrator in selecting the best infrastructure elements based on their trustworthiness.
User guide
The Trust Manager initiates an autonomous process to calculate the trust score of each Infrastructure Element within a domain at specified intervals. The higher the trust score, the more trustworthy the Infrastructure Element is considered to be.
Prerequisities
An attribute named “trust score” must be included in the Infrastructure Elements data model.
Installation
Ensure you have access to the desired Kubernetes (K8s) cluster for deployment. Then, execute the following command:
kubectl apply -f trust-manager-deployment.yaml
You can find the trust-manager-deployment.yaml file in the GitLab common deployment package registry.
Configuration options
The image uploaded to the GitLab container registry is a generic version. The Trust Manager includes a configuration file, manager.ini, which allows for extensive customization. This file enables you to specify which properties the Trust Manager should retrieve from the Context Broker (CB) and adjust their associated weights. Additionally, it allows you to customize the interval at which the trust score calculation is initiated.
Developer guide
Currently, the tool is equipped with two APIs:
Request the weights configured in the Trust Manager
#### Example ####
> GET http://localhost:3000/weights
Response Body
{ "cpucores": { "impact": "+", "weight": "0.2" }, "currentcpuusage": { "impact": "-", "weight": "0.2" }, "ramcapacity": { "impact": "+", "weight": "0.1" }, "availableram": { "impact": "+", "weight": "0.25" }, "currentramusage": { "impact": "-", "weight": "0.25" } }
Request from the Trust Manager to calculate the score for a manually defined subset of alternative infrastructure elements with specific attributes and their respective weights. The request body can contain two parameters:
-Alternatives (int[][]): The array containing the values of each alternative for the TOPSIS method
-Weight (list)[Optional]: A list containing the weight for the trust score calculation
> POST http://localhost:3000/calculate
#### Example ####
Request Body
{ "alternatives": [ [250, 16, 12, 5], [200, 16, 8, 3], [300, 32, 16, 4], [275, 32, 8, 4], [225, 16, 16, 2] ], "weights": { "cpu": { "impact": "+", "weight": 0.25 }, "ram": { "impact": "+", "weight": 0.25 }, "lel": { "impact": "-", "weight": 0.25 }, "bel": { "impact": "+", "weight": 0.25 } } }
Response Body
{ "rankings": [4, 3, 1, 2, 5], "scores": [ 0.5342768571821003, 0.4223512916762782, 0.5776487083237218, 0.7959914251761436, 0.07272619042582074 ] }
To access the apis you have to port forward the trustmanager service
kubectl port-forward service/trustmanager 3000:80