Salesforce Plugin - Build Server Properties

The Salesforce plugin I'm working on needs to compile in the cloud.  In order to do this, I have to log the user into Salesforce.  For security, I'm storing the user's password in the Password Vault.

For IDEA 12, I implemented a com.intellij.openapi.compiler.TranslatingCompiler and when invoked would get the user's password from the vault.  If they haven't entered the master password yet, it will prompt them for the master password.  This all worked fine.

Now that I've migrated to IDEA 13, the TranslatingCompiler is no longer used.  I've impelmented a org.jetbrains.jps.incremental.BuilderService and a org.jetbrains.jps.incremental.ModuleLevelBuilder.  I can access project settings using a org.jetbrains.jps.model.serialization.JpsModelSerializerExtension and a org.jetbrains.jps.model.ex.JpsElementBase.  But I'm wondering what's the best way to securely pass the password to the build process?

  • Would the build service have access to the password vault?
  • If the master password hasn't been entered yet, would the user get prompted for it?
  • Is there a mechanism for passing build level parameters to the Build Server?
Comment actions Permalink

In IDEA 13 build is executed in a separate java process, which doesn't have access to the password vault and isn't supposed to show any dialogs.
If you need to pass a password to the build process you can provide BuildProcessParametersProvider extension, fetch the password in 'getVMArguments'
method and pass it as a system property to the build process.

Nikolay Chashnikov
"Develop with pleasure!"

Comment actions Permalink

Thanks so much!  BuildProcessParametersProvider is exactly what I was looking for.


Please sign in to leave a comment.