Skip to content

Manage ssm-user sudoers in production and sandbox#272

Merged
akuzminsky merged 1 commit into
mainfrom
ssm-user-sudoers-prod-sandbox
Apr 22, 2026
Merged

Manage ssm-user sudoers in production and sandbox#272
akuzminsky merged 1 commit into
mainfrom
ssm-user-sudoers-prod-sandbox

Conversation

@akuzminsky

Copy link
Copy Markdown
Member

Summary

  • The ssm-user entry in sudo::configs was only declared in development's hiera data. Because saz/sudo defaults to purge => true, puppet wipes SSM agent's own /etc/sudoers.d/ssm-agent-users on every run — so prod and sandbox ended up with no sudo grant for ssm-user.
  • Add the same sudo::configs entry to environments/production/data/common.yaml and environments/sandbox/data/common.yaml so puppet owns the grant end-to-end in all environments.

Test plan

  • Apply in sandbox and confirm /etc/sudoers.d/ssm-user exists with ssm-user ALL=(ALL) NOPASSWD: ALL and perms 0440 root:root.
  • Start an SSM session as ssm-user and verify sudo -n true succeeds.
  • Promote to production after sandbox soak.

🤖 Generated with Claude Code

The sudoers drop-in for ssm-user was only declared in development's
sudo::configs. Because saz/sudo defaults to purge => true, puppet was
wiping SSM agent's own /etc/sudoers.d/ssm-agent-users on every run in
prod and sandbox, leaving ssm-user with no sudo grant.

Add the same sudo::configs entry to prod and sandbox so puppet owns
the grant end-to-end across all environments.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@akuzminsky akuzminsky merged commit 54bccb7 into main Apr 22, 2026
2 checks passed
@akuzminsky akuzminsky deleted the ssm-user-sudoers-prod-sandbox branch April 22, 2026 17:17
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.

2 participants