Giter VIP home page Giter VIP logo

1password-ssh-utils's Introduction

Pixel art of a shiny Umbreon doing a run

pronouns: she/her site: eritbh.me npm: eritbh donate on github sponsors donate on ko-fi

1password-ssh-utils's People

Contributors

eritbh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

1password-ssh-utils's Issues

Generate keys into the temp folder rather than the current directory

Also probably split the key creation logic into its own function in common.sh and just keep the high-level logic in op-create-identity

# TODO: generate this somewhere it won't be written to disk (use temp dir?)
# TODO: can we read the new keys into variables here and immediately delete
# the file to avoid having to set another variable to remember to
# delete it later?
echo "Generating new keypair..."

Running add-identities on first SSH run

We can identify whether identities have been pulled by checking for the existence of the ssh_config file. Make a wrapper that will run the add script only if that file doesn't exist yet, then calls ssh passing through arguments. Users would be able to use the wrapper by adding e.g. alias ssh="op-ssh" to their shell config.

This may not actually need a wrapper; an option could be added to the existing script to do nothing if keys have already been pulled, and it could be used as e.g. alias ssh="op-add-identities -z; ssh" assuming a similar alias structure is available across shells.

Multi-user systems; use randomized temp storage directory names

Rather than always putting keys and config in /dev/shm/op-ssh-config, we should instead name the folder something random and store that location as a symlink somewhere in the user's local directory (~/.local/tmp/1password-ssh-temp -> /dev/shm/tg4hn708v34hgofd or something like that, I need to figure out where the best place for it would be). This will support multi-user systems since each user won't be trying to store their keys in a directory someone else already owns.

Is /dev/shm the right choice?

I don't actually know what the intended use case of this folder is aside from "shared memory." I'm saying it's okay for now because I am kinda using it to share memory between this program and ssh...? but I don't buy it. It may be a better idea to just have users mount their own tmpfs partitions to be safe, but I don't know if that's a reasonable ask for every user since it requires root.

More lenient handling of 1Password item structure

  • Use a tag rather than relying on the "Server" template
  • Allow reading SSH key details from any section
  • If there's no fields with the proper internal names, fall back to checking for fields that are named the same as default

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.