Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-5830

ssl-enabled-components does not actually support "none"

    XMLWordPrintableJSON

Details

    Description

      ConfigurationProperties.ssl-enabled-components says in its docs that "none" is a valid setting, but actually that throws an error when the Cache is created. This could be made a valid option or the docs just corrected.

      Docs:

      /** <snip>
         * <U>Options</U>: "all","server","cluster","gateway","web","jmx","none" -- As described
         * {@link org.apache.geode.security.SecurableCommunicationChannels} <U>Since</U>: Geode 1.0
         */
        String SSL_ENABLED_COMPONENTS = "ssl-enabled-components";
      

      This test fails with the exception that follows it:

        @Test
        public void test() {
          final Properties properties = new Properties();
          properties.setProperty(ConfigurationProperties.SSL_ENABLED_COMPONENTS, "none");
          try (final Cache cache = new CacheFactory(properties).create()) {
          }
        }
      
      java.lang.IllegalArgumentException: org.apache.geode.GemFireConfigException: There is no registered component for the name: none
      
      	at org.apache.geode.internal.AbstractConfig.commaDelimitedStringToSecurableCommunicationChannels(AbstractConfig.java:403)
      	at org.apache.geode.internal.AbstractConfig.setAttribute(AbstractConfig.java:275)
      	at org.apache.geode.distributed.internal.DistributionConfigImpl.initialize(DistributionConfigImpl.java:1623)
      	at org.apache.geode.distributed.internal.DistributionConfigImpl.<init>(DistributionConfigImpl.java:984)
      	at org.apache.geode.distributed.internal.DistributionConfigImpl.<init>(DistributionConfigImpl.java:893)
      	at org.apache.geode.distributed.internal.InternalDistributedSystem.<init>(InternalDistributedSystem.java:530)
      	at org.apache.geode.distributed.internal.InternalDistributedSystem.newInstance(InternalDistributedSystem.java:354)
      	at org.apache.geode.distributed.internal.InternalDistributedSystem.newInstance(InternalDistributedSystem.java:343)
      	at org.apache.geode.distributed.internal.InternalDistributedSystem.newInstance(InternalDistributedSystem.java:335)
      	at org.apache.geode.distributed.DistributedSystem.connect(DistributedSystem.java:211)
      	at org.apache.geode.cache.CacheFactory.create(CacheFactory.java:219)
      	at org.apache.geode.distributed.ConfigurationPropertiesTest.test(ConfigurationPropertiesTest.java:18)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
      	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
      	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
      	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
      	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
      Caused by: org.apache.geode.GemFireConfigException: There is no registered component for the name: none
      	at org.apache.geode.internal.security.SecurableCommunicationChannel.getEnum(SecurableCommunicationChannel.java:43)
      	at org.apache.geode.internal.AbstractConfig.commaDelimitedStringToSecurableCommunicationChannels(AbstractConfig.java:401)
      	... 33 more
      
      
      Process finished with exit code 255
      

      Attachments

        Activity

          People

            jjramos Juan Ramos
            gosullivan Galen O'Sullivan
            Votes:
            0 Vote for this issue
            Watchers:
            3 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 - 2h 40m
                2h 40m