From 6c1489c1b51bdfc216165867f9dcc9fe17de0638 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 10 Jun 2024 09:18:31 -0400 Subject: [PATCH] Change ReservationID from UUID to str UUIDs are 128 bits long and, in string format, consist of 36 characters. This is a much larger set of possible values than is required for our purposes. Furthermore, we can increase entropy by increasing the character set used in generating ReservationIDs. This will allow us to have a large enough set of possible values using much less characters, allowing agent binary download URLs to be significantly shortened. Issue https://github.com/guardicore/monkey/issues/4187 --- CHANGELOG.md | 5 +++++ agentpluginapi/agent_binary_request.py | 3 +-- pyproject.toml | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74ba098..ec79b05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to the [PEP 440 version scheme](https://peps.python.org/pep-0440/#version-scheme). +## [v0.8.0] - 2024-06-10 +### Changed +- `ReservationID` from a UUID to a string. + https://github.com/guardicore/monkey/issues/4187 + ## [v0.7.0] - 2024-05-14 ### Changed - The `agent_binary_transform` parameter to `agent_binary_wrapper_template` in diff --git a/agentpluginapi/agent_binary_request.py b/agentpluginapi/agent_binary_request.py index 9748332..8f608ed 100644 --- a/agentpluginapi/agent_binary_request.py +++ b/agentpluginapi/agent_binary_request.py @@ -1,10 +1,9 @@ from dataclasses import dataclass from typing import TypeAlias -from uuid import UUID from monkeytypes import Event, OperatingSystem -ReservationID: TypeAlias = UUID +ReservationID: TypeAlias = str @dataclass(frozen=True) diff --git a/pyproject.toml b/pyproject.toml index 621badc..d1baceb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ paths = ["agentpluginapi", "vulture_allowlist.py"] [tool.poetry] name = "monkey-agentpluginapi" -version = "v0.7.0" +version = "v0.8.0" description = "Interfaces and components that comprise the Infection Monkey Agent Plugin API" authors = [ "Ilija Lazoroski ",