PTCInc / thingworx-gitbackup-extension

[Unofficial/Not supported] ThingWorx GitBackup Extension for storing your ThingWorx application code in a Git repository
MIT License
25 stars 11 forks source link

git over ssh support #7

Closed TG-JC closed 3 years ago

TG-JC commented 3 years ago

Our corporate Bitbucket is hosted internally and security/authentication management is done through ssh keys. HTTPS-based access is protected by two authentication levels (proxy level, and Bitbucket level) which git client does not support.

To be able to test this extension, I've created a free Bitbucket account. This is not compliant with our IT/Data governance policy. Do you plan to support ssh key-based authentication ?

vrosu commented 3 years ago

In short, not on the short term, but I am aware that at least one other company needed this, and they implemented the key based authentication on their own. GitBackup supports proxy (albeit a crude implementation) - sure you can't do it in that way?

vrosu commented 3 years ago

@TG-JC any luck on testing the HTTP proxy support?

vrosu commented 3 years ago

Closing the question as of now due to lack of feedback. Please feel free to re-open in future if needed.

ThibaultGeorges commented 3 years ago

Hello Vladimir,

As expected, it does not work. This result is compliant with tests I did in the past with command line git. image

Here is configuration - I wiped out my enterprise login/password image image

Result is the same if I remove user:password string from proxy settings.

Please note that GitBackup is on the internet and tries to access an on-prem bitbucket. I need to cross an enterprise reverse proxy. When trying to access this ressource manually through a browser, I have to give my password twice: first time at reverse proxy level (NTLM, or kind of), then at Bitbucket level (through ADFS, with redirection). SSH was the key to overcome this complexity.

ThibaultGeorges commented 3 years ago

Test was done with 443 port, not 433

vrosu commented 3 years ago

I understand. Modifying the extension to allow authentication through SSH keys would need to involve this:

  1. Placing the SSH key in the subfolder corresponding to your GitThing (eg: GitRepository/mygitthingsubfolder/key.ssh). Ideally a parameter would allow you to define
  2. Implementing the SSH-key based authentication in the Java GitBackup template - I found this as an example https://www.codeaffine.com/2014/12/09/jgit-authentication/

I do not have a timeline to implement this, but I can spend time for quick helper meetings if you or somebody would be willing to work on this (it requires Eclipse+Java knowledge). Note: Ideally (but not mandatory), the end result should result in an update to the extension so that everyone can benefit, considering the open-source mentality around it.

ThibaultGeorges commented 3 years ago

Contributing back to community is not at all an issue. The issue is that our team doesn't have know-how to develop JAVA extension. Since Thingworx should be a low code platform, we do not invest in JAVA developers :(