maxgoedjen / secretive

Store SSH keys in the Secure Enclave
MIT License
6.99k stars 155 forks source link

“iTerm” would like to access data from other apps. #540

Closed c10l closed 2 months ago

c10l commented 3 months ago

Hey!

Sorry, this is not an actual bug in Secretive at all but I thought you might have a solution to this.

I believe since macOS Sonoma, every time I open iTerm and SSH to a host, macOS pops up a dialogue saying “iTerm” would like to access data from other apps., with 2 buttons - to accept or deny. This is so iTerm can ask Secretive for the key.

To make matters worse, the keyboard focus is not on the dialogue so I need to use the pointer and click on it.

Same thing happens with any app that SSHs to hosts the first time. This happens at least ever time each app is closed and reopened but I think it's even more frequent than that - i.e. the acceptance has an expiry or something.

Are you aware of a way to make that dialogue stop popping up every time?

Thanks!

orazioedoardo commented 2 months ago

SSH is probably using a reference to the public key stored in Secretive container sandbox. Just copy the key to a location like ~/.ssh/id_something.pub and update the reference.

c10l commented 2 months ago

Thanks, that seems to serve as a workaround. You're right, SSH is referencing the SSH public key in Secretive.

That said, this is a workaround. I'd really like to be able to tell my OS that I trust certain things and it doesn't need to ask me every single time. :(

maxgoedjen commented 2 months ago

@c10l it's a bit of a workaround but those keys also should be totally stable. FWIW I think you can stop the prompts entirely by giving iTerm full disk access in Settings -> Privacy.

c10l commented 2 months ago

It's a good point about the keys being stable. I still prefex symlinking as it makes it very obvious what/where the actual key is.

Full disk access works, even though I'd have preferred something with a slightly reduced blast radius! 😅

Thanks!