/** * Resolve Hadoop configuration file. * * @param name File name. * @return Resolve file. */ private static File resolveHadoopConfig(String name) { File path = U.resolveIgnitePath("modules/hadoop/config/" + name); return path != null ? path : U.resolveIgnitePath("config/hadoop/" + name); }
/** * @param path Path to resolve only relative to IGNITE_HOME. * @return Resolved path as file, or {@code null} if path cannot be resolved. * @throws IOException If failed to resolve path. */ public static File resolveIgnitePath(String path) throws IOException { File folder = U.resolveIgnitePath(path); if (folder == null) return null; if (!folder.toPath().toRealPath(LinkOption.NOFOLLOW_LINKS).startsWith(Paths.get(U.getIgniteHome()))) return null; return folder; }
/** * @throws Exception If failed. */ @Test public void testBothListIncluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_included.txt").getPath(); System.setProperty(IGNITE_MARSHALLER_WHITELIST, path); System.setProperty(IGNITE_MARSHALLER_BLACKLIST, path); testExploit(false); }
/** * @throws Exception If failed. */ @Test public void testBothListIncluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_included.txt").getPath(); System.setProperty(IGNITE_MARSHALLER_WHITELIST, path); System.setProperty(IGNITE_MARSHALLER_BLACKLIST, path); testExploit(false); }
/** * @throws Exception If failed. */ @Test public void testWhiteListIncluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_included.txt").getPath(); System.setProperty(IGNITE_MARSHALLER_WHITELIST, path); testExploit(true); }
/** * @throws Exception If failed. */ @Test public void testWhiteListIncluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_included.txt").getPath(); System.setProperty(IGNITE_MARSHALLER_WHITELIST, path); testExploit(true); }
/** * @throws Exception If failed. */ @Test public void testBothListIncluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_included.txt").getPath(); System.setProperty(IGNITE_MARSHALLER_WHITELIST, path); System.setProperty(IGNITE_MARSHALLER_BLACKLIST, path); testExploit(false); }
/** * @throws Exception If failed. */ @Test public void testBlackListIncluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_included.txt").getPath(); System.setProperty(IGNITE_MARSHALLER_BLACKLIST, path); testExploit(false); }
/** * @throws Exception If failed. */ @Test public void testBlackListExcluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_excluded.txt").getPath(); System.setProperty(IGNITE_MARSHALLER_BLACKLIST, path); testExploit(true); }
/** * Starts up two nodes with specified cache configuration on pre-defined endpoints. * * @param args Command line arguments, none required. * @throws IgniteCheckedException In case of any exception. */ public static void main(String[] args) throws IgniteCheckedException { System.setProperty("CLIENTS_MODULE_PATH", U.resolveIgnitePath("modules/clients").getAbsolutePath()); try (Ignite g = G.start("modules/clients/src/test/resources/spring-server-ssl-node.xml")) { U.sleep(Long.MAX_VALUE); } } }
/** * @throws Exception If failed. */ @Test public void testWhiteListExcluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_excluded.txt").getPath(); System.setProperty(IGNITE_MARSHALLER_WHITELIST, path); testExploit(false); }
/** * @throws Exception If failed. */ @Test public void testBlackListExcluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_excluded.txt").getPath(); System.setProperty(IGNITE_MARSHALLER_BLACKLIST, path); testExploit(true); }
/** * @throws Exception If failed. */ @Test public void testBlackListExcluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_excluded.txt").getPath(); System.setProperty(IGNITE_MARSHALLER_BLACKLIST, path); testExploit(true); }
/** * @throws Exception If failed. */ @Test public void testWhiteListIncluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_included.txt").getPath(); System.setProperty(IGNITE_MARSHALLER_WHITELIST, path); testExploit(true); }
/** * @throws Exception If failed. */ @Test public void testWhiteListExcluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_excluded.txt").getPath(); System.setProperty(IGNITE_MARSHALLER_WHITELIST, path); testExploit(false); }
/** * @throws Exception If failed. */ @Test public void testBlackListIncluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_included.txt").getPath(); System.setProperty(IGNITE_MARSHALLER_BLACKLIST, path); testExploit(false); }
/** * @throws Exception If failed. */ @Test public void testWhiteListExcluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_excluded.txt").getPath(); System.setProperty(IGNITE_MARSHALLER_WHITELIST, path); testExploit(false); }
/** * @throws Exception If failed. */ @Test public void testBlackListIncluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_included.txt").getPath(); System.setProperty(IGNITE_MARSHALLER_BLACKLIST, path); testExploit(false); }
/** * Creates test-purposed SSL context factory from test key store with disabled trust manager. * * @return SSL context factory used in test. */ public static Factory<SSLContext> sslFactory() { SslContextFactory factory = new SslContextFactory(); factory.setKeyStoreFilePath( U.resolveIgnitePath(GridTestProperties.getProperty("ssl.keystore.path")).getAbsolutePath()); factory.setKeyStorePassword(keyStorePassword().toCharArray()); factory.setTrustManagers(SslContextFactory.getDisabledTrustManager()); return factory; }
/** * Creates test-purposed SSL context factory from test key store with disabled trust manager. * * @return SSL context factory used in test. */ public static GridSslContextFactory sslContextFactory() { GridSslBasicContextFactory factory = new GridSslBasicContextFactory(); factory.setKeyStoreFilePath( U.resolveIgnitePath(GridTestProperties.getProperty("ssl.keystore.path")).getAbsolutePath()); factory.setKeyStorePassword(keyStorePassword().toCharArray()); factory.setTrustManagers(GridSslBasicContextFactory.getDisabledTrustManager()); return factory; }