Skip to content

Add PluginRepositoryAuthProvider for Custom IntelliJ Plugin Updates from Private Artifactory #495

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

Open
ihsaddamhussain opened this issue Feb 14, 2025 · 0 comments
Labels
feature request New feature or request

Comments

@ihsaddamhussain
Copy link

ihsaddamhussain commented Feb 14, 2025

Currently, when developing IntelliJ plugins that are hosted in private Artifactory, developers need to implement their own PluginRepositoryAuthProvider to handle authentication for plugin updates. Since the JFrog IntelliJ plugin already manages Artifactory credentials, it would be valuable to have a built-in PluginRepositoryAuthProvider implementation.

Use Case:

  • Developers hosting IntelliJ plugins in private Artifactory
  • Need authenticated access for plugin updates through IntelliJ's plugin manager
  • Currently requires custom implementation of PluginRepositoryAuthProvider
  • Credentials are already managed by JFrog IntelliJ plugin

Proposed Enhancement:

  1. Implement PluginRepositoryAuthProvider interface
  2. Utilize existing Artifactory credentials from JFrog plugin configuration
  3. Automatically handle authentication for plugin updates from Artifactory repositories

This would:

  • Reduce duplicate credential management
  • Simplify plugin update deployment through Artifactory
  • Provide a standardized way to handle plugin repository authentication
  • Benefit all IntelliJ plugin developers using Artifactory
<idea-plugin>
    <extensions defaultExtensionNs="com.intellij">
        <pluginRepositoryAuthProvider 
            implementation="org.jfrog.plugin.ArtifactoryPluginRepoAuthProvider"/>
    </extensions>
</idea-plugin>
class ArtifactoryAuthProvider : PluginRepositoryAuthProvider {
    override fun getAuthHeaders(url: String?): MutableMap<String, String> {
        return mutableMapOf(
            "Authorization" to "Bearer fetched-from-global-settings"
        )
    }

    override fun canHandle(url: String?): Boolean {
        return  true
    }
}

So now when I input the artifactory url pointing to updatesPlugin.xml in the Plugins page, then the authentication will be successful and all the plugins will be displayed.

I'm willing to contribute to this enhancement if you're open to it.

@ihsaddamhussain ihsaddamhussain added the feature request New feature or request label Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant