Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. Jira Cloud Setup in 2023 - Help getting setup with 4.3.2 via atlassian webhooks

Jira Cloud Setup in 2023 - Help getting setup with 4.3.2 via atlassian webhooks

Scheduled Pinned Locked Moved Support
8 Posts 3 Posters 12.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G
    G
    grae
    wrote on last edited by
    #1

    I've been trying to set up hdlink.jira and have followed what limited information is available.  I'm running the latest version 4.3.2 and found in the release notes of 4.1 that Jira Cloud is supposed to be supported. 

    I've added a Webhook in Jira Cloud by going to System Settings, Webhook, creating a webhook named netxms with the URL pointing back to the 
    https://netxmsserver.mydomain.com:8008/jira-webhook 
    It's been given Issue, Comment, Attachment, create, updated, and deleted permissions.

    However there is no way to set up authentication in Jira Cloud for webhooks, I tried creating and adding in an API key and using either netxms or my Jira [email protected] but that also failed.

    Port 8008 is open to the internet 

    Here are the settings I have in NetXms
     

    Name Value
    Jira.IssueType Task
    Jira.Login netxms
    Jira.Password
    Jira.ProjectCode MYPROJECT
    Jira.ProjectComponent
    Jira.ResolvedStatus Done
    Jira.ServerURL https://mydomain.atlassian.net
    Jira.Webhook.Path /jira-webhook
    Jira.Webhook.Port 8008

    When running the server in Debug mode 6 I can see the following errors, 

    16:24:19.419
    generic
    2023.04.17 21:23:43.742 *D* [hdlink.jira        ] MicroHTTPD: MHD_OPTION_EXTERNAL_LOGGER is not the first option specified for the daemon. Some messages may be printed by the standard MHD logger.
    16:24:19.419
    generic
    2023.04.17 21:23:43.744 *I* [hdlink.jira        ] Jira webhook initialized on port 8008
    16:25:35.655
    generic
    2023.04.17 21:25:35.607 *D* [hdlink.jira        ] Jira login failed, HTTP response code 401
    16:26:14.748
    generic
    2023.04.17 21:26:08.165 *D* [hdlink.jira        ] Jira connection check: HTTP response code is 401
    16:26:14.757
    generic
    2023.04.17 21:26:08.458 *D* [hdlink.jira        ] Jira login failed, HTTP response code 401
    16:26:14.757
    generic
    2023.04.17 21:26:08.458 *D* [hdlink.jira        ] Jira login failed, HTTP response code 401
    16:29:43.053
    generic
    2023.04.17 21:29:42.339 *D* [hdlink.jira        ] MicroHTTPD: Error processing request (HTTP response code is 400 ('<html><head><title>Request malformed</title></head><body>Your HTTP request was syntactically incorrect.</body></html>')). Closing connection.
    16:29:43.110
    generic
    2023.04.17 21:29:42.786 *D* [hdlink.jira        ] MicroHTTPD: Error processing request (HTTP response code is 400 ('<html><head><title>Request malformed</title></head><body>Your HTTP request was syntactically incorrect.</body></html>')). Closing connection.
    16:29:43.120
    generic
    2023.04.17 21:29:42.985 *D* [hdlink.jira        ] MicroHTTPD: Error processing request (HTTP response code is 400 ('<html><head><title>Request malformed</title></head><body>Your HTTP request was syntactically incorrect.</body></html>')). Closing connection.
    16:29:44.168
    generic
    2023.04.17 21:29:43.405 *D* [hdlink.jira        ] MicroHTTPD: Error processing request (HTTP response code is 400 ('<html><head><title>Request malformed</title></head><body>Your HTTP request was syntactically incorrect.</body></html>')). Closing connection.
    16:30:13.402
    generic
    2023.04.17 21:30:12.427 *D* [hdlink.jira        ] Jira connection check: HTTP response code is 401
    16:30:13.412
    generic
    2023.04.17 21:30:12.698 *D* [hdlink.jira        ] Jira login failed, HTTP response code 401
    16:36:49.659
    generic
    2023.04.17 21:36:49.140 *D* [hdlink.jira        ] Jira webhook request: GET /
    16:36:49.659
    generic
    2023.04.17 21:36:49.141 *D* [hdlink.jira        ] Response code 404 to webhook call
    16:38:42.772
    generic
    2023.04.17 21:38:42.046 *D* [hdlink.jira        ] MicroHTTPD: Error processing request (HTTP response code is 400 ('<html><head><title>Request malformed</title></head><body>Your HTTP request was syntactically incorrect.</body></html>')). Closing connection.
    16:42:25.116
    generic
    2023.04.17 21:42:24.418 *D* [hdlink.jira        ] MicroHTTPD: Error processing request (HTTP response code is 400 ('<html><head><title>Request malformed</title></head><body>Your HTTP request was syntactically incorrect.</body></html>')). Closing connection.
    16:43:08.578
    generic
    2023.04.17 21:43:08.464 *D* [hdlink.jira        ] MicroHTTPD: Error processing request (HTTP response code is 400 ('<html><head><title>Request malformed</title></head><body>Your HTTP request was syntactically incorrect.</body></html>')). Closing connection.
    16:43:35.507
    generic
    2023.04.17 21:43:34.859 *D* [hdlink.jira        ] MicroHTTPD: Error processing request (HTTP response code is 400 ('<html><head><title>Request malformed</title></head><body>Your HTTP request was syntactically incorrect.</body></html>')). Closing connection.
    

    If I run the server with Debug level 7 I get a little bit more information

    2023.04.17 22:24:55.996 *D* [hdlink.jira        ] Jira webhook request: GET /jira-webhook
    17:24:57.968
    generic
    2023.04.17 22:24:57.334 *D* [hdlink.jira        ]    Host: localhost:8008
    17:24:57.968
    generic
    2023.04.17 22:24:57.334 *D* [hdlink.jira        ]    Connection: keep-alive
    17:24:57.968
    generic
    2023.04.17 22:24:57.334 *D* [hdlink.jira        ]    sec-ch-ua: "Chromium";v="112", "Microsoft Edge";v="112", "Not:A-Brand";v="99"
    17:24:57.968
    generic
    2023.04.17 22:24:57.335 *D* [hdlink.jira        ]    sec-ch-ua-mobile: ?0
    17:24:57.968
    generic
    2023.04.17 22:24:57.336 *D* [hdlink.jira        ]    sec-ch-ua-platform: "Windows"
    17:24:57.968
    generic
    2023.04.17 22:24:57.336 *D* [hdlink.jira        ]    DNT: 1
    17:24:57.968
    generic
    2023.04.17 22:24:57.336 *D* [hdlink.jira        ]    Upgrade-Insecure-Requests: 1
    17:24:57.969
    generic
    2023.04.17 22:24:57.336 *D* [hdlink.jira        ]    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.48
    17:24:57.970
    generic
    2023.04.17 22:24:57.382 *D* [hdlink.jira        ]    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
    17:24:57.970
    generic
    2023.04.17 22:24:57.385 *D* [hdlink.jira        ]    Sec-Fetch-Site: none
    17:24:57.972
    generic
    2023.04.17 22:24:57.386 *D* [hdlink.jira        ]    Sec-Fetch-Mode: navigate
    17:24:57.972
    generic
    2023.04.17 22:24:57.386 *D* [hdlink.jira        ]    Sec-Fetch-User: ?1
    17:24:57.972
    generic
    2023.04.17 22:24:57.386 *D* [hdlink.jira        ]    Sec-Fetch-Dest: document
    17:24:57.972
    generic
    2023.04.17 22:24:57.387 *D* [hdlink.jira        ]    Accept-Encoding: gzip, deflate, br
    17:24:57.972
    generic
    2023.04.17 22:24:57.388 *D* [hdlink.jira        ]    Accept-Language: en-US,en;q=0.9
    17:24:57.972
    generic
    2023.04.17 22:24:57.388 *D* [hdlink.jira        ] Response code 405 to webhook call
    17:28:04.000
    generic
    2023.04.17 22:28:03.009 *D* [hdlink.jira        ] MicroHTTPD: MHD_OPTION_EXTERNAL_LOGGER is not the first option specified for the daemon. Some messages may be printed by the standard MHD logger.
    17:28:04.000
    generic
    2023.04.17 22:28:03.014 *I* [hdlink.jira        ] Jira webhook initialized on port 8008
    

    Any assistance would be greatly appreciated.  Thank you

    1 Reply Last reply
    0
    • G
      G
      grae
      wrote on last edited by
      #2

      So after much research and digging I have found the problem.  
      NetXMS makes requests to the following Jira Cloud Endpoints - 
      https://YOURDOMAIN.atlassian.net
               /rest/auth/1/session
               /rest/api/2/myself

      I was able to pull the Jira Cloud APIs into Postman and /auth/1 no longer was listed, (api/2 has also been replaced by 3.)  Apparently session is for a session cookie and Jira Deprecated this start back in 2019. So Atlassian has disabled this method and needs to be replaced by API Token (which is what I had tried before, I even tried encoding my username and password as BASE64 per the Jira docs)

      Which APIs and methods will be restricted?
      For the following APIs and pages, all requests using basic authentication with a non-API token credential will return 401 ( Unauthorized) after the deprecation period:

      • Jira Cloud public REST API
      • Jira Software public REST API
      • Jira Service Desk public REST API
      • All Jira Cloud web pages

      The following Jira Cloud REST API endpoint will be removed:

      • /rest/auth/1/session
        

      Deprecation notice - Basic authentication with passwords and cookie-based authentication (atlassian.com)

      Cookie-based auth for REST APIs (atlassian.com)

       

      Hopefully, this can get on the patch list to swap those calls as it is now a broken feature.  Please let me know if there's anything I can do to help, I've spent considerable time troubleshooting this and logged all the info if needed.

      1 Reply Last reply
      0
      • V
        V
        Victor Kirhenshtein
        wrote on last edited by
        #3

        Hi,

        I will take a look at it in the next few days. Will you be able to run test build to verify changes to Jira connector?

        Best regards,
        Victor

        1 Reply Last reply
        0
        • G
          G
          graeChris
          wrote on last edited by
          #4

          That shouldn't be a problem.

          1 Reply Last reply
          0
          • G
            G
            grae
            wrote on last edited by
            #5

            Victor,
            Thank you, yes we would be happy to run the test build. @graeChris just updated us to 4.3.5 so that’s our current version.

            Thank you

            1 Reply Last reply
            0
            • G
              G
              grae
              wrote on last edited by
              #6

              Just checking back on this if there has been any update or if you are ready for us to try a test build?

              Thank you!

              1 Reply Last reply
              0
              • G
                G
                grae
                wrote on last edited by
                #7

                We're still awaiting if this is on the plan for 2024 at least?

                Thank you!

                1 Reply Last reply
                0
                • V
                  V
                  Victor Kirhenshtein
                  wrote on last edited by
                  #8

                  Finally get to check this - works fine for me (using API token). Maybe the problem was in using password instead of API token.

                  I changed /rest/auth/1/session to /rest/api/2/myself for checking connection for the future though, as former URL supposed to be removed in the future.

                  Best regards,
                  Victor

                  1 Reply Last reply
                  0

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  Powered by NodeBB Contributors
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups