Github user tgravescs commented on a diff in the pull request: https://github.com/apache/incubator-spark/pull/332#discussion_r9868173 --- Diff: core/src/main/java/org/apache/spark/SparkSaslServer.java --- @@ -0,0 +1,189 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.spark; + +import org.apache.commons.net.util.Base64; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.Map; +import java.util.TreeMap; + +import javax.security.auth.callback.Callback; +import javax.security.auth.callback.CallbackHandler; +import javax.security.auth.callback.NameCallback; +import javax.security.auth.callback.PasswordCallback; +import javax.security.auth.callback.UnsupportedCallbackException; +import javax.security.sasl.AuthorizeCallback; +import javax.security.sasl.RealmCallback; +import javax.security.sasl.Sasl; +import javax.security.sasl.SaslException; +import javax.security.sasl.SaslServer; +import java.io.IOException; + +/** + * Encapsulates SASL server logic for Server + */ +public class SparkSaslServer { + /** Logger */ + private static Logger LOG = LoggerFactory.getLogger("SparkSaslServer.class"); + + /** + * Actual SASL work done by this object from javax.security.sasl. + * Initialized below in constructor. + */ + private SaslServer saslServer; + + public static final String SASL_DEFAULT_REALM = "default"; --- End diff -- Yeah that code was specifically copied from Hadoop 0.23. I'll leave it for now and we can make it configurable in the next round of changes to add more configurability.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. To do so, please top-post your response. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---