Skip to content

Commit

Permalink
simulation: env file for vehiclesec, fix web offcanvas
Browse files Browse the repository at this point in the history
  • Loading branch information
gianlucascopelliti committed Feb 8, 2024
1 parent b3349b8 commit 3ae7460
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 2 deletions.
3 changes: 3 additions & 0 deletions simulation/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ run_kubernetes: gen_ra_key
scripts/deploy.sh res/deployments/area/vehicle.yaml VERSION=$(VERSION) NUM_VEHICLES=$(NUM_VEHICLES) LOG_DIR=$(LOG_DIR_MOUNT)
scripts/deploy.sh res/deployments/area/attacker.yaml VERSION=$(VERSION) NUM_ATTACKERS=$(NUM_ATTACKERS) LOG_DIR=$(LOG_DIR_MOUNT)

run_vehiclesec_demo:
make run_kubernetes ENV_FILE=vehiclesec.env

scale_vehicles:
kubectl -n v2x scale --replicas $(NUM_VEHICLES) deployment vehicle

Expand Down
8 changes: 7 additions & 1 deletion simulation/src/web/static/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,10 @@ circle.revoked {

.td-right {
text-align: right;
}
}

@media only screen and (min-width: 1940px) {
.revoked-ps {
margin-left: calc(50vw - 970px);
}
}
2 changes: 1 addition & 1 deletion simulation/src/web/templates/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<button class="btn btn-primary" type="button" data-bs-toggle="offcanvas" data-bs-target="#show_revoked" aria-controls="offcanvasExample">
Toggle sidebar
</button>
<div class="offcanvas offcanvas-start" data-bs-scroll="true" data-bs-backdrop="false" tabindex="-1" id="show_revoked" aria-labelledby="offcanvasScrollingLabel" style="width: 300px">
<div class="offcanvas offcanvas-start revoked-ps" data-bs-scroll="true" data-bs-backdrop="false" tabindex="-1" id="show_revoked" aria-labelledby="offcanvasScrollingLabel", style="width: 300px;">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="show_revoked">Revoked pseudonyms</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
Expand Down
47 changes: 47 additions & 0 deletions simulation/vehiclesec.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
VERSION=v1.0.2
LOG_LEVEL=info
LOG_TO_FILE=1
LOG_TO_UDP=1
LOG_MAX_SIZE=0
# Simulation parameters
SIM_TIME=7200
DOWN_TIME=600
# Revocation parameters
T_V=15
# Vehicles, attackers and groups
NUM_VEHICLES=33
NUM_ATTACKERS=2
ATTACKER_LEVEL=smarter
NUM_GROUPS=10
# Pseudonyms
NUM_PSEUDONYMS=1
PSEUDONYM_SIZE=16
PSEUDONYM_REFRESH_PERIOD=300
MIN_PSEUDONYM_LIFETIME=360000
# Heartbeats and V2V messages
HEARTBEAT_DISTRIBUTION_PERIOD=1
HEARTBEAT_GENERATION_PERIOD=1
V2V_GENERATION_PERIOD=1
# TC parameters
TRUSTED_TIME=0
TC_STORE_LAST_PRL=0
HARD_REVOCATION=1
# OBU parameters
JOIN_MAX_DELAY=20
AUTO_REJOIN=1
BLIND_ATTACKER_DROP_RATE=0.9
BLIND_2_ATTACKER_DELAYED=0
VEHICLE_MOVING=1
RANDOM_MOVEMENT=0
MOVEMENT_PERIOD=60
# RSU parameters
RSU_DROP_RATE=0.4
RSU_DELAY_RATE=0.4
# Reporter parameters
REPORT_MALICIOUS_ONLY=1
REPORT_PERIOD=10
REPLAY_RATE=0.3
# Web app parameters
THRESHOLD_MALICIOUS=2
THRESHOLD_UNSEEN=2
THRESHOLD_UNUSED=300

0 comments on commit 3ae7460

Please sign in to comment.