Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-15494

Support additional Jar url scheme

    XMLWordPrintableJSON

Details

    Description

      This code in ThreadAwareSecurityManager causes issues for embedded cassandra launched from a one-jar or uno-jar.

      
                      switch (codesource.getLocation().getProtocol())
                      {
                          case "file":
                              // All JARs and class files reside on the file system - we can safely
                              // assume that these classes are "good".
                              return true;
                      }
      
      

      Attaching patch to support protocol of 'jar' as well. AFAICT this won't introduce any added risk for UDF's discussed in CASSANDRA-9402 since a jar (or one/uno jar) must also be on the filesystem.

      New code would be (in 2 places):

      
                      switch (codesource.getLocation().getProtocol())
                      {
                          case "jar":
                          case "file":
                              // All JARs and class files reside on the file system - we can safely
                              // assume that these classes are "good".
                              return true;
                      }
      
      

      Attachments

        1. CASSANDRA-15494.patch
          2 kB
          Gus Heck
        2. CASSANDRA-15494.patch
          1 kB
          Gus Heck

        Issue Links

          Activity

            People

              gus Gus Heck
              gus Gus Heck
              Gus Heck
              Brandon Williams
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m