pull-request-notifier-for-bitbucket icon indicating copy to clipboard operation
pull-request-notifier-for-bitbucket copied to clipboard

Avoid username/password being filled

Open gergelysanta opened this issue 8 years ago • 9 comments

I’ve installed this plugin to our local Bitbucket server and I’m stuck with it. My problem is that it does not work at all. I’ve no doubt something went wrong on my side, just have no clue what :(

I have Bitbucket Server v4.14.4 here. First time I installed notifier plugin v3.2 (I was not checking versions, just downloaded the latest one). It installed successfully, just was not working at all. After a day of playing with it I noticed that the latest version of your plugin is for v5 only, so I uninstalled and put v2.63 on my server.

The problem is that it behaves the same. I’ve tried several configuration changes configuring a button for pull-requests, but the button is not displayed. Even Jenkins job is not triggered when I set notification triggers. I'm triggering job by posting https://my.jenkins.server/job/job_name/build?token=build_token which works when I post it by curl.

Maybe v3.2 left some configuration in the server which causes the problem. Can you please give me a hint, how could I make it work?

Also tries v2.50, no change..

gergelysanta avatar Jul 17 '17 08:07 gergelysanta

Possibly related to #197 .

The title of this issue is to general, change it to reflect what part of the plugin that is not working for you.

The hints are in the issue template: https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/blob/master/ISSUE_TEMPLATE

tomasbjerre avatar Jul 17 '17 08:07 tomasbjerre

I can't make it more general because I didn't magage to get it work. Tried triggers and configuring a button. Tried to create a pull-request, modify (add commit), close and reopen, decline and reopen, all these with triggers set OPENED, REOPENED, RESCOPED_FROM, RESCOPED_TO, UPATED

gergelysanta avatar Jul 17 '17 08:07 gergelysanta

My configuration testing button only: screen shot 2017-07-17 at 09 18 54 screen shot 2017-07-17 at 09 19 07

gergelysanta avatar Jul 17 '17 08:07 gergelysanta

The title suggests that nothing is working. The description only mentions that buttons do not work. That is what is why the title is to general.

The output of the settings is interesting, as stated in the issue template:

  • http://localhost:7990/bitbucket/rest/prnfb-admin/1.0/settings
  • http://localhost:7990/bitbucket/rest/prnfb-admin/1.0/settings/buttons
  • http://localhost:7990/bitbucket/rest/prnfb-admin/1.0/settings/notifications

I will test this myself but this is probably same as #197 and I have never been able to reproduce that. Read that issue and see if there is anything there that you can add to help troubleshooting.

tomasbjerre avatar Jul 17 '17 09:07 tomasbjerre

Unfortunatelly nothing is working, I mentioned also triggers in the description.

Cannot be the reason that I installed v3.2 first?

gergelysanta avatar Jul 17 '17 09:07 gergelysanta

rest/prnfb-admin/1.0/settings

{"adminRestriction":"ADMIN","keyStore”:”<login>”,”keyStorePassword”:”<passw>”,”keyStoreType":"","shouldAcceptAnyCertificate":true}

rest/prnfb-admin/1.0/settings/buttons

[{"buttonFormList":[],"buttonFormListString":"[]","confirmation":"on","name":"Build","projectKey":"MGUI7","repositorySlug":"src","userLevel":"EVERYONE","uuid":"eca27d85-4d45-492a-848b-cda3a9edd2b6","confirmationText":"Are you sure you want to ask Mr.Jenkins to build the product with this change?"}]

rest/prnfb-admin/1.0/settings/notifications

[{"filterRegexp":"Build","filterString":"${BUTTON_TRIGGER_TITLE}","headers":[],"method":"POST","name":"Pull-request Jenkins Build","password”:”<passw>”,”projectKey":"MGUI7","repositorySlug":"src","triggerIfCanMerge":"ALWAYS","triggerIgnoreStateList":[],"triggers":["BUTTON_TRIGGER"],"url":"https://jenkins.local.com:8443/job/BB-EXEC/build?token=runBB-EXEC/","user”:”<login>”,”uuid":"b65bb32e-7a7a-4e71-a02a-e4bdca5fd386","postContentEncoding":"NONE"}]

gergelysanta avatar Jul 17 '17 09:07 gergelysanta

It may be that you have user and password in the keystore config but no keystore file. Do you use a keystore?

Also username and password in the notification. Same here, you may want to clear it.

Den 17 juli 2017 11:21 skrev "Gergely Sánta" [email protected]:

rest/prnfb-admin/1.0/settings

{"adminRestriction":"ADMIN","keyStore”:””,”keyStorePassword”:””,”keyStoreType":"","shouldAcceptAnyCertificate":true}

rest/prnfb-admin/1.0/settings/buttons

[{"buttonFormList":[],"buttonFormListString":"[]","confirmation":"on","name":"Build","projectKey":"MGUI7","repositorySlug":"src","userLevel":"EVERYONE","uuid":"eca27d85-4d45-492a-848b-cda3a9edd2b6","confirmationText":"Are you sure you want to ask Mr.Jenkins to build the product with this change?"}]

rest/prnfb-admin/1.0/settings/notifications

[{"filterRegexp":"Build","filterString":"${BUTTON_TRIGGER_TITLE}","headers":[],"method":"POST","name":"Pull-request Jenkins Build","password”:””,”projectKey":"MGUI7","repositorySlug":"src","triggerIfCanMerge":"ALWAYS","triggerIgnoreStateList":[],"triggers":["BUTTON_TRIGGER"],"url":"https://jenkins.local.com:8443/job/BB-EXEC/build?token=runBB-EXEC/","user”:””,”uuid":"b65bb32e-7a7a-4e71-a02a-e4bdca5fd386","postContentEncoding":"NONE"}]

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/issues/232#issuecomment-315705364, or mute the thread https://github.com/notifications/unsubscribe-auth/AAa1E5ErCquJOp-HLKUnCmLL4TSQBYytks5sOyeogaJpZM4OZqZ3 .

tomasbjerre avatar Jul 17 '17 09:07 tomasbjerre

I'm not using keystore but it automatically fills in my login and password when I configure the plugin. I cleared out login and password from the config I posted, <login> and <passwd> are dummy ones.

gergelysanta avatar Jul 17 '17 09:07 gergelysanta

Problem figured out.

Thanks to your hint with the keystore I started to think about why is it pre-filled with my local login and password when it needs a path to a keystore file. I'm working on macOS and using Safari browser. Safari somehow identified "Keystore path" and "Keystore password" fields as login/password and automatically filled in my local login/password even if I removed those values. This blocked me to achieve a working configuration because the plugin probably tried to use a nonexistent keystore file. I managed to remove these setting in Chrome and now it works. At least the button finally is displayed. The rest is on my configuration.

I'm not a web developer, don't know how those components work. Can this "issue" be somehow fixed? I mean some flags on those text fields forcing Safari browser not to think they are login/password fields?

gergelysanta avatar Jul 17 '17 10:07 gergelysanta