Skip to content

spore-sync: use {{ instance.login_user }} instead of hardcoded ec2-user (needs spawn with #1225) #32

Open

Description

@scttfrdmn

spore-sync hardcodes the login user in all three local sections of plugins/spore-sync/plugin.yaml: provision (line 50), and reconcile and deprovision (line 68).

ec2-user@{{ instance.ip }}:{{ config.remote_path }}

That breaks on any AMI whose login user isn't ec2-user (Ubuntu's is ubuntu). It was hardcoded because spawn didn't give local steps {{ instance.login_user }}: the controller's template context had only id, name and ip (spore-host/spawn#1225).

spore-host/spawn#1333 fixes that. Local steps now get instance.login_user, set from the instance's spawn:local-username tag (else ec2-user), and it is kept in the local record that reconcile and deprovision replay from.

Once a spawn release with #1333 ships, switch spore-sync to {{ instance.login_user }}@{{ instance.ip }}:.... An older spawn renders a missing instance.login_user as an error ("instance.login_user not set") rather than as an empty string, so the switch needs a minimum spawn version. The plugin spec may already have a way to declare one; if not, note it in the plugin's changelog.

Note that a spore-sync installed before the switch keeps the hardcoded user in its local record, because the record stores the steps, so reconcile and deprovision of existing installs are unaffected.

Activity

  1. added this to the Hardening milestone on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions