Hi,

Thanks for your suggestion.
However, with:

permitted_enctypes = arcfour-hmac

It still ends up giving me a:

java.lang.IllegalArgumentException: Unknown algorithm name for the encryption 
type ARCFOUR_HMAC

I've checked your code and you set up the arcfour-hmac on the server side. In 
my case the kdc is already setup, and what I'm trying to do is to setup the 
client only. See below for the code snippet I use:

(note that my keytab file was ciphered with arcfour_hmac_md5)

        KrbConfig krbConfig = new KrbConfig();


        // add krb5.conf
        krbConfig.addKrb5Config(new File("krb5.conf"));

        Map<String, Object> config = new HashMap<>();
        config.put("kdc_tcp_port", "88");
        config.put("kdc_bind_address", KDC_ADDRESS);
        config.put("permitted_enctypes", "arcfour-hmac");

        // add map config
        krbConfig.addMapConfig(config);

        KrbClient client = new KrbClient(krbConfig);
        client.init();

        File keytab = new File(".keytab");
        Assert.assertTrue(keytab.exists());

        KOptions requestOptions = new KOptions();
        requestOptions.add(KrbOption.CLIENT_PRINCIPAL, CLIENT_PRINCIPAL);
        requestOptions.add(KrbOption.USE_KEYTAB, true);

        File keytab = new File(".keytab");
        Assert.assertTrue(keytab.exists());        
requestOptions.add(KrbOption.KEYTAB_FILE, keytab);


        TgtTicket tgt = client.requestTgt(requestOptions);

Kamil

Reply via email to