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

[Feature] Add the ability to build authentication plugins #2067

Closed
1 of 2 tasks
waterfoul opened this issue Oct 30, 2020 · 0 comments · Fixed by #2664
Closed
1 of 2 tasks

[Feature] Add the ability to build authentication plugins #2067

waterfoul opened this issue Oct 30, 2020 · 0 comments · Fixed by #2664
Labels
enhancement New feature or request

Comments

@waterfoul
Copy link
Contributor

waterfoul commented Oct 30, 2020

  • I'd be willing to implement this feature
  • This feature can already be implemented through a plugin

Describe the user story

When dealing with 3rd party private repos it would be nice to have the ability to make an authentication plugin to avoid the need for hard coded credentials

Describe the solution you'd like

At the most basic level you would just need to add a hook to npmHttpUtils.getAuthenticationHeader which would allow you to change the authentication headed. The plugin would likely only need the same arguments which are passed to getAuthConfiguration. It would then just return the authentication header string.

Describe the drawbacks of your solution

There is a fair amount of potential for a malicious extension to break things so the error messages for failures here will likely need to be pretty robust.

Describe alternatives you've considered

You could also provide a hook instead in getAuthConfiguration to give the opportunity to override just the auth config. Allowing replacement of the whole string passed via the header is more flexible though since not all authentication systems use Bearer or Basic auth

Additional context

If this were implemented I would likely build an Azure DevOps auth plugin

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.

1 participant