Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-74326

The username field is treated as a mandatory field in the outgoing mail server configuration when using Oauth 2.0

XMLWordPrintable

    • 9.02
    • 27
    • Severity 3 - Minor
    • 54
    • Hide
      Atlassian Update – 07 Oct 2024

      Thank you for reporting this issue. In the last weeks we have been working hard on fixing it.

      Summary of the problem:

      The original problem reported in the ticket preventes users from setting up a completely unauthenticated SMTP server. This has been addressed by changes from 2023 (released in 9.4.99.10.1 and 9.11.0).

      The OAuth2 configuration, however, requires the username to be specified as documented by the following two documents: from Google  and from Microsoft. Empty username is not accepted and causes errors when testing such a connection. See also the KB article for more information on this

      New behavior after the change:

      The validation for username field for OAuth2 authentication has been re-added. Users need to specify the username in order to test such a connection. Note that for other authentication methods the behavior is different, users will still be able to add an unauthenticated SMTP server (using basic authentication and leaving username and password empty). 

      Status of the fix and Fix Version:

      The fix is ready, and we’re moving the status of this ticket to Waiting for release with Fix Versions of 10.2.0 and 10.1.1.

      Best regards,

      Bartosz Radaczyński
      Jira DC Principal Software Engineer

      Show
      Atlassian Update – 07 Oct 2024 Thank you for reporting this issue. In the last weeks we have been working hard on fixing it. Summary of the problem: The original problem reported in the ticket preventes users from setting up a completely unauthenticated SMTP server. This has been addressed by changes from 2023 (released in 9.4.9 ,  9.10.1  and  9.11.0 ). The OAuth2 configuration, however, requires the username to be specified as documented by the following two documents: from Google   and from Microsoft . Empty username is not accepted and causes errors when testing such a connection. See also the KB article for more information on this New behavior after the change: The validation for username field for OAuth2 authentication has been re-added. Users need to specify the username in order to test such a connection. Note that for other authentication methods the behavior is different, users will still be able to add an unauthenticated SMTP server (using basic authentication and leaving username and password empty).  Status of the fix and Fix Version: The fix is ready, and we’re moving the status of this ticket to Waiting for release with Fix Versions of 10.2.0  and 10.1.1 . Best regards, Bartosz Radaczyński Jira DC Principal Software Engineer

      Issue Summary

      The Oauth 2.0 authentication for the Outgoing Mail Server functionality was introduced in Jira 9.2.0 as per Jira 9.2 release notes.

      In the ⚙ > System > Outgoing Mail configuration page, the following is mentioned:

      Optional - if you use authenticated SMTP to send email, enter your username.

      However, when configuring an Outgoing Mail Server and when testing the connection, we are forced to enter something in that field, otherwise the connection test fails.

      Therefore, there are 2 problems here:

      • this field is mandatory while it is showing as optional
      • if this field is not correctly filled in (the browser might automatically autofill this field with a random user), we might run into the following error:
        Unfortunately no connection was possible. Review the errors below and rectify:
        AuthenticationFailedException: 535 5.7.3 Authentication unsuccessful [XXXXXXXXXX.XXXXXX.PROD.OUTLOOK.COM]
        

      Steps to replicate

      • Install Jira 9.2.0
      • Configure an Oauth 2.0 integration in ⚙ > Applications > Application links
      • Configure an Outgoing Mail Server in ⚙ > System > Outgoing Mail, and select the Oauth integration as the authentication method
        • Leave the username field empty
      • Authorize the mailbox
      • Test the connection

      Actual Results

      The connection test is not executed when the username field is not filled in, and the Jira admin user is forced to enter a username.

      Expected Results

      The connection test should be executed even if the username field is not filled in

        1. IssueStep1.png
          IssueStep1.png
          315 kB
        2. IssueStep2.png
          IssueStep2.png
          353 kB

              aea6bfd9e5b3 Bartosz Radaczyński
              jrey Julien Rey
              Votes:
              16 Vote for this issue
              Watchers:
              30 Start watching this issue

                Created:
                Updated:
                Resolved: