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

JEP-200 com.amazonaws.services.kinesis.producer.KinesisProducer for security reasons

    XMLWordPrintable

Details

    Description

      trying to crate a java plugin for jenkins but when testing it I get the follwing error:

       

      ava.lang.UnsupportedOperationException: Refusing to marshal com.amazonaws.services.kinesis.producer.KinesisProducer for security reasons; see https://jenkins.io/redirect/class-filter/ at hudson.util.XStream2$BlacklistedTypesConverter.marshal(XStream2.java:546)

       

      reading a bit found out the amazon library may have been blacklisted, didn't find any workaorund for that.

      Attachments

        Activity

          oleg_nenashev Oleg Nenashev added a comment -

          The reported code is unrelated. The issue happens when the project is saved, likely the class ia created in the constructor

          oleg_nenashev Oleg Nenashev added a comment - The reported code is unrelated. The issue happens when the project is saved, likely the class ia created in the constructor
          joanperez juan perez added a comment -

          Yes class is created in the constructor:

           

              @DataBoundConstructor
              public Analytics(String ctsm_is_id, String project_id, String product_name, String version, String channel_id, String AWS_id){
                  this.project_id = project_id;
                  this.product_name = product_name;
                  this.version = version;
                  this.channel_id = channel_id;
                  this.AWS_id = AWS_id;
           
                  this.kinesisProducer = createKinessisProducer();
          

           

              }

          joanperez juan perez added a comment - Yes class is created in the constructor:       @DataBoundConstructor     public Analytics( String ctsm_is_id, String project_id, String product_name, String version, String channel_id, String AWS_id){         this .project_id = project_id;         this .product_name = product_name;         this .version = version;         this .channel_id = channel_id;         this .AWS_id = AWS_id;           this .kinesisProducer = createKinessisProducer();       }
          oleg_nenashev Oleg Nenashev added a comment -

          I would suggest creating it on-demand in methods. If you want to optimize performance, you can cache it in a static variable or transuent field (will require restart handling then)

          oleg_nenashev Oleg Nenashev added a comment - I would suggest creating it on-demand in methods. If you want to optimize performance, you can cache it in a static variable or transuent field (will require restart handling then)
          joanperez juan perez added a comment -

          You were right, removed the class creation from the constructor and gave me no error.

          joanperez juan perez added a comment - You were right, removed the class creation from the constructor and gave me no error.
          oleg_nenashev Oleg Nenashev added a comment -

          Thanks for the update

          oleg_nenashev Oleg Nenashev added a comment - Thanks for the update

          People

            oleg_nenashev Oleg Nenashev
            joanperez juan perez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: