use of org.apache.ignite.spi.encryption.keystore.KeystoreEncryptionSpi in project ignite by apache.
the class AbstractEncryptionTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String name) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(name);
cfg.setConsistentId(name);
KeystoreEncryptionSpi encSpi = new KeystoreEncryptionSpi();
encSpi.setKeyStorePath(keystorePath());
encSpi.setKeyStorePassword(keystorePassword());
cfg.setEncryptionSpi(encSpi);
DataStorageConfiguration memCfg = new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(10L * 1024 * 1024).setPersistenceEnabled(true)).setPageSize(4 * 1024).setWalMode(FSYNC);
cfg.setDataStorageConfiguration(memCfg);
return cfg;
}
use of org.apache.ignite.spi.encryption.keystore.KeystoreEncryptionSpi in project ignite by apache.
the class KeystoreEncryptionSpiSelfTest method testCantStartKeystoreDoesntExists.
/**
* @throws Exception If failed.
*/
@Test
public void testCantStartKeystoreDoesntExists() throws Exception {
GridTestUtils.assertThrowsWithCause(() -> {
KeystoreEncryptionSpi encSpi = new KeystoreEncryptionSpi();
encSpi.setKeyStorePath("/ignite/is/cool/path/doesnt/exists");
encSpi.setKeyStorePassword(KEYSTORE_PASSWORD.toCharArray());
encSpi.spiStart("default");
}, IgniteException.class);
}
use of org.apache.ignite.spi.encryption.keystore.KeystoreEncryptionSpi in project ignite by apache.
the class KeystoreEncryptionSpiSelfTest method testCantStartWithoutPassword.
/**
* @throws Exception If failed.
*/
@Test
public void testCantStartWithoutPassword() throws Exception {
GridTestUtils.assertThrowsWithCause(() -> {
KeystoreEncryptionSpi encSpi = new KeystoreEncryptionSpi();
encSpi.setKeyStorePath("/ignite/is/cool/path/doesnt/exists");
encSpi.spiStart("default");
}, IgniteException.class);
}
use of org.apache.ignite.spi.encryption.keystore.KeystoreEncryptionSpi in project ignite by apache.
the class KeystoreEncryptionSpiSelfTest method testCantStartWithEmptyParam.
/**
* @throws Exception If failed.
*/
@Test
public void testCantStartWithEmptyParam() throws Exception {
GridTestUtils.assertThrowsWithCause(() -> {
EncryptionSpi encSpi = new KeystoreEncryptionSpi();
encSpi.spiStart("default");
}, IgniteException.class);
}
Aggregations