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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aevum-cli
3
- Version: 0.7.0
3
+ Version: 0.7.1
4
4
  Summary: Aevum -- command-line interface for operating Aevum nodes.
5
5
  Project-URL: Homepage, https://aevum.build
6
6
  Project-URL: Repository, https://github.com/aevum-labs/aevum
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "aevum-cli"
3
- version = "0.7.0"
3
+ version = "0.7.1"
4
4
  description = "Aevum -- command-line interface for operating Aevum nodes."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -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