public SparkSaslServer( String secretKeyId, SecretKeyHolder secretKeyHolder, boolean alwaysEncrypt) { this.secretKeyId = secretKeyId; this.secretKeyHolder = secretKeyHolder; // Sasl.QOP is a comma-separated list of supported values. The value that allows encryption // is listed first since it's preferred over the non-encrypted one (if the client also // lists both in the request). String qop = alwaysEncrypt ? QOP_AUTH_CONF : String.format("%s,%s", QOP_AUTH_CONF, QOP_AUTH); Map<String, String> saslProps = ImmutableMap.<String, String>builder() .put(Sasl.SERVER_AUTH, "true") .put(Sasl.QOP, qop) .build(); try { this.saslServer = Sasl.createSaslServer(DIGEST, null, DEFAULT_REALM, saslProps, new DigestCallbackHandler()); } catch (SaslException e) { throw Throwables.propagate(e); } }
public SparkSaslServer( String secretKeyId, SecretKeyHolder secretKeyHolder, boolean alwaysEncrypt) { this.secretKeyId = secretKeyId; this.secretKeyHolder = secretKeyHolder; // Sasl.QOP is a comma-separated list of supported values. The value that allows encryption // is listed first since it's preferred over the non-encrypted one (if the client also // lists both in the request). String qop = alwaysEncrypt ? QOP_AUTH_CONF : String.format("%s,%s", QOP_AUTH_CONF, QOP_AUTH); Map<String, String> saslProps = ImmutableMap.<String, String>builder() .put(Sasl.SERVER_AUTH, "true") .put(Sasl.QOP, qop) .build(); try { this.saslServer = Sasl.createSaslServer(DIGEST, null, DEFAULT_REALM, saslProps, new DigestCallbackHandler()); } catch (SaslException e) { throw Throwables.propagate(e); } }
public SparkSaslServer( String secretKeyId, SecretKeyHolder secretKeyHolder, boolean alwaysEncrypt) { this.secretKeyId = secretKeyId; this.secretKeyHolder = secretKeyHolder; // Sasl.QOP is a comma-separated list of supported values. The value that allows encryption // is listed first since it's preferred over the non-encrypted one (if the client also // lists both in the request). String qop = alwaysEncrypt ? QOP_AUTH_CONF : String.format("%s,%s", QOP_AUTH_CONF, QOP_AUTH); Map<String, String> saslProps = ImmutableMap.<String, String>builder() .put(Sasl.SERVER_AUTH, "true") .put(Sasl.QOP, qop) .build(); try { this.saslServer = Sasl.createSaslServer(DIGEST, null, DEFAULT_REALM, saslProps, new DigestCallbackHandler()); } catch (SaslException e) { throw Throwables.propagate(e); } }
public SparkSaslServer( String secretKeyId, SecretKeyHolder secretKeyHolder, boolean alwaysEncrypt) { this.secretKeyId = secretKeyId; this.secretKeyHolder = secretKeyHolder; // Sasl.QOP is a comma-separated list of supported values. The value that allows encryption // is listed first since it's preferred over the non-encrypted one (if the client also // lists both in the request). String qop = alwaysEncrypt ? QOP_AUTH_CONF : String.format("%s,%s", QOP_AUTH_CONF, QOP_AUTH); Map<String, String> saslProps = ImmutableMap.<String, String>builder() .put(Sasl.SERVER_AUTH, "true") .put(Sasl.QOP, qop) .build(); try { this.saslServer = Sasl.createSaslServer(DIGEST, null, DEFAULT_REALM, saslProps, new DigestCallbackHandler()); } catch (SaslException e) { throw Throwables.propagate(e); } }