feat: per-master tls_verify + auto-accept minion key on bootstrap (closes #555)#563
Merged
Merged
Conversation
…oses #555) - SaltMaster model: tls_verify (default False) and auto_accept (default True) columns - Migration 042: add_column both with server_default false/true; downgrade drops them - salt_api_client._post: passes verify=master.tls_verify to requests.post - salt_master_probe: threads tls_verify into all four _check_* HTTP helpers - bootstrap_node (6a): after successful ansible run, calls run_wheel key.accept for each master with auto_accept=True; SaltApiError/Exception caught → warning + log note; bootstrap status unaffected - Schemas: tls_verify/auto_accept in SaltMasterCreate, SaltMasterUpdate, SaltMasterResponse - Route create: persists tls_verify/auto_accept; patch uses existing setattr loop - Frontend: SaltMaster/Create/Update interfaces updated; two toggles in master form Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Coverage Report✅ 81.8% on Gate passed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tls_verify(defaultFalse— accepts self-signed/HTTP salt-api) andauto_accept(defaultTrue— kri callskey.acceptvia salt-api after a successful bootstrap run)server_default false/true; downgrade drops themsalt_api_client._postthreadsverify=master.tls_verifyinto everyrequests.post_check_*helpers insalt_master_probenow accept and passtls_verifybootstrap_nodestep 6a: on success, iteratesmaster_auto_accept_info; for each master withauto_accept=Truecallsrun_wheel(master, "key.accept", match=node_minion_id);SaltApiError/Exceptioncaught, warning logged, note appended tobootstrap_logs— bootstrap status never affectedSaltMastersTabform all updated with both flagsFiles changed
fleet_platform/models/salt_master.pyfleet_platform/db/migrations/versions/042_*fleet_platform/schemas/salt_master.pyfleet_platform/api/routes/salt_masters.pyfleet_platform/services/salt_api_client.pyverify=tls_verifyin_postfleet_platform/services/salt_master_probe.pytls_verifyparam on 4 helpersfleet_platform/workers/ansible_tasks.pyfrontend/src/api/saltMasters.tsfrontend/src/pages/SaltMastersTab.tsxtests/unit/test_tls_verify_autoaccept_555.pyTest plan
pytest tests/unit/ -q→ 1983 passedruff check+ruff format --check→ 0 findingspnpm exec tsc -b --noEmit→ 0 type errorspnpm exec eslint src/api/saltMasters.ts src/pages/SaltMastersTab.tsx→ 0 errorsCloses #555
🤖 Generated with Claude Code