News for hackers. Stuff that matters.
Re:1Password for SSH and Git (Beta) by DonHopkins on Wednesday February 16, 2022 @11:12AM (#30361847)
A huge problematic deficiency of 1Password is that it lacks literal multi-line text field types.

The items in its database let you define custom fields for them, but there is no literal multi line text field. There's a "File" type, but you can't simply define fields with multi-line text values. However, every item has exactly one built-in "notes" field, but that's actually styled markdown text. And you only get one. And its name is always "notes".

It would obviously be extremely useful to be able to define an arbitrary number of arbitrarily labeled multi line text fields that are not interpreted as markdown text.

It boggles my mind that 1Password doesn't support this. What were they thinking??? It makes it a real pain in the butt to store ssh keys and certificates and a lot of other types of information in 1Password.

A single markdown "notes" field just doesn't cut it. It's not as if it's technically challenging or a security risk. It already has a "notes" field, so just turn off the "rich text" feature and allow me to make my own! I would have thought it was a pretty obvious and often requested feature, but as far as I can tell, it's impossible!

Re:1Password for SSH and Git (Beta) by terabytest on Wednesday February 16, 2022 @11:35AM (#30362120)
Could you share a little bit about what you'd want to use this for? (I'm part of the 1Password design team)
Re:1Password for SSH and Git (Beta) by DonHopkins on Wednesday February 16, 2022 @11:50AM (#30362301)
SSH keys have both a private and a public file. The private file is multi-line text.

I don't like putting the private key in the notes field, because its name is still "notes" (but I'd prefer the label be the key's file name), it's actually markdown formatted text, not literal text, and what if I still want to write a note, but I've already used the notes field for the key?

HTTPS certificates including multiple certificate chains, and private keys, and those are all multi line files. And each part should go into a separate clearly labeled multi line field. And I don't want to be forced to write a copy of my server's ssh key into a local file on my laptop in order to attach it to a 1Password file field, and remember to delete it quickly before Time Machine backs it up for posterity.

Right now I am forced to concatenate all my certificates and keys into the "notes" field, and write the file name before each part, and put blank lines between each file, which is terribly inconvenient and error prone.

I also put a multi-line list of all the user names and passwords that I set up on a server.

There are millions of other reasons why anyone might want to use a multi line text field beyond ssh keys and certificates, just use your imagination.

My question is why wasn't this obvious feature supported from day 1, like I fully expected it to be with I bought a 1Password license? Why did I have to find that out for myself the hard and disappointing way, because I never noticed a section in the 1Password manual or promotional advertisements about why 1Password made the decision not to support multi line text fields. I'd love to know the reasoning behind that decision.

[Edit in response to "Maybe I don’t understand, but couldn’t you use the notes section? Wrap whatever you need in triple backticks to create a code block?":]

I PAYED for 1Password, and the company I work for standardized on it and requires we use it, so I kind of expect not to have to jump through those kinds of pointless hoops with a commercial product. I should be able to select-all/copy/paste without meticulously selecting just the right text character-by-character. The time I waste doing just that would pay for a yearly subscription to a better product.

Re:1Password for SSH and Git (Beta) by roustem on Wednesday February 16, 2022 @04:15PM (#30365782)
Thank you for the feedback!

We spoke about it internally many times in the past but couldn't get the solution implemented because there was always something in the way. After reading your comments and I talked to the team and we just merged a change that should appear in the nightly build and make the handling of the multi-line fields better. Having a single core in 1Password 8 makes things so much easier when it comes to implementing changes across all platforms.

Also, there is a new SSH Key item type that might help in this particular case.

-- Roustem 1Password Founder

Re:1Password for SSH and Git (Beta) by aetherspawn on Wednesday February 16, 2022 @06:59PM (#30367606)
Amazing, I wanted this too. Thank you.

1Password has literally blown me away every second that I've used it. And the ability to sync MFA between all your devices was the push that I needed to start using MFA.

I do have a feature request though - any chance we could lock our 1Password wallet using 2FA with SMS (like Office365 or banks) rather than a device authentication key? Main concern is that personal devices are breaking all the time ... SMS is "strong enough" and yet pretty much the only second factor that is convenient to recover in the event of a disaster.

Re:1Password for SSH and Git (Beta) by riverdroid on Wednesday February 16, 2022 @10:49PM (#30369319)
SMS is not strong enough, especially for protecting ALL of your 2FA codes + passwords. SIM swapping attacks frequently occur, and it doesn't even have to be with your carrier.
Re:1Password for SSH and Git (Beta) by roustem on Wednesday February 16, 2022 @07:52PM (#30368170)
Just wanted to add that the nightly build 80600030 is now available. Would love if you could give it a try and see if the newly added textfields are working better for you?
Re:1Password for SSH and Git (Beta) by tgamma on Wednesday February 16, 2022 @10:00PM (#30369050)
Thank you so much! Works as expected, with a small caveat: note that only newly created text fields support multiline; text fields which have already been created with an older build than 80600030 seem to remain single line.
Re:1Password for SSH and Git (Beta) by roustem on Thursday February 17, 2022 @03:10PM (#30378022)
Yes, it was the simplest change we could make. Hopefully it makes things better without breaking anything else
Re:1Password for SSH and Git (Beta) by DonHopkins on Thursday February 17, 2022 @01:10AM (#30370059)
Thank you, I really appreciate that, and it will save me and others a lot of time and effort! Spectacular turn-around. I'm looking forward to upgrading to 1Password 8. Please also put some love into the 1Password CLI utility "op" too, so it's safe and useful for unattended scripts.
Re:1Password for SSH and Git (Beta) by roustem on Thursday February 17, 2022 @03:12PM (#30378047)
Oh, if you are using CLI then you will love the new integration we are building in 1Password 8: https://developer.1password.com/docs/cli/use-biometric-unloc...
Re:1Password for SSH and Git (Beta) by leokennis on Wednesday February 16, 2022 @03:13PM (#30365088)
I don’t know your workflow or demands so maybe this is simplistic. But you can just drop any file over a 1Password entry and it gets attached to that entry.

So, if you have a .crt, .pfx, .txt or whatever, just attach it to the entry.

Re:1Password for SSH and Git (Beta) by c0balt on Wednesday February 16, 2022 @11:59AM (#30362431)
Maybe a solution would be to get inspiration from keepass(xc) attachement's feature. It allows you to save abitrary files as attachement to an entry (btw this is how keepassxc does ssh key managment). Other keys/ certs (like HTTPS certs) would be supported such a feature too.

The 'only' downside is the comparatively high increase in database size for the hoster.

Re:1Password for SSH and Git (Beta) by jaboutboul on Wednesday February 16, 2022 @12:05PM (#30362503)
1Password already has this…
Re:1Password for SSH and Git (Beta) by throwanem on Wednesday February 16, 2022 @07:23PM (#30367817)
Judging by both the GP's not having been aware of it, and the process described in a sibling comment [1], I suspect the feature has a discoverability problem.

(Does the same feature exist on mobile? How are file attachments represented on mobile?)

[1] https://news.ycombinator.com/item?id=30365088

Re:1Password for SSH and Git (Beta) by thamer on Wednesday February 16, 2022 @10:28PM (#30369216)
The feature exists on mobile, there's a "Related items" section that has a list of file names with a ">" caret next to each one. If you tap on an entry it opens in a new page where you can tap "View document" to see its contents. You can also see when it was created and updated, share it, add tags to it, add it your favorites, and more.

It works perfectly fine, with no missing features. I use it to store private keys and recovery codes, mainly.

Re:1Password for SSH and Git (Beta) by sbarre on Wednesday February 16, 2022 @11:42AM (#30362221)
If you're in here collecting feedback, I would second this request for the same reasons (keys, certs, other structured text I wish I could just copy/paste easily from the UI).

Been a happy paying customer since 1Password v4, but I agree this seems like an easy win.

Re:1Password for SSH and Git (Beta) by Diti on Wednesday February 16, 2022 @12:15PM (#30362628)
Personally, mainly for OTP recovery codes.
Re:1Password for SSH and Git (Beta) by sixstringtheory on Wednesday February 16, 2022 @12:39PM (#30362980)
I’ll add a “me too” comment as well as add that I’d expect to be able to have what is essentially a multi line password field where the contents are obscured.

Or a special feature to transform a set of OTP recovery codes into separate password fields so I can easily copy just one and then remove it without having to edit a multiline field to remove the one I just used.

Re:1Password for SSH and Git (Beta) by spoiler on Wednesday February 16, 2022 @12:27PM (#30362787)
I use it for this as well.

P.S: I'm not one to write "me too" comments, but there's no upvote count visibility for users. And since a designer working at 1p has eyes on the thread, it might make sense to add "me too" comments?

Re:1Password for SSH and Git (Beta) by puszczyk on Wednesday February 16, 2022 @01:31PM (#30363761)
+1 as well. Not a lot of usage, but sometimes you want to add multiline notes (there’s a notes field, I know, every others field type can be added).
Re:1Password for SSH and Git (Beta) by dynjo on Wednesday February 16, 2022 @11:18PM (#30369468)
This.
Re:1Password for SSH and Git (Beta) by minitoar on Wednesday February 16, 2022 @11:36AM (#30362132)
He already said. Private keys, certs, etc.
Re:1Password for SSH and Git (Beta) by judge2020 on Wednesday February 16, 2022 @11:47AM (#30362274)
Same for things like recovery codes / recovery phrases, although I'm not sure how highly i'd rate a security posture of keeping a password, a 2fa code generator, and recovery codes all in the same entry in a password manager.
Re:1Password for SSH and Git (Beta) by 1123581321 on Wednesday February 16, 2022 @01:27PM (#30363699)
Private keys and certs are multi-line. Just tested the secure note and ssh key entry types.
Re:1Password for SSH and Git (Beta) by greplogic on Wednesday February 16, 2022 @12:01PM (#30362459)
I know HN probably isn't representative of the population, but I imagine we skew heavily on the technical side of this and I would echo OP's suggestion. It would be very helpful for many developer and potentially other use cases as others have made a case for.
Re:1Password for SSH and Git (Beta) by skoskie on Wednesday February 16, 2022 @01:12PM (#30363472)
If they are targeting enterprise users you’d think they already know how it would be helpful.
Re:1Password for SSH and Git (Beta) by brainzap on Wednesday February 16, 2022 @12:12PM (#30362575)
It would be nice if 1Password understood private key + certificate pair, how it is used often for TLS connections.
Re:1Password for SSH and Git (Beta) by nopenopenopeno on Thursday February 17, 2022 @09:44AM (#30373542)
Also for storing backup keys.
Re:1Password for SSH and Git (Beta) by DonHopkins on Wednesday February 16, 2022 @02:26PM (#30364538)
Thanks for replying! As long as I have your ear, I've got another question about the 1Password command line tool, "op":

https://1password.com/downloads/command-line/

I am trying it out, and hope it will be as useful for cases like using the Google Cloud CLI's secrets command to retrieve secrets in automated scripts, like "gcloud secrets versions access latest --secret=wildcard_foo_com_pem".

https://support.1password.com/command-line-getting-started/

I've followed the installation and authentication instructions, and ran "op signin my.1password.com [email protected]", entered my account's secret key, my account's password, then it prompted for "Enter your six-digit authentication code:". But I didn't receive any text messages with authentication codes on my phone.

So now I am stuck. I don't have 2FA set up on my 1password account, apparently. Do I need to do that in order to use "op", and how do I do that?

More importantly, when I write a script that authenticates using the "op" command line utility, how can it accomplish the two-factor authentication step without me being present behind the keyboard and entering a response manually? And is there a better way to write a script that authenticates somehow without using my literal secret key and password and 2fa code?

This seems to be an open issue since at least March 2019. Has it been fixed yet, or is a fix planned? Should I just give up trying to use "op" to write automated unattended scripts, the way I use "gcloud secrets"?

https://1password.community/discussion/97138/cli-always-requ...

>CLI always requires authentication code

>I am using the op CLI and I also have two-factor authentication enabled. Every time I authenticate to op, it asks for the authentication code. This gets annoying quickly and does not help in my quest to automate CLI signin.

>$ op signin YYY

>Enter the password for XXX at YYY.1password.com:

>Enter your six-digit authentication code:

>Is there a way to convince op that it is running on the same host similar to the way the 1password application and browser extensions do?

>Reply:

>@razorsedge unfortunately the CLI has something of an "incomplete" implementation of 2FA, only in that it does not persist the 2FA secret after the first authentication. All the other apps persist this secret, allowing them to do 2FA "silently" in the background, but that has not yet been implemented on the CLI. It's something we look to do in the future, but I can't give a timeline on when it will be available.

>[...]

https://github.com/dcreemer/1pass/issues/17

>Support TFA for 1password accounts #17

>I have TFA enabled for my 1password account. Unfortunately, 1pass can't handle this and instead of letting me input the token, the TFA prompt instantly returns and fails.

>signing in to xxx.1password.com [email protected]

>Enter your six-digit authentication code: [LOG] 2019/03/17 12:53:25 (ERROR) Incorrect One-Time Password length. Expected 6.

>1pass failed to signin to xxx.1password.com

>It'd be great if TFA support could be added.

Re:1Password for SSH and Git (Beta) by roustem on Thursday February 17, 2022 @03:17PM (#30378096)
Thank you, Don!

Did you have a chance to look at CLI 2.0 and 1Password 8 integration: https://developer.1password.com/docs/cli/use-biometric-unloc...

Re:1Password for SSH and Git (Beta) by varenc on Wednesday February 16, 2022 @12:27PM (#30362784)
As one datapoint: I’ve used 1P for 11+ years, have over 1200 items in it, and I’ve literally never lamented the lack of multiline fields.
Re:1Password for SSH and Git (Beta) by tksb on Wednesday February 16, 2022 @01:15PM (#30363512)
While I agree about the specific ask for multiline support (and the decade plus hourly usage of 1p), it's abundantly clear that things are slipping with regards to the core product. For awhile there were no public links to any downloadable desktop apps for macOS while they pushed web + subs + and the MAS version.

These days I'm just delighted when 1password doesn't open a totally different browser when invoked from the active one.

Re:1Password for SSH and Git (Beta) by CodeRhoades on Wednesday February 16, 2022 @01:48PM (#30364000)
Not sure what you mean. The non-MAS version has always been available directly from the downloads page. https://1password.com/downloads/mac/
Re:1Password for SSH and Git (Beta) by varenc on Thursday February 17, 2022 @02:16AM (#30370377)
Totally agree there are many other frustrating things with 1P. I’m still self-hosting my vault locally and I hate that someday they’re going to force me to switch to their cloud based options. Just on my list of issues lack of multiline support is near the bottom.
Re:1Password for SSH and Git (Beta) by rco8786 on Wednesday February 16, 2022 @12:34PM (#30362902)
Similar here. I've never even considered it something I might want
Re:1Password for SSH and Git (Beta) by auslegung on Wednesday February 16, 2022 @11:37AM (#30362146)
Maybe I don’t understand, but couldn’t you use the notes section? Wrap whatever you need in triple backticks to create a code block?
Re:1Password for SSH and Git (Beta) by ljm on Wednesday February 16, 2022 @11:39AM (#30362175)
I believe on other fields you can click on them to copy their values. With the notes field you have to select the part of the notes yourself and copy that.

And probably can't filter for them as easily too.

Re:1Password for SSH and Git (Beta) by minitoar on Wednesday February 16, 2022 @11:38AM (#30362157)
Maybe I have an ssh key and notes. With this setup I can only do 1.
Re:1Password for SSH and Git (Beta) by auslegung on Wednesday February 16, 2022 @06:41PM (#30367432)
I store my ssh keys, with notes, in the same note. I wrap the ssh key in backticks and put the relevant notes above or below the key. Granted I can't just triple click to select the entire note then copy, I have to interact with it more to copy it, but I very rarely copy my ssh keys. Like once every few years when I'm setting up a new machine. So maybe you're copying them more than I am and it's more of an issue
Re:1Password for SSH and Git (Beta) by barbazoo on Wednesday February 16, 2022 @11:42AM (#30362219)
Would a profile work here where you can define arbitrary fields?
Re:1Password for SSH and Git (Beta) by FBISurveillance on Wednesday February 16, 2022 @11:55AM (#30362386)
A paying customer for 5+ years, still miss this feature daily.
Re:1Password for SSH and Git (Beta) by wtetzner on Wednesday February 16, 2022 @11:15AM (#30361877)
I believe you can attach files, so that might be an option for keys/certs.
Re:1Password for SSH and Git (Beta) by MAGZine on Wednesday February 16, 2022 @01:28PM (#30363712)
Attaching files is the worst functionality of 1password.

I put images of my health insurance card in 1pw.

do this. now, pretend you want to upload those image to a web portal that's asking for your insurance information. To pretend, just try and put the images of your insurance card into an email body to yourself.

See how many clicks it takes.

Re:1Password for SSH and Git (Beta) by ydant on Wednesday February 16, 2022 @06:23PM (#30367248)
I find it to be a decent experience (and use it for exactly what you mentioned).

Comparing the two methods I've personally used to store my insurance card below. What are you comparing to?

1Password:

  - Search
  - Click on the relevant entry
  - Click "Quick Look"
  - Click down menu
  - Click show in Finder
  - Drag onto upload form field
Google Drive:

  - Search
  - Right click
  - Download
  - Right click on downloaded file botton
  - Show in finder
  - Drag onto upload form field
  - Right click on file
  - Delete
Local Filesystem

Not really worth comparing. Could be made much quicker than anything else.

Re:1Password for SSH and Git (Beta) by MAGZine on Thursday February 17, 2022 @01:48PM (#30376994)
Ideally I should be able to copy things directly out of 1PW. right click, copy. Or the app should use a widget that supports click/drag.

It took me a while just to DISCOVER the steps to getting a file out of 1pw, which involved a lot of false starts into different menus/screens that allow you to view the file's metadata (or preview) without actually getting the file.

Considering "copy field" is THE main functionality of 1PW, it's absolutely insane you can't just copy a file field.

the comparison to me is having the file in my downloads/desktop, which is a very simple procedure to do, as many or fewer clicks, and is a well-worn path.

Re:1Password for SSH and Git (Beta) by ydant on Friday February 18, 2022 @07:41AM (#30385010)
Agreed it could be a bit quicker or more intuitive, but this seems to be a use-case I don't need to work with too often, so it's not bothered me.

I'm guessing there's a mix of performance concern and privacy concern. They want to make sure you're intentionally revealing the secret (image) and they want to hold off on decrypting the file until needed. It feels like decrypting a file is a fairly slow operation (although I'm not really sure why).

I just don't think comparing to the file in your local files is quite the same, since it's not encrypted / behind password protection. If you did this sort of thing a lot, you'd probably have it optimized down to a very accessible shortcut, after all.

Re:1Password for SSH and Git (Beta) by ydant on Wednesday February 16, 2022 @06:26PM (#30367287)
I do really hate how links between attachments and password entries get broken pretty easily, though. I think this is an area for improvement.
Re:1Password for SSH and Git (Beta) by DonHopkins on Wednesday February 16, 2022 @11:22AM (#30361959)
Have you tried actually using that in practice? It's extremely clumsy and inconvenient, requiring a whole lot more pointing and clicking and waiting and typing to attach the file, look at its contents, copy its value, or even edit it, than a simple multi-line text field would require.

And in the common case that the text is only on my clipboard, for example if I copied it from a web page or shell, then I have to go to all the effort of first saving it locally into a file somewhere in the file system, before laboriously navigating to it again with 1Password (often having to wait for my USB hard drives to spin up again as my Mac is frozen for 50 seconds showing the file dialog that scans all the attached storage devices) and finally adding it as a file attachment.

And then after all that extra busy work, the plaintext secret file now is floating around unencrypted in my file system somewhere, which is exactly what I didn't need.

Re:1Password for SSH and Git (Beta) by chipotle_coyote on Wednesday February 16, 2022 @12:31PM (#30362852)
I support your request for basically making the "notes" field for 1Password entries into a field type, so you can have multiple ones.

Having said that, I admit I generally haven't missed them for the use case of SSH keys, even though I do occasionally store those in 1Password -- I use the Secure Notes feature for that. Copy the key to the clipboard with "cat ssh.key | pbcopy", make a new Secure Note, paste. I suppose it hadn't occurred to me to do anything else in part because, well, I can't -- but also because I don't think of these as username/password combinations, I think of them as "SSH for server foobar," and the search feature works perfectly well for that.

This is arguably a workaround instead of the ideal, but I actually use Secure Notes pretty frequently. WiFi base station passwords, recovery keys, personal access tokens, stuff that in general doesn't fit the "web site with username and password and possibly 2FA key" model I'm fairly sure I started this before 1Password even had a "Notes" field.

Re:1Password for SSH and Git (Beta) by solarengineer on Wednesday February 16, 2022 @11:34AM (#30362107)
I store all my ssh keys as attachments. All my ssh keys are passphrase protected as well.

When I do download the keys, it isn’t much of an everyday activity either

I do not need to keep transferring ssh keys regularly to my Mac- it is either a one time or a set up related activity.

1Password is just fine for storing ssh keys as attachments.

Have you considered writing to them to ask for what you need?

Re:1Password for SSH and Git (Beta) by doliveira on Wednesday February 16, 2022 @11:29AM (#30362050)
Wow, I was thinking of leaving KeepassXC for 1password but that is very much a deal-breaker. The UI isn't as pretty or well-thought, of course, but at the very least there aren't as many limitations
Re:1Password for SSH and Git (Beta) by DonHopkins on Wednesday February 16, 2022 @11:34AM (#30362108)
Unfortunately for me it was the kind of a thing that I didn't notice until I'd actually paid for a license and started using it. Then I tried to put my ssh public and private keys in there, and hit the wall.

It's such an obvious feature that would be so easy for them to implement, it made me feel like it must be possible and super-obvious to most people, but I was just too dumb to figure out how to do it.

(No, pressing shift-return in a single line text field doesn't work. And pasting multi-line text into a text field replaces newlines by spaces, thank you.)

Re:1Password for SSH and Git (Beta) by 1123581321 on Wednesday February 16, 2022 @01:30PM (#30363748)
Use the SSH key entry type. Multi-line works and you can store both public and private.
Re:1Password for SSH and Git (Beta) by bonoboTP on Wednesday February 16, 2022 @11:54AM (#30362370)
Then why not file attachments? You may want to store a JPEG there too, for some reason.
Re:1Password for SSH and Git (Beta) by beermonster on Wednesday February 16, 2022 @12:00PM (#30362435)
I guess because you have to extract it to local file system in order to use it and that makes it exposed.