Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-14196

YAML: serialization allow-list configuration doesn't work

XMLWordPrintable

      We use YAML Infinispan configuration, partial example shown below.

      When we tried to get the replication to work (which requires serialization/deserialization of cached objects) we found out that the serialization allow-list configuration (included in the example below) doesn't have any effect.

      It works in the XML format, but in YAML it appears (based on our debugging) that all the allow-list elements regex and class are parsed as if they were attributes instead - written in the XML form the actual result is as if it was (incorrectly)

      <allow-list class="classValue" regex="regexValue">
      </allow-list>

      instead of (correctly)

      <allow-list>
        <class>classValue</class>
        <regex>regexValue</regex>
      </allow-list>

      It appears that the YAML configuration isn't tested much. We prefer it to avoid certain XML parser issues, but here we can't use it as we'd like to. For now we use the JVM system property infinispan.deserialization.allowlist.regexps to work around this, but it's only a workaround.

      Config example:

      infinispan: 
      
        jgroups: 
          stack: 
            name: "gxe-udp"
            extends: "udp"
            UDP: 
              mcast_addr: "228.6.7.1"
              mcast_port: "46651"
              ip_ttl: "1"
              stack.combine: "REPLACE"
      
        cache-container: 
          name: "gxe"
          statistics: "true"
      
          transport: 
            cluster: "GXE"
            stack: "gxe-udp"
      
          serialization: 
            marshaller: "org.infinispan.commons.marshall.JavaSerializationMarshaller"
            allow-list: 
              regex: ".*"
      
          replicated-cache: 
            name: "rw-systemParameters"
            statistics: "true"
            mode: "ASYNC"
            memory: 
              max-count: "1000"
            expiration: 
              lifespan: "300000"
            encoding: 
              key: 
                media-type: "application/x-java-object"
              value: 
                media-type: "application/x-java-object"
      

              ttarrant@redhat.com Tristan Tarrant
              petr.hostalek@bsc-ideas.com Petr Hostalek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: