Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #32726

Closed (moved)
Open
Opened Dec 11, 2019 by Ana Custura@acute

Automate the selection of SSH key in the CloudFormation templates

From emailing irl:

The best I can come up with (for now) for automated ssh key selection:

aws cloudformation deploy --region us-east-1 --stack-name whoami-onionperf-dev --parameter-overrides myKeyPair="$(./identify_user.sh)" --template-file onionperf-dev.yml

...where identify_user.sh is: #!/bin/bash aws ec2 describe-key-pairs | jq -r '.KeyPairs[].KeyName' | grep aws iam get-user | jq -r .User.UserName

This assumes that:

  1. The username currently logged in on the machine is part of the key pair name
  2. There is only one key that will match a username. It would be nice to use more than one key, however AWS does NOT support multiple keypairs during stack creation/deployment
  3. The developer has jq installed

I dislike this solution as it is very fragile but not sure where to go from here....thoughts?

Other stuff already depends on jq. You can't easily do aws without it.

Instead of fuzzy matching though, can we have static mappings in a table somewhere of username to key name?

We probably only have like 3 or 4 users maximum.

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#32726