Pin attended OpenBao login to the operator tunnel.
Public Ingress is gone, so BAO_ADDR=https://bao.coulomb.social fails before command handoff. The wrapper now uses 127.0.0.1:18200. Assistant: grok Assistant-Session: 01a0a23b-3bf0-7341-b4e5-9dc05f72573a
This commit is contained in:
parent
4b34c239bc
commit
75e5c1af65
4 changed files with 37 additions and 4 deletions
|
|
@ -87,6 +87,21 @@ def test_receipt_records_apply_and_failure(tmp_path, monkeypatch):
|
|||
assert json.loads(failed.read_text())['status'] == 'bao_write_failed'
|
||||
|
||||
|
||||
def test_attended_wrapper_pins_operator_tunnel_address(monkeypatch):
|
||||
spec = importlib.util.spec_from_file_location(
|
||||
'attended', Path(__file__).resolve().parents[1] / 'scripts/openbao-attended-exec.py')
|
||||
wrapper = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(wrapper)
|
||||
monkeypatch.setenv('BAO_ADDR', 'https://bao.coulomb.social')
|
||||
monkeypatch.setenv('VAULT_ADDR', 'https://bao.coulomb.social')
|
||||
monkeypatch.setenv('BAO_TOKEN', 'must-not-propagate')
|
||||
env = wrapper.contained_env()
|
||||
assert env['BAO_ADDR'] == wrapper.TUNNEL
|
||||
assert env['VAULT_ADDR'] == wrapper.TUNNEL
|
||||
assert 'BAO_TOKEN' not in env
|
||||
assert 'VAULT_TOKEN' not in env
|
||||
|
||||
|
||||
def test_attended_wrapper_requires_absolute_existing_executable(tmp_path, monkeypatch):
|
||||
import os
|
||||
spec = importlib.util.spec_from_file_location(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue