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");
// 2. Perform the work as authenticated Subject.
final String finishMsg = Subject.doAs(lc.getSubject(), new ServerAction());