Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clipboard interface #68

Closed
robert-cronin opened this issue Aug 11, 2020 · 2 comments
Closed

Clipboard interface #68

robert-cronin opened this issue Aug 11, 2020 · 2 comments
Assignees
Labels
development Standard development

Comments

@robert-cronin
Copy link
Contributor

Clipboard

Clipboards are a property of the "windowing" system of operating systems. Which means there is not standard API for clipboards. If you are on Linux, you have both X windowing system AND also the Wayland system. These are 2 completely different APIs as well. If you are on Windows, you probably have some "windows native api" to hook into. If you are on Android or iOS, again, native APIs here.

So therefore the clipboard interface cannot be done in js-polykey. Because clipboards mean there is a GUI. That means clipboard interface has to be coded in Polykey.

So this sort of means that we can add the "stub" to the CLI to support clipboard. However if the GUI version of polykey hasn't been installed, then it just fails. Or errors out. Outputs to STDERR, saying "clipboard is not supported, use Polykey".

When the Polykey GUI is launched or when the Polykey GUI is installed. Then this functionality becomes possible, and when using the clipboard it should work.

Examples of doing this:

# this copies to clipboard on linux X window
echo 'abc' | xclip -selection c
# this copies OUT from clipboard on linux X window
xclip -selection clipboard -o | cat

That would mean something like:

pk secrets get K -clipboard

Consider this as part of the "chording" interface.

Clipboard access is primarily a UX thing for desktops GUIs and interactive usage on mobile platforms too. On mobile platforms people are more likely to use direct integrations of the system password autofiller. However autofiller doesn't always work, so clipboard is necessary.

On Desktop GUI interactive usage, you pretty always use clipboard. There's no OS-level autofiller that I know of. There are "application-specific" autofillers like browser extensions and gpg agent/ssh agent/pinentry provided by the Free Desktop Foundation. There's too many of these integration points, this is why clipboard is still the universal adapter of data passing between arbitrary GUI programs.

If we were to hook into OS level autofillers/entry systems:

  • Linux + Free Desktop Foundation - pinentry
  • Mac - keychain
  • Windows - ?
@robert-cronin
Copy link
Contributor Author

From discussion, this will be removed from the MVP milestone.
The MVP milestone will employ a clipboard interface from the electron API and this issue will be left for integration into the cli/js-polykey

@robert-cronin robert-cronin removed this from the PolyKey MVP milestone Oct 30, 2020
@robert-cronin
Copy link
Contributor Author

Closing on account of migration to gitlab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Standard development
Development

No branches or pull requests

1 participant