Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-70471

Adding AMI to Configure Clouds results in HTTP 403

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Blocker Blocker
    • ec2-plugin
    • EC2 plugin version: v2.0.5
      Jenkins version: 2.375.2
      JDK version: 11.0.16
      Operating System: Amazon Linux

      Replication Steps:

      1. I add new "Amazon EC2" cloud from Manage Jenkins > Configure Clouds.
      2. I fill in name, region, private key.
      3. I click "Test Connection" button. Result is "Success".
      4. I then add one AMI and fill in the required fields.
      5. Then I click "Check AMI" button. It will give the correct AMI name.
      6. But when I click "Apply" or "Save", the page renders "403 Forbidden".

      I could not replicate this issue on Jenkins 2.263.4. It saves the AMI just fine.

      I checked for hints in the following places, but nothing was logged regarding this issue:

      • Logs from Manage Jenkins > System Logs
      • Logs from journalctl
      • Audit logs from the Audit Trail plugin (v3.11)
      • Reports from the Monitoring plugin (v1.91.0)

      I assume I have successfully established connection between the EC2 plugin and my Amazon account. So how come can I not save an AMI?

        1. 1.png
          1.png
          73 kB
        2. 2.png
          2.png
          37 kB

          [JENKINS-70471] Adding AMI to Configure Clouds results in HTTP 403

          Christian added a comment -

          I'm uploading 2 screenshots: (1) is what happens when I click "Apply", and (2) is when I click "Save". Please let me know if you need anymore information.

          Christian added a comment - I'm uploading 2 screenshots: (1) is what happens when I click "Apply", and (2) is when I click "Save". Please let me know if you need anymore information.

          Christian added a comment -

          I worked around this issue of saving the Configure Clouds settings by doing the following:

          • SSH into the Jenkins controller server.
          • Manually edit $JENKINS_HOME/config.xml to add AMI, etc.
          • Do a (safe) restart on Jenkins.

          Christian added a comment - I worked around this issue of saving the Configure Clouds settings by doing the following: SSH into the Jenkins controller server. Manually edit $JENKINS_HOME/config.xml to add AMI, etc. Do a (safe) restart on Jenkins.

          Christian added a comment - - edited

          Solved.

          I'm hosting the Jenkins server behind WAF. It turns out WAF was causing HTTP 403. That explains why nothing gets logged in Jenkins, because my request gets blocked by WAF before reaching the server.

          This issue can be closed now. Sorry for the fuzz.

          Christian added a comment - - edited Solved. I'm hosting the Jenkins server behind WAF. It turns out WAF was causing HTTP 403. That explains why nothing gets logged in Jenkins, because my request gets blocked by WAF before reaching the server. This issue can be closed now. Sorry for the fuzz.

            thoulen FABRIZIO MANFREDI
            immovable Christian
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: