Exemple #1
0
        //@Test
        public virtual void ClientAndServersWithoutPoliciesFail()
        {
            // given
            SecurePipelineWrapperFactory pipelineWrapperFactory = CreateSecurePipelineWrapperFactory();

            SslPolicyConfig policyConfig = new SslPolicyConfig("default");
            Config          config       = Config.defaults();

            // Setup SslPolicy
            config.augment(neo4j_home.name(), _home.AbsolutePath);
            config.Augment(policyConfig.BaseDirectory.name(), "certificates/default");

            // and
            LogProvider  logProvider  = NullLogProvider.Instance;
            Dependencies dependencies = null;

            // when
            // expectedException.expect( java.lang.NullPointerException.class );
            pipelineWrapperFactory.ForServer(config, dependencies, logProvider, CausalClusteringSettings.ssl_policy);
            pipelineWrapperFactory.ForClient(config, dependencies, logProvider, CausalClusteringSettings.ssl_policy);
            pipelineWrapperFactory.ForServer(config, dependencies, logProvider, OnlineBackupSettings.ssl_policy);
            pipelineWrapperFactory.ForClient(config, dependencies, logProvider, OnlineBackupSettings.ssl_policy);
        }
Exemple #2
0
        //@Test
        public virtual void ServerSslEncryptionPoliciesThrowException()
        {
            // given
            SecurePipelineWrapperFactory pipelineWrapperFactory = CreateSecurePipelineWrapperFactory();

            // and
            Config config = Config.defaults();

            config.Augment(OnlineBackupSettings.ssl_policy, "backup");

            // and
            LogProvider  logProvider  = NullLogProvider.Instance;
            Dependencies dependencies = null;

            // then
            ExpectedException.expectMessage("Unexpected SSL policy dbms.backup.ssl_policy is a string");

            // when
            pipelineWrapperFactory.ForServer(config, dependencies, logProvider, OnlineBackupSettings.ssl_policy);
        }