aevum-cli 0.7.0__tar.gz → 0.7.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {aevum_cli-0.7.0 → aevum_cli-0.7.1}/PKG-INFO +1 -1
- {aevum_cli-0.7.0 → aevum_cli-0.7.1}/pyproject.toml +1 -1
- {aevum_cli-0.7.0 → aevum_cli-0.7.1}/src/aevum/cli/app.py +50 -0
- {aevum_cli-0.7.0 → aevum_cli-0.7.1}/.gitignore +0 -0
- {aevum_cli-0.7.0 → aevum_cli-0.7.1}/README.md +0 -0
- {aevum_cli-0.7.0 → aevum_cli-0.7.1}/src/aevum/cli/__init__.py +0 -0
- {aevum_cli-0.7.0 → aevum_cli-0.7.1}/src/aevum/cli/__main__.py +0 -0
- {aevum_cli-0.7.0 → aevum_cli-0.7.1}/src/aevum/cli/commands/__init__.py +0 -0
- {aevum_cli-0.7.0 → aevum_cli-0.7.1}/src/aevum/cli/commands/complication.py +0 -0
- {aevum_cli-0.7.0 → aevum_cli-0.7.1}/src/aevum/cli/commands/conformance.py +0 -0
- {aevum_cli-0.7.0 → aevum_cli-0.7.1}/src/aevum/cli/commands/server.py +0 -0
- {aevum_cli-0.7.0 → aevum_cli-0.7.1}/src/aevum/cli/commands/store.py +0 -0
- {aevum_cli-0.7.0 → aevum_cli-0.7.1}/src/aevum/cli/commands/version.py +0 -0
- {aevum_cli-0.7.0 → aevum_cli-0.7.1}/src/aevum/cli/py.typed +0 -0
- {aevum_cli-0.7.0 → aevum_cli-0.7.1}/tests/test_cli.py +0 -0
- {aevum_cli-0.7.0 → aevum_cli-0.7.1}/tests/test_phase8_cli.py +0 -0
- {aevum_cli-0.7.0 → aevum_cli-0.7.1}/tests/test_verify_receipt.py +0 -0
|
@@ -367,6 +367,56 @@ def _print_receipt_summary(
|
|
|
367
367
|
typer.echo(f"Rekor ref: {rekor_ref}")
|
|
368
368
|
|
|
369
369
|
|
|
370
|
+
@app.command(name="vault-check")
|
|
371
|
+
def vault_check() -> None:
|
|
372
|
+
"""
|
|
373
|
+
Verify Vault Transit connectivity with a sign/verify round-trip.
|
|
374
|
+
|
|
375
|
+
Reads VAULT_ADDR, VAULT_TOKEN, and AEVUM_VAULT_KEY_NAME from the environment.
|
|
376
|
+
Exits 0 on success, exits 1 on failure.
|
|
377
|
+
"""
|
|
378
|
+
import os
|
|
379
|
+
|
|
380
|
+
vault_addr = os.environ.get("VAULT_ADDR", "http://127.0.0.1:8200")
|
|
381
|
+
vault_token = os.environ.get("VAULT_TOKEN", "")
|
|
382
|
+
key_name = os.environ.get("AEVUM_VAULT_KEY_NAME", "aevum-signing")
|
|
383
|
+
|
|
384
|
+
if not vault_token:
|
|
385
|
+
typer.echo("VAULT_TOKEN is not set.", err=True)
|
|
386
|
+
raise typer.Exit(code=1)
|
|
387
|
+
|
|
388
|
+
typer.echo(f"Vault address : {vault_addr}")
|
|
389
|
+
typer.echo(f"Key name : {key_name}")
|
|
390
|
+
|
|
391
|
+
try:
|
|
392
|
+
from aevum.core.audit.signer import VaultTransitSigner
|
|
393
|
+
signer = VaultTransitSigner(key_name=key_name, vault_addr=vault_addr, token=vault_token)
|
|
394
|
+
except Exception as exc:
|
|
395
|
+
typer.echo(f"Failed to create VaultTransitSigner: {exc}", err=True)
|
|
396
|
+
raise typer.Exit(code=1) from None
|
|
397
|
+
|
|
398
|
+
payload = b"aevum vault-check probe"
|
|
399
|
+
try:
|
|
400
|
+
sig = signer.sign(payload)
|
|
401
|
+
typer.echo(typer.style(" sign() PASS", fg=typer.colors.GREEN))
|
|
402
|
+
except Exception as exc:
|
|
403
|
+
typer.echo(typer.style(" sign() FAIL", fg=typer.colors.RED))
|
|
404
|
+
typer.echo(f" {exc}", err=True)
|
|
405
|
+
raise typer.Exit(code=1) from None
|
|
406
|
+
|
|
407
|
+
try:
|
|
408
|
+
valid = signer.verify(payload, sig)
|
|
409
|
+
if not valid:
|
|
410
|
+
raise RuntimeError("verify() returned False for a freshly signed payload")
|
|
411
|
+
typer.echo(typer.style(" verify() PASS", fg=typer.colors.GREEN))
|
|
412
|
+
except Exception as exc:
|
|
413
|
+
typer.echo(typer.style(" verify() FAIL", fg=typer.colors.RED))
|
|
414
|
+
typer.echo(f" {exc}", err=True)
|
|
415
|
+
raise typer.Exit(code=1) from None
|
|
416
|
+
|
|
417
|
+
typer.echo(typer.style("Vault Transit check PASSED.", fg=typer.colors.GREEN))
|
|
418
|
+
|
|
419
|
+
|
|
370
420
|
@app.command()
|
|
371
421
|
def replay(
|
|
372
422
|
session_id: Annotated[str, typer.Argument(help="Session ID to replay")],
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|