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 created issue -
          Christian made changes -
          Attachment New: 2.png [ 59868 ]
          Attachment New: 1.png [ 59869 ]
          Christian made changes -
          Attachment Original: 1.png [ 59869 ]
          Christian made changes -
          Attachment Original: 2.png [ 59868 ]
          Christian made changes -
          Attachment New: image-2023-01-24-09-43-31-581.png [ 59870 ]
          Christian made changes -
          Attachment New: 2.png [ 59871 ]
          Attachment New: 1.png [ 59872 ]
          Christian made changes -
          Attachment Original: image-2023-01-24-09-43-31-581.png [ 59870 ]

          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 made changes -
          Description Original: Replication Steps:
           # I add new "Amazon EC2" cloud from Manage Jenkins > Configure Clouds.
           # I fill in name, region, private key.
           # I click "Test Connection" button. Result is "Success".
           # I then add one AMI and fill in the required fields.
           # Then I click "Check AMI" button. It will give the correct AMI name.
           # But when I click "Apply" or "Save", the page renders "403 Forbidden".

          I checked the following, 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?
          New: Replication Steps:
           # I add new "Amazon EC2" cloud from Manage Jenkins > Configure Clouds.
           # I fill in name, region, private key.
           # I click "Test Connection" button. Result is "Success".
           # I then add one AMI and fill in the required fields.
           # Then I click "Check AMI" button. It will give the correct AMI name.
           # 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?

          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.

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

              Created:
              Updated:
              Resolved: