stashnotifier-plugin icon indicating copy to clipboard operation
stashnotifier-plugin copied to clipboard

Unable to use cert credentials in newer version of plugin

Open shapiroj opened this issue 7 years ago • 9 comments

We are using cert credentials with version 1.10.2. We'd like to upgrade to version 1.11 for the pipeline support. However, cert credential usage was disabled with https://github.com/jenkinsci/stashnotifier-plugin/commit/460d423b16d8c7f4608ad3b0f1b81023e6ec71da, pointing to some brokenness with a previous commit. Are there any more details on this (https://github.com/jenkinsci/stashnotifier-plugin/pull/98/files?), and is it possible to get this feature re-enabled?

shapiroj avatar Apr 18 '17 19:04 shapiroj

For me and my team, SSH is the only authentication method available.

Rykus0 avatar May 18 '17 12:05 Rykus0

How certificates are related with SSH, can you explain? Maybe I just misunderstand something, but for me SSH stands with SSH keys and SSL with Certificate credential authentication via SSL

scaytrase avatar May 18 '17 12:05 scaytrase

I guess I misunderstood, and maybe this is a different issue. SSH credentials are not available as choices for the plugin - only username and password. I guess I was equating an SSH key to a certificate - my apologies.

Rykus0 avatar May 18 '17 12:05 Rykus0

SSH keys are no way to use for HTTP API requests, unfortunately

scaytrase avatar May 18 '17 12:05 scaytrase

Ok, so I guess this plugin doesn't do what I thought, because what I'm thinking (updating the build status) doesn't need any authentication. I'll just create a shell script or something to run post-build and do it with curl. Sorry for muddying up this thread.

Rykus0 avatar May 18 '17 13:05 Rykus0

Generally this plugin does the same - it just performs http api call with json payload, but I really doubt that you can modify Bitbucket data (mark builds) without access to certain repository.

Documentation says the following:

The authenticated user must have LICENSED permission or higher to call this resource.

https://developer.atlassian.com/static/rest/stash/latest/stash-build-integration-rest.html#resources

scaytrase avatar May 18 '17 13:05 scaytrase

Ok, maybe I was logged in when I did it before. I guess I need to burn a license just so Jenkins can report build status back... I'll figure it out. Again, sorry for putting all this here.

Rykus0 avatar May 18 '17 13:05 Rykus0

Any ideas on the original problem? Cert credentials are no longer usable for the notifier plugin.

shapiroj avatar Jun 09 '17 14:06 shapiroj

@shapiroj I've no idea how to reproduce or test this, since the setup is very uncommon, so if you'll provide a PR with some kind of fixes we can make things faster

scaytrase avatar Jun 09 '17 15:06 scaytrase