- New endpoints: GET /api/v1/pools, GET /api/v1/pools/{slug}/next,
GET/POST /api/v1/allocations, GET /api/v1/allocations/{id},
POST /api/v1/allocations/{id}/release
- Bearer token auth; only SHA-256 hashes stored, plaintext shown once
- Token management GUI at /tokens (create, revoke, delete) linked in footer
- API actions audited with actor api:<token name>
- Fix latent transaction leak: replace manual BEGIN IMMEDIATE/COMMIT with
begin_with(), which rolls back on drop; previously a failed allocation
(e.g. disallowed prefix or full pool) returned a connection with an open
transaction to the pool, causing 'database is locked' on later writes
- README: API documentation with curl examples
48 lines
1.5 KiB
TOML
48 lines
1.5 KiB
TOML
[package]
|
|
name = "sub-aligator"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
authors = ["janvete"]
|
|
description = "Internal IP subnet allocator"
|
|
license = "MIT"
|
|
repository = "https://git.janvete.com/seth/sub-aligator"
|
|
homepage = "https://git.janvete.com/seth/sub-aligator"
|
|
keywords = ["network", "ip", "subnet", "allocator", "web"]
|
|
categories = ["web-programming"]
|
|
|
|
[dependencies]
|
|
anyhow = "1"
|
|
askama = "0.12.1"
|
|
axum = "0.8.3"
|
|
chrono = { version = "0.4.41", features = ["serde"] }
|
|
csv = "1.3.3"
|
|
ipnet = "2.11.0"
|
|
rand = "0.8"
|
|
serde = { version = "1.0.219", features = ["derive"] }
|
|
serde_json = "1.0.140"
|
|
sqlx = { version = "0.8.6", features = ["runtime-tokio-rustls", "sqlite", "migrate", "chrono"] }
|
|
thiserror = "2.0.12"
|
|
tokio = { version = "1.44.2", features = ["rt-multi-thread", "macros", "signal"] }
|
|
tower = "0.5.2"
|
|
tower-http = { version = "0.7.1", features = ["fs", "set-header", "trace", "catch-panic"] }
|
|
axum-extra = { version = "0.10.1", features = ["cookie"] }
|
|
sha2 = "0.10"
|
|
hex = "0.4"
|
|
tracing = "0.1.41"
|
|
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }
|
|
|
|
[dev-dependencies]
|
|
futures = "0.3"
|
|
tempfile = "3.21.0"
|
|
tokio-test = "0.4.4"
|
|
|
|
[package.metadata.deb]
|
|
maintainer = "janvete <jan.vete@example.com>"
|
|
copyright = "2026, janvete"
|
|
extended-description = "Internal IP subnet allocator."
|
|
section = "utils"
|
|
priority = "optional"
|
|
assets = [
|
|
["target/release/sub-aligator", "usr/bin/sub-aligator", "755"],
|
|
["README.md", "usr/share/doc/sub-aligator/README.md", "644"],
|
|
]
|