Examples of Krb5LoginConfiguration


Examples of org.apache.directory.server.kerberos.shared.jaas.Krb5LoginConfiguration

     */
    @Test
    public void testSaslGssapiBind()
    {
        // Use our custom configuration to avoid reliance on external config
        Configuration.setConfiguration( new Krb5LoginConfiguration() );
        // 1. Authenticate to Kerberos.
        LoginContext lc = null;
        try
        {
            lc = new LoginContext( SaslGssapiBindITest.class.getName(), new CallbackHandlerBean( "hnelson", "secret" ) );
View Full Code Here

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

        }
        if (entity != null)
            EntityUtils.consume(entity);

        // Use our custom configuration to avoid reliance on external config
        Configuration.setConfiguration(new Krb5LoginConfiguration());
        // 1. Authenticate to Kerberos.
        final LoginContext lc = new LoginContext(Utils.class.getName(), new UsernamePasswordHandler(user, pass));
        lc.login();

        // 2. Perform the work as authenticated Subject.
View Full Code Here

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

     * @throws IOException
     */
    private void start() throws LoginException, PrivilegedActionException, IOException {
        LOGGER.debug("Starting GSSTestServer - login");
        // Use our custom configuration to avoid reliance on external config
        Configuration.setConfiguration(new Krb5LoginConfiguration(null, null, true));
        // 1. Authenticate to Kerberos.
        final LoginContext lc = new LoginContext("foo", new UsernamePasswordHandler(GSSTestConstants.PRINCIPAL,
                GSSTestConstants.PASSWORD));
        lc.login();
        LOGGER.debug("Authentication succeed");
View Full Code Here

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

        LOGGER.info("Testing EJB3 access.");

        final Configuration tmpConfig = Configuration.getConfiguration();

        Configuration
                .setConfiguration(new Krb5LoginConfiguration("hnelson", Krb5ConfServerSetupTask.HNELSON_KEYTAB_FILE, false));
        Context ctx = getRemoteContext();
        SimpleSession session = (SimpleSession) ctx.lookup("ejb:/ejb-spnego//SimpleStatelessSessionBean!"
                + SimpleSession.class.getName());
        Principal principal = session.invokeRegularMethod();
        ctx.close();
        assertEquals("User's principal name doesn't match.", "hnelson@JBOSS.ORG", principal.getName());

        Configuration.setConfiguration(new Krb5LoginConfiguration("jduke", Krb5ConfServerSetupTask.JDUKE_KEYTAB_FILE, false));
        ctx = getRemoteContext();
        session = (SimpleSession) ctx.lookup("ejb:/ejb-spnego//SimpleStatelessSessionBean!" + SimpleSession.class.getName());
        principal = session.invokeAdministrativeMethod();
        ctx.close();
        assertEquals("User's principal name doesn't match.", "jduke@JBOSS.ORG", principal.getName());
View Full Code Here

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

     */
    public static String makeCallWithKerberosAuthn(final URI uri, final URI idpUri, final String user, final String pass)
            throws IOException, URISyntaxException, PrivilegedActionException, LoginException {

        // Use our custom configuration to avoid reliance on external config
        Configuration.setConfiguration(new Krb5LoginConfiguration());

        // 1. Authenticate to Kerberos.
        final LoginContext lc = new LoginContext(Utils.class.getName(), new UsernamePasswordHandler(user, pass));
        lc.login();

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.