Skip to content

Protect Java certificates after workstation setup - #10

Draft
roryabraham wants to merge 1 commit into
mainfrom
rory/block-java-certificates
Draft

roryabraham wants to merge 1 commit into
mainfrom
rory/block-java-certificates

Conversation

@roryabraham

Copy link
Copy Markdown

Explanation of Change

Run the shared Java certificate protection bootstrap after the stage-two Ansible playbook succeeds. The call stays in the normal user's shell with its terminal, so the shared script can request sudo for individual protected-file appends independently of Ansible's become password.

  • Invoke bash "$HOME/Expensify-ToolKit/laptop-config/fixCACerts.sh" after ansible-playbook.
  • Preserve failure propagation from either step, and quote the stage-two working directory for home paths containing spaces.
  • Retain the checkout's Expensify-ToolKit casing for Linux.

Merge dependency: https://github.com/Expensify/Expensify-ToolKit/pull/205 must land first so the stage-two checkout contains the helper. That PR pins the shared script and certificate policy from Expensify/GitHub-Actions#117 and documents the one-time existing-employee rollout.

Fixed Issues

No separate issue supplied.

AI Tests

  • Passed: python3 -B -m unittest discover -s tests -v — one mocked test with three scenarios: success, Ansible failure, and certificate-step failure. Verifies execution order, normal-user identity, inherited terminal stdin, exact checkout casing, and a home path containing spaces. Ansible, the fixer, and terminal formatting are mocked; no installers or JVMs were run.
  • Passed: bash -n bootstrap.sh.
  • Passed: git diff --cached --check.
  • Full ShellCheck is blocked by the pre-existing check_supported_platform() line (SC1073/SC1064/SC1072); confirmed the same failure on origin/main at bbd7089cee97ae7a95072558217987ae49f28d57.

Tests

// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.

QA

// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
// Please describe what QA needs to do to validate your changes and what areas do they need to test for regressions.

Invoke the Toolkit certificate bootstrap after Ansible succeeds.
Keep the normal user's terminal so individual privileged appends
can request sudo independently of Ansible's become password.

Mock the handoff to verify terminal/user preservation, checkout
casing, paths with spaces, and failure propagation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant