Skip to content

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

@ihsaddamhussain

Description

@ihsaddamhussain

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions