How to connect VersionEye Enterprise with Atlassian Stash

The VersionEye Enterprise VM is currently in private beta. It runs in your private network and can crawl your private repositories, such as Artifactory Pro, Nexus Pro and others. And it can be connected to your private Git repository, such as GitHub Enterprise or Atlassian Stash.

The Atlassian Stash integration is brand new. Connecting it to Atlassian Stash means that VersionEye Enterprise can use Stash as OAuth SSO (Single Sign On) provider. If setup correctly users can login to VersionEye Enterprise with their existing Stash Accounts, by simply clicking the “Login with Stash” button.

Login with Stash

This is how you set it up. Check out this video on YouTube or keep reading forward.

First login in to VersionEye Enterprise. The default login is “admin” / “admin”.

VersionEyeEnterpriseLogin

Then click the “Stash Settings” link on the left side. The site should look similar to this one.

VersionEye Enterprise Stash Settings

The WEB URL needs to point to the domain where Stash is currently running. The OAuth process in Stash requires a private and a public RSA certificate. This is how you create the private RSA certificate.

 openssl genrsa -out mykey.pem 1024

This stores the private RSA certificate in mykey.pem. The next command generates the public RSA certificate and stores it in mykey.pub.

 openssl rsa -in mykey.pem -pubout >> mykey.pub

Now copy & paste the text value from mykey.pem into the “Private RSA Key” input field in VersionEye Enterprise.

VersionEye Enterprise + Atlassian Stash

Now login as admin to Stash and navigate to the “Application Links”. Unfortunately there is no easy way to generate an OAuth consumer key in Stash. We have to go through the “Application Links” process. Just add a new “Application Link”.

Stash-AppLink

You will get an error message similar to this one.

Screen Shot 2014-10-05 at 21.41.55

That’s OK. Just ignore it and click “Continue”. In the next form only the first 2 input fields are important. As Application Name type in “VersionEye” and as Application Type select “Generic Application”. All other input fields are not important and can be filled with random text.

Screen Shot 2014-10-05 at 21.43.09

That will create a new Application Link in the list. Click on “Edit” to set it up correctly. In the upcoming mask click on “Incoming Authentication”. Here you can fill in the “Consumer Key” from VersionEye.

Screen Shot 2014-10-05 at 21.44.18

And further down the public key from the “mykey.pub” file.

Screen Shot 2014-10-05 at 21.45.28

And that’s it.

Now you can logout from Stash and VersionEye. Navigate to the “Sign in” page on VersionEye Enterprise and you will see the “Login with Stash” button. By clicking on it you should get this dialog from Stash.

Screen Shot 2014-10-05 at 21.47.38

After clicking allow you are logged in into VersionEye Enterprise.

One thought on “How to connect VersionEye Enterprise with Atlassian Stash

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s