Examples of VaultHandler


Examples of com.onarandombox.MultiverseCore.utils.VaultHandler

    public void onEnable() {
        getServer().getPluginManager().registerEvents(new MVWorldInitListener(this), this);

        this.messaging = new MVMessaging();
        this.banker = new AllPay(this, LOG_TAG + " ");
        this.vaultHandler = new VaultHandler(this);
        // Load the defaultWorldGenerators
        this.worldManager.getDefaultWorldGenerators();

        this.registerEvents();
        // Setup Permissions, we'll do an initial check for the Permissions plugin then fall back on isOP().
View Full Code Here

Examples of org.jboss.as.test.integration.security.common.VaultHandler

        public void setup(ManagementClient managementClient, String containerId) throws Exception {

            VaultHandler.cleanFilesystem(VAULT_LOCATION, true);

            // create new vault
            vaultHandler = new VaultHandler(VAULT_LOCATION);
            // store the destination lookup into the vault
            String vaultedUserName = vaultHandler.addSecuredAttribute("messaging", "userName", "guest".toCharArray());
            System.out.println("vaultedUserName = " + vaultedUserName);
            String vaultedPassword = vaultHandler.addSecuredAttribute("messaging", "password", "guest".toCharArray());
            System.out.println("vaultedPassword = " + vaultedPassword);
View Full Code Here

Examples of org.jboss.as.test.integration.security.common.VaultHandler

            VaultHandler.cleanFilesystem(RESOURCE_LOCATION, true);

            ModelNode op;

            // create new vault
            vaultHandler = new VaultHandler(RESOURCE_LOCATION);

            // create security attributes
            String vaultBlock = "ds_ExampleDS";
            String attributeName = "password";
            String vaultPasswordString = vaultHandler.addSecuredAttribute(vaultBlock, attributeName,
View Full Code Here

Examples of org.jboss.as.test.integration.security.common.VaultHandler

    private void slaveWithVaultPasswordTest() throws Exception {

        VaultHandler.cleanFilesystem(RESOURCE_LOCATION, true);

        // create new vault
        VaultHandler vaultHandler = new VaultHandler(RESOURCE_LOCATION);

        try {

            // create security attributes
            String attributeName = "value";
            String vaultPasswordString = vaultHandler.addSecuredAttribute(VAULT_BLOCK, attributeName,
                    RIGHT_PASSWORD.toCharArray());

            // create new vault setting in host
            ModelNode op = new ModelNode();
            op.get(OP).set(ADD);
            op.get(OP_ADDR).add(HOST, "slave").add(CORE_SERVICE, VAULT);
            ModelNode vaultOption = op.get(VAULT_OPTIONS);
            vaultOption.get("KEYSTORE_URL").set(vaultHandler.getKeyStore());
            vaultOption.get("KEYSTORE_PASSWORD").set(vaultHandler.getMaskedKeyStorePassword());
            vaultOption.get("KEYSTORE_ALIAS").set(vaultHandler.getAlias());
            vaultOption.get("SALT").set(vaultHandler.getSalt());
            vaultOption.get("ITERATION_COUNT").set(vaultHandler.getIterationCountAsString());
            vaultOption.get("ENC_FILE_DIR").set(vaultHandler.getEncodedVaultFileDirectory());
            domainSlaveClient.execute(new OperationBuilder(op).build());

            setSlaveSecret("${" + vaultPasswordString + "}");

            reloadSlave();

            // Validate that it joined the master
            readHostControllerStatus(domainMasterClient, 0);
        } finally {
            // remove temporary files
            vaultHandler.cleanUp();
        }
    }
View Full Code Here

Examples of org.jboss.as.test.integration.security.common.VaultHandler

            VaultHandler.cleanFilesystem(RESOURCE_LOCATION, true);

            ModelNode op;

            // create new vault
            vaultHandler = new VaultHandler(RESOURCE_LOCATION);

            // create security attributes
            String vaultBlock = "ds_ExampleDS";
            String attributeName = "password";
            String vaultPasswordString = vaultHandler.addSecuredAttribute(vaultBlock, attributeName,
View Full Code Here

Examples of org.jboss.as.test.integration.security.common.VaultHandler

            connection = DriverManager.getConnection("jdbc:h2:mem:masked;DB_CLOSE_DELAY=-1", "sa", DS_CLEAR_TEXT_PASSWORD);
            executeUpdate(connection, "CREATE TABLE FooBars(ID Varchar(50), Password Varchar(50))");
            executeUpdate(connection, "INSERT INTO FooBars VALUES ('foo','foo'),('bar','bar')");

            // create new vault
            vaultHandler = new VaultHandler(RESOURCE_LOCATION);

            // create security attributes
            String attributeName = "password";
            String vaultPasswordString = vaultHandler.addSecuredAttribute(VAULT_BLOCK, attributeName,
                    DS_CLEAR_TEXT_PASSWORD.toCharArray());
View Full Code Here

Examples of org.jboss.as.test.integration.security.common.VaultHandler

           // setup DB
           server = Server.createTcpServer("-tcpAllowOthers").start();

           // create new vault
           vaultHandler = new VaultHandler(RESOURCE_LOCATION);

           // create security attributes
           String attributeName = "password";
           String vaultPasswordString = vaultHandler.addSecuredAttribute(VAULT_BLOCK, attributeName,
                   DS_CLEAR_TEXT_PASSWORD.toCharArray());
View Full Code Here

Examples of org.jboss.as.test.integration.security.common.VaultHandler

        public void setup(ManagementClient managementClient, String containerId) throws Exception {

            VaultHandler.cleanFilesystem(VAULT_LOCATION, true);

            // create new vault
            vaultHandler = new VaultHandler(VAULT_LOCATION);
            // store the destination lookup into the vault
            String vaultedProperty = vaultHandler.addSecuredAttribute("messaging", "destination", CLEAR_TEXT_DESTINATION_LOOKUP.toCharArray());
            System.out.println("vaultedProperty = " + vaultedProperty);

            addVaultConfiguration(managementClient);
View Full Code Here

Examples of org.jboss.as.test.integration.security.common.VaultHandler

            connection = DriverManager.getConnection("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1", "sa", RIGHT_PASSWORD);
            executeUpdate(connection, "CREATE TABLE TestPeople(Name Varchar(50), Surname Varchar(50))");
            executeUpdate(connection, "INSERT INTO TestPeople VALUES ('John','Smith')");

            // create new vault
            vaultHandler = new VaultHandler(RESOURCE_LOCATION);

            // create security attributes
            String attributeName = "password";
            String vaultPasswordString = vaultHandler.addSecuredAttribute(VAULT_BLOCK, attributeName,
                    RIGHT_PASSWORD.toCharArray());
View Full Code Here

Examples of org.jboss.as.test.integration.security.common.VaultHandler

        public void setup(ManagementClient managementClient, String containerId) throws Exception {

            VaultHandler.cleanFilesystem(VAULT_LOCATION, true);

            // create new vault
            vaultHandler = new VaultHandler(VAULT_LOCATION);
            // store the destination lookup into the vault
            String vaultedUserName = vaultHandler.addSecuredAttribute("messaging", "userName", "guest".toCharArray());
            System.out.println("vaultedUserName = " + vaultedUserName);
            String vaultedPassword = vaultHandler.addSecuredAttribute("messaging", "password", "guest".toCharArray());
            System.out.println("vaultedPassword = " + vaultedPassword);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.