Package org.apache.zookeeper

Examples of org.apache.zookeeper.Login


                    LOG.debug("JAAS loginContext is: " + loginContext);
                }
                this.loginContext = loginContext;
                // note that the login object is static: it's shared amongst all zookeeper-related connections.
                // createSaslClient() must be declared synchronized so that login is initialized only once.
                login = new Login(loginContext, new ClientCallbackHandler(null));
                login.startThreadIfNeeded();
            }
            Subject subject = login.getSubject();
            SaslClient saslClient;
            // Use subject.getPrincipals().isEmpty() as an indication of which SASL mechanism to use:
View Full Code Here


        }

        // jaas.conf entry available
        try {
            saslServerCallbackHandler = new SaslServerCallbackHandler(Configuration.getConfiguration());
            login = new Login(serverSection, saslServerCallbackHandler);
            login.startThreadIfNeeded();
        } catch (LoginException e) {
            throw new IOException("Could not configure server because SASL configuration did not allow the "
              + " ZooKeeper server to authenticate itself properly: " + e);
        }
View Full Code Here

                if (LOG.isDebugEnabled()) {
                    LOG.debug("JAAS loginContext is: " + loginContext);
                }
                // note that the login object is static: it's shared amongst all zookeeper-related connections.
                // createSaslClient() must be declared synchronized so that login is initialized only once.
                login = new Login(loginContext, new ClientCallbackHandler(null));
                login.startThreadIfNeeded();
            }
            Subject subject = login.getSubject();
            SaslClient saslClient;
            // Use subject.getPrincipals().isEmpty() as an indication of which SASL mechanism to use:
View Full Code Here

                    LOG.debug("JAAS loginContext is: " + loginContext);
                }
                this.loginContext = loginContext;
                // note that the login object is static: it's shared amongst all zookeeper-related connections.
                // createSaslClient() must be declared synchronized so that login is initialized only once.
                login = new Login(loginContext, new ClientCallbackHandler(null));
                login.startThreadIfNeeded();
            }
            Subject subject = login.getSubject();
            SaslClient saslClient;
            // Use subject.getPrincipals().isEmpty() as an indication of which SASL mechanism to use:
View Full Code Here

    synchronized private SaslClient createSaslClient(final String servicePrincipal) throws LoginException {
        try {
            if (login == null) {
                // note that the login object is static: it's shared amongst all zookeeper-related connections.
                // createSaslClient() must be declared synchronized so that login is initialized only once.
                login = new Login("Client",new ClientCallbackHandler(null));
                login.startThreadIfNeeded();
            }
            Subject subject = login.getSubject();
            SaslClient saslClient;
            // Use subject.getPrincipals().isEmpty() as an indication of which SASL mechanism to use:
View Full Code Here

            throws IOException
    {
        if (System.getProperty("java.security.auth.login.config") != null) {
            try {
                saslServerCallbackHandler = new SaslServerCallbackHandler(Configuration.getConfiguration());
                login = new Login("Server",saslServerCallbackHandler);
                login.startThreadIfNeeded();
            }
            catch (LoginException e) {
                throw new IOException("Could not configure server because SASL configuration did not allow the "
                  + " Zookeeper server to authenticate itself properly: " + e);
View Full Code Here

    @Override
    public void configure(InetSocketAddress addr, int maxcc) throws IOException {
        if (System.getProperty("java.security.auth.login.config") != null) {
            try {
                saslServerCallbackHandler = new SaslServerCallbackHandler(Configuration.getConfiguration());
                login = new Login("Server",saslServerCallbackHandler);
                login.startThreadIfNeeded();
            }
            catch (LoginException e) {
                throw new IOException("Could not configure server because SASL configuration did not allow the "
                  + " Zookeeper server to authenticate itself properly: " + e);
View Full Code Here

        }

        // jaas.conf entry available
        try {
            saslServerCallbackHandler = new SaslServerCallbackHandler(Configuration.getConfiguration());
            login = new Login(serverSection, saslServerCallbackHandler);
            login.startThreadIfNeeded();
        } catch (LoginException e) {
            throw new IOException("Could not configure server because SASL configuration did not allow the "
              + " ZooKeeper server to authenticate itself properly: " + e);
        }
View Full Code Here

                if (LOG.isDebugEnabled()) {
                    LOG.debug("JAAS loginContext is: " + loginContext);
                }
                // note that the login object is static: it's shared amongst all zookeeper-related connections.
                // createSaslClient() must be declared synchronized so that login is initialized only once.
                login = new Login(loginContext, new ClientCallbackHandler(null));
                login.startThreadIfNeeded();
            }
            Subject subject = login.getSubject();
            SaslClient saslClient;
            // Use subject.getPrincipals().isEmpty() as an indication of which SASL mechanism to use:
View Full Code Here

                if (LOG.isDebugEnabled()) {
                    LOG.debug("JAAS loginContext is: " + loginContext);
                }
                // note that the login object is static: it's shared amongst all zookeeper-related connections.
                // createSaslClient() must be declared synchronized so that login is initialized only once.
                login = new Login(loginContext, new ClientCallbackHandler(null));
                login.startThreadIfNeeded();
            }
            Subject subject = login.getSubject();
            SaslClient saslClient;
            // Use subject.getPrincipals().isEmpty() as an indication of which SASL mechanism to use:
View Full Code Here

TOP

Related Classes of org.apache.zookeeper.Login

Copyright © 2018 www.massapicom. 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.