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

Introduce a mechanism for plugging in external auth UI helpers #119

Closed
mjcheetham opened this issue May 18, 2020 · 1 comment · Fixed by #120
Closed

Introduce a mechanism for plugging in external auth UI helpers #119

mjcheetham opened this issue May 18, 2020 · 1 comment · Fixed by #120
Labels
enhancement New feature or request

Comments

@mjcheetham
Copy link
Collaborator

At the moment GCM Core can shell out to external 'helper' applications that display authentication GUIs to capture input and notify the user of an OAuth flow. The name of the helpers are hard-coded, and the binaries must exist next to the main GCM Core binary on disk. This makes it hard to replace or add helpers not shipped in-box.

Proposal

  1. Introduce a configurable 'search path' setting (environment variable?) that external helpers can plug in to let GCM Core discover them.
  2. Add a setting to override the name of the UI helper for each host provider (e.g., credential.githubAuthHelper = gh-cl-helper)
  3. 3rd party helpers can add themselves on the 'helper search path' and set the credential.*AuthHelper option

Issues

  1. Malicious apps could insert themselves in the search path and capture/send-home input secrets. How can we verify or trust which application we're launching? Is this onus on the user?
  2. Multiple helpers could start fighting over the order of the search path setting, which might be confusing/annoying for users. Do we need to take more control over this? git-credential-manager-core install-plugin <x>? Too complicated?
@mjcheetham mjcheetham added the enhancement New feature or request label May 18, 2020
@mminns
Copy link
Contributor

mminns commented May 18, 2020

Perhaps rather than option 2, follow the pattern git credential.helpers already use.

If you just put the credential helper exe name then GCMC will only look in the install directory, e.g.

credential.githubAuthHelper = gh-cl-helper

If you put a full path the GCMC uses that

credential.githubAuthHelper = c:\blah\blah\gh-cl-helper.exe

This might simplify your issues as well since there is no 'search path' as such?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants