/** * @return name of configured instance * * @since 1.6.0 */ public String getInstanceName() { return impl.getInstanceName(); }
@Override public String getInstanceName() { return config.getInstanceName(); }
protected void configureForSsl(MiniAccumuloConfigImpl cfg, File folder) { Map<String,String> siteConfig = cfg.getSiteConfig(); if (TRUE.equals(siteConfig.get(Property.INSTANCE_RPC_SSL_ENABLED.getKey()))) { // already enabled; don't mess with it return; } File sslDir = new File(folder, "ssl"); assertTrue(sslDir.mkdirs() || sslDir.isDirectory()); File rootKeystoreFile = new File(sslDir, "root-" + cfg.getInstanceName() + ".jks"); File localKeystoreFile = new File(sslDir, "local-" + cfg.getInstanceName() + ".jks"); File publicTruststoreFile = new File(sslDir, "public-" + cfg.getInstanceName() + ".jks"); final String rootKeystorePassword = "root_keystore_password", truststorePassword = "truststore_password"; try { new CertUtils(Property.RPC_SSL_KEYSTORE_TYPE.getDefaultValue(), "o=Apache Accumulo,cn=MiniAccumuloCluster", "RSA", 2048, "sha1WithRSAEncryption") .createAll(rootKeystoreFile, localKeystoreFile, publicTruststoreFile, cfg.getInstanceName(), rootKeystorePassword, cfg.getRootPassword(), truststorePassword); } catch (Exception e) { throw new RuntimeException("error creating MAC keystore", e); } siteConfig.put(Property.INSTANCE_RPC_SSL_ENABLED.getKey(), "true"); siteConfig.put(Property.RPC_SSL_KEYSTORE_PATH.getKey(), localKeystoreFile.getAbsolutePath()); siteConfig.put(Property.RPC_SSL_KEYSTORE_PASSWORD.getKey(), cfg.getRootPassword()); siteConfig.put(Property.RPC_SSL_TRUSTSTORE_PATH.getKey(), publicTruststoreFile.getAbsolutePath()); siteConfig.put(Property.RPC_SSL_TRUSTSTORE_PASSWORD.getKey(), truststorePassword); cfg.setSiteConfig(siteConfig); }
assertTrue(sslDir.mkdir()); File rootKeystoreFile = new File(sslDir, "root-" + cfg.getInstanceName() + ".jks"); File localKeystoreFile = new File(sslDir, "local-" + cfg.getInstanceName() + ".jks"); File publicTruststoreFile = new File(sslDir, "public-" + cfg.getInstanceName() + ".jks"); final String rootKeystorePassword = "root_keystore_password", truststorePassword = "truststore_password"; "o=Apache Accumulo,cn=MiniAccumuloCluster", "RSA", 2048, "sha1WithRSAEncryption") .createAll(rootKeystoreFile, localKeystoreFile, publicTruststoreFile, cfg.getInstanceName(), rootKeystorePassword, cfg.getRootPassword(), truststorePassword); } catch (Exception e) {
args.add(config.getInstanceName()); args.add("--password"); args.add(config.getRootPassword()); + config.getInstanceName() + " and zookeeper(s) " + config.getZooKeepers());
args.add(config.getInstanceName()); args.add("--user"); args.add(config.getRootUserName()); log.info("Starting MAC against instance {} and zookeeper(s) {}.", config.getInstanceName(), config.getZooKeepers());
@Before public void setupShell() throws Exception { ts = new TestShell(getPrincipal(), getRootPassword(), getCluster().getConfig().getInstanceName(), getCluster().getConfig().getZooKeepers(), getCluster().getConfig().getClientConfFile()); }
ConfigurableMacBase.getSslDir(master1Dir)); master1Cfg.setProperty(Property.REPLICATION_NAME, master1Cfg.getInstanceName()); master1Cfg.setProperty(Property.TSERV_WALOG_MAX_SIZE, "5M"); master1Cfg.setProperty(Property.REPLICATION_THREADCHECK, "5m"); master2Cfg.setProperty(Property.REPLICATION_NAME, master2Cfg.getInstanceName()); master2Cfg.setProperty(Property.TSERV_WALOG_MAX_SIZE, "5M"); master2Cfg.setProperty(Property.REPLICATION_THREADCHECK, "5m");