Maven Changes Plugin
  1. Maven Changes Plugin
  2. MCHANGES-324

Plugin logs into JIRA, but doesn't seem to make the status request with the session

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.10
    • Component/s: jira
    • Labels:
      None
    • Number of attachments :
      0

      Description

      After successful login, I end up with:

      Nov 11, 2013 5:47:19 PM org.apache.cxf.interceptor.LoggingOutInterceptor
      INFO: Outbound Message
      ---------------------------
      ID: 3
      Address: https://xxxxxxxxxxxxxxxxx/rest/api/2/status
      Http-Method: GET
      Content-Type: application/json
      Headers: {Accept=[application/json], Content-Type=[application/json]}
      --------------------------------------
      Nov 11, 2013 5:47:19 PM org.apache.cxf.interceptor.LoggingInInterceptor
      INFO: Inbound Message
      ----------------------------
      ID: 3
      Response-Code: 200
      Encoding: UTF-8
      Content-Type: application/json;charset=UTF-8
      Headers: {Cache-Control=[no-cache, no-store, no-transform], connection=[keep-alive], Content-Length=[2], content-type=[application/json;charset=UTF-8], Date=[Mon, 11 Nov 2013 22:47:30 GMT], Server=[nginx], Set-Cookie=[atlassian.xsrf.token=B14E-GL73-6FKZ-OP3B|dd19dbabf6f82c59be235929d3f1ee8d9e41fa4a|lout; Path=/], Strict-Transport-Security=[max-age=315360000;includeSubdomains], Vary=[Accept-Encoding], X-AREQUESTID=[1067x34467x1], X-ASEN=[SEN-2356824], X-AUSERNAME=[anonymous]}
      Payload: []
      

      Which returns nothing as you can see. I think that may be because it has X-AUSERNAME=[anonymous] ? Instead of using the session it created...

      After logging into jira in chrome, pasting the just the rest url into the browser returns all the different status (works as I'd expect).

        Issue Links

          Activity

          Hide
          Anthony Whitford added a comment -

          This is what I am running into too, and I get the following stack trace:

          [INFO] Generating "JIRA Report" report    --- maven-changes-plugin:2.9
          [WARNING]
          org.apache.maven.plugin.MojoFailureException: Could not find status Closed.
                  at org.apache.maven.plugin.jira.RestJiraDownloader.resolveOneItem(RestJiraDownloader.java:259)
                  at org.apache.maven.plugin.jira.RestJiraDownloader.resolveList(RestJiraDownloader.java:240)
                  at org.apache.maven.plugin.jira.RestJiraDownloader.resolveIds(RestJiraDownloader.java:206)
                  at org.apache.maven.plugin.jira.RestJiraDownloader.doExecute(RestJiraDownloader.java:128)
                  at org.apache.maven.plugin.jira.AdaptiveJiraDownloader.doExecute(AdaptiveJiraDownloader.java:47)
                  at org.apache.maven.plugin.jira.JiraMojo.executeReport(JiraMojo.java:367)
                  at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:190)
                  at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:219)
          

          Can this please be placed on the 2.10 Road Map?

          Show
          Anthony Whitford added a comment - This is what I am running into too, and I get the following stack trace: [INFO] Generating "JIRA Report" report --- maven-changes-plugin:2.9 [WARNING] org.apache.maven.plugin.MojoFailureException: Could not find status Closed. at org.apache.maven.plugin.jira.RestJiraDownloader.resolveOneItem(RestJiraDownloader.java:259) at org.apache.maven.plugin.jira.RestJiraDownloader.resolveList(RestJiraDownloader.java:240) at org.apache.maven.plugin.jira.RestJiraDownloader.resolveIds(RestJiraDownloader.java:206) at org.apache.maven.plugin.jira.RestJiraDownloader.doExecute(RestJiraDownloader.java:128) at org.apache.maven.plugin.jira.AdaptiveJiraDownloader.doExecute(AdaptiveJiraDownloader.java:47) at org.apache.maven.plugin.jira.JiraMojo.executeReport(JiraMojo.java:367) at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:190) at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:219) Can this please be placed on the 2.10 Road Map?
          Hide
          Dennis Lundberg added a comment -

          Fixed in r1578591.

          Please give the latest 2.10-SNAPSHOT a try, to verify that it works in your environments as well.

          Show
          Dennis Lundberg added a comment - Fixed in r1578591 . Please give the latest 2.10-SNAPSHOT a try, to verify that it works in your environments as well.
          Hide
          Richard Barnett added a comment - - edited

          I just saw that 2.10 has been released so thought I'd test it.

          Using 2.9 with the MCHANGES-291 patch works.
          Using the release of 2.10 does not.
          I think the JIRA api request for .../status is missing the studio.crowd.tokenkey cookie from the .../session response.

          Patched 2.9 -X output:

          ...
          Address: https://palomamobile.atlassian.net/rest/api/2/status
          Http-Method: GET
          Content-Type: application/json
          Headers: {Accept=[application/json], Content-Type=[application/json], Cookie=[studio.crowd.tokenkey=02a9...sg00; Domain=.palomamobile.atlassian.net; Path=/; Secure; HttpOnly, studio.crowd.tokenkey=""; Domain=.palomamobile.atlassian.net; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure; HttpOnly, JSESSIONID=357B...C779; Path=/; Secure; HttpOnly, atlassian.xsrf.token=BEV2-GO5R-UEXG-O36M|7809ad18ca297320d74fe09e58528ed0c6bd63b7|lout; Path=/; Secure]}
          
          Response-Code: 200
          Headers: {Cache-Control=[no-cache, no-store, no-transform], connection=[keep-alive], Content-Length=[5769], content-type=[application/json;charset=UTF-8], Date=[Wed, 16 Apr 2014 06:16:24 GMT], Server=[nginx], Set-Cookie=[atlassian.xsrf.token=BEV2-GO5R-UEXG-O36M|8cabb1d1131c4474fb2e0b9752bc96705d0c9e86|lin; Path=/; Secure], Strict-Transport-Security=[max-age=315360000;includeSubdomains], Vary=[Accept-Encoding], X-AREQUESTID=[976x17573x1], X-ASEN=[SEN-2342040], X-ASESSIONID=[105s9dl], X-AUSERNAME=[richard], X-Content-Type-Options=[nosniff], X-Seraph-LoginReason=[OK]}
          ...
          Payload: [{...},...]
          

          2.10 -X output:

          ...
          Address: https://palomamobile.atlassian.net/rest/api/2/status
          Http-Method: GET
          Content-Type: application/json
          Headers: {Accept=[application/json], Content-Type=[application/json], Cookie=[$Version="1"; JSESSIONID=B587...D705; $Path=/, $Version="1"; atlassian.xsrf.token=BEV2-GO5R-UEXG-O36M|5fff433f88eef360c36b07b6a3613bf8aac947c9|lout; $Path=/, $Version="1"; studio.crowd.tokenkey=""]}
          
          Response-Code: 200
          Headers: {Cache-Control=[no-cache, no-store, no-transform], connection=[keep-alive], Content-Length=[2], content-type=[application/json;charset=UTF-8], Date=[Wed, 16 Apr 2014 06:07:58 GMT], Server=[nginx], Strict-Transport-Security=[max-age=315360000;includeSubdomains], Vary=[Accept-Encoding], X-AREQUESTID=[967x17557x1], X-ASEN=[SEN-2342040], X-ASESSIONID=[b0z5dq], X-AUSERNAME=[anonymous], X-Content-Type-Options=[nosniff]}
          ...
          Payload: []
          
          Show
          Richard Barnett added a comment - - edited I just saw that 2.10 has been released so thought I'd test it. Using 2.9 with the MCHANGES-291 patch works. Using the release of 2.10 does not. I think the JIRA api request for .../status is missing the studio.crowd.tokenkey cookie from the .../session response. Patched 2.9 -X output: ... Address: https: //palomamobile.atlassian.net/ rest /api/2/status Http-Method: GET Content-Type: application/json Headers: {Accept=[application/json], Content-Type=[application/json], Cookie=[studio.crowd.tokenkey=02a9...sg00; Domain=.palomamobile.atlassian.net; Path=/; Secure; HttpOnly, studio.crowd.tokenkey=""; Domain=.palomamobile.atlassian.net; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure; HttpOnly, JSESSIONID=357B...C779; Path=/; Secure; HttpOnly, atlassian.xsrf.token=BEV2-GO5R-UEXG-O36M|7809ad18ca297320d74fe09e58528ed0c6bd63b7|lout; Path=/; Secure]} Response-Code: 200 Headers: {Cache-Control=[no-cache, no-store, no-transform], connection=[keep-alive], Content-Length=[5769], content-type=[application/json;charset=UTF-8], Date=[Wed, 16 Apr 2014 06:16:24 GMT], Server=[nginx], Set-Cookie=[atlassian.xsrf.token=BEV2-GO5R-UEXG-O36M|8cabb1d1131c4474fb2e0b9752bc96705d0c9e86|lin; Path=/; Secure], Strict-Transport-Security=[max-age=315360000;includeSubdomains], Vary=[Accept-Encoding], X-AREQUESTID=[976x17573x1], X-ASEN=[SEN-2342040], X-ASESSIONID=[105s9dl], X-AUSERNAME=[richard], X-Content-Type-Options=[nosniff], X-Seraph-LoginReason=[OK]} ... Payload: [{...},...] 2.10 -X output: ... Address: https: //palomamobile.atlassian.net/ rest /api/2/status Http-Method: GET Content-Type: application/json Headers: {Accept=[application/json], Content-Type=[application/json], Cookie=[$Version= "1" ; JSESSIONID=B587...D705; $Path=/, $Version= "1" ; atlassian.xsrf.token=BEV2-GO5R-UEXG-O36M|5fff433f88eef360c36b07b6a3613bf8aac947c9|lout; $Path=/, $Version= "1" ; studio.crowd.tokenkey=""]} Response-Code: 200 Headers: {Cache-Control=[no-cache, no-store, no-transform], connection=[keep-alive], Content-Length=[2], content-type=[application/json;charset=UTF-8], Date=[Wed, 16 Apr 2014 06:07:58 GMT], Server=[nginx], Strict-Transport-Security=[max-age=315360000;includeSubdomains], Vary=[Accept-Encoding], X-AREQUESTID=[967x17557x1], X-ASEN=[SEN-2342040], X-ASESSIONID=[b0z5dq], X-AUSERNAME=[anonymous], X-Content-Type-Options=[nosniff]} ... Payload: []
          Hide
          Dennis Lundberg added a comment -

          Richard,

          Can you please open a new issue. Looking at your logs, it seems that you are using an Atlassian hosted version of JIRA. There might be other issues with that, that was no covered by this issued.

          Show
          Dennis Lundberg added a comment - Richard, Can you please open a new issue. Looking at your logs, it seems that you are using an Atlassian hosted version of JIRA. There might be other issues with that, that was no covered by this issued.

            People

            • Assignee:
              Dennis Lundberg
              Reporter:
              Antony Stubbs
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: