Jump to content

Issuetracker plugin - password storage (and minor other remarks)


evert bevernage

Recommended Posts

Hi,

 

I've written an extension for YouTrack based on the instructions here:

https://www.plasticscm.com/documentation/extensions/plastic-scm-version-control-task-and-issue-tracking-guide.shtml#Customizetheglobalconfiguration

 

Everything works fine and was rather easy to set up, so thank you for the well documented section there.

 

I ran into one issue: When defining configuration parameters, i used the IssueTrackerConfigurationParameterType of type password

The password is encrypted in the preference file and when passed to the plugin. I couldn't find a way to get the decrypted password so I

could pass it to the YouTrack server to log on.

 

Right now I'm using a plain text field, but of course, that isn't how its supposed to work. Can you shed some light on which method to use

to get the decrypted password? Or how should I use the password?

 

Side remarks with regards to issuetracking:

- I can't use different issuetrackers for different projects (for now not really a problem for me, but that could be an issue for some people)

- I'm not realy sure when this function is called: UpdateLinkedTasksToChangeset, My breakpoints were never triggered in my testing.

 

Best Regards,

 

Evert

Link to comment
Share on other sites

Hi Evert,

 

Sorry for the inconveniences. As you noted, Plastic SCM automatically encrypts the input password as a security measure -provided that you marked that field as password, of course!

 

To revert that encryption you can reference our utils.dll library (located at C:\Program Files\PlasticSCM5\client\utils.dll) and call the CryptoServices.GetDecryptedPassword(string) method.

 

This is a valid example you could include in your extension code:

internal string GetDecryptedPassword(IssueTrackerConfiguration configuration)
{
    string encryptedPassword = config.GetValue("Password");
    return CryptoServices.GetDecryptedPassword(encryptedPassword);
}

Regarding your remarks, I'm not sure what you mean about the single-project issue. We're currently working on allowing different issue tracker configuration settings for each repository; if you'd like to work with several projects inside the same repository we recommend you to implement that functionality by using additional issue tracker configuration fields. Creating one which stores a comma-separated project keys to be handled would be a good start, maybe (it depends on your requirements). You can take a look to our JIRA extension, too. It allows multiple projects per repository by using the MULTIPLE_PROJECTS project key and then expecting the actual project key in the branch name.

 

The UpdateLinkedTasksToChangeset method is only used when the issue tracker extension is configured to work in Task On Changeset mode. Was it your case? If you were using Task On Branch mode, detecting no calls to UpdateLinkedTasksToChangeset is the expected behaviour.

 

Thanks for your feedback! Please feel free to ask if you have any more questions or you'd like more detailed information.

 

Regards,

Miguel

Link to comment
Share on other sites

Thx for the input Miguel,

 

I'm going to implement the password like you've shown above,

 

UpdateLinkedTasksToChangeset is not relevant for me, thx for the explanation

 

 

 

We're currently working on allowing different issue tracker configuration settings for each repository;

 

Does this mean that the IsGlobal property of the configurationparameter is not used? We are currently initiating a second project in a different repository and have found that the preferences are not specific to the repository, at least the BranchPrefix is not specific. (I was under the impression that this used to work in an older version?)

 

I'm thinking to circumvent this by leaving the prefix blank, and GetTaskForBranch do the detection based on a different preferences field. Any other suggestions?

 

Best Regards,

 

Evert

Link to comment
Share on other sites

Hi Miguel,

 

 

....

Regarding your remarks, I'm not sure what you mean about the single-project issue. We're currently working on allowing different issue tracker configuration settings for each repository;

...

 

When do you think this would be available? We could really use this. (Is there a development version available with this feature?)

 

Best Regards,

 

Evert

Link to comment
Share on other sites

Hi Evert,

 

The IsGlobal field is only used when the global repository configuration is enabled for issue trackers. You will find additional information (and how to set it up) at https://www.plasticscm.com/documentation/extensions/plastic-scm-version-control-task-and-issue-tracking-guide.shtml#Globalextensionconfiguration

 

Starting with release 5.4.16.699, there's a new dropdown list on the Preferences dialog, "Issue trackers" tab, called "Apply binding to:". You can select there "all repositories" or a specific one. Please notice that you'll need to configure the global repository configuration first!

 

I hope this fits your needs :-)

 

Regards,

Miguel

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Hi Evert,

 

You can find the issue tracker configuration files at C:\Users\<username>\AppData\Local\plastic4\issuetrackers\<hostname>_<port>\allrepos\ or C:\Users\<username>\AppData\Local\plastic4\issuetrackers\<hostname>_<port>\<repname>\ .

 

Regards,

Miguel

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...