[
https://issues.apache.org/jira/browse/HADOOP-8803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13455830#comment-13455830
]
Daryn Sharp commented on HADOOP-8803:
-------------------------------------
I've done a lot of token work, and have contemplated similar changes. I think
it's much more difficult than believed. I've only quickly skimmed the
discussion, so I apologize if I've missed some details or if I'm just repeating
some of what's already been said.
# When blocks can shift during rebalancing, the client will have to request
more tokens when the blocks move which will impact performance and complicate
the client.
# Trying to restrict the hdfs tokens to a path sounds good on the surface, but
is very tricky (if not impossible) to do w/o imposing a significant burden on
users and the framework.
# How does the ipc layer know which path token to use to establish the
connection? I suppose it could randomly pick one for the given NN, and then
every fs method will have to be modified to send the specific token for the
path it's going to access.
# Hftp/webhdfs both implicitly acquire a token during initialization. At this
point it's not possible to know which paths will be later accessed.
# Symlinks, esp. via viewfs, pose interesting problems. Viewfs currently
acquires tokens for all mounts because it doesn't "know" which mounts might be
indirectly referenced via a symlink. Trying to discern up and resolve all
symlinks up front will be difficult.
# In general, it's not really feasible for the job submission client to know
every path that will be accessed.
#* Jobs that submit jobs can't know all paths that will be accessed, esp. if
the sub-job's paths are based on runtime logic of another job.
#* Should job submission be oozie, hive, pig, etc aware?
#* For instance, the oozie launcher is agnostic to the job launched in its
task, so the user has to declare the NNs in the workflow conf if accessing
anything other than the default NN. This is different than actual job
submission that generally "knows" the files/dirs that need to be accessed. In
practice, the user usually doesn't declare full paths in the conf setting for
additional NNs.
#* Yarn and other parts of MR rely on the user's tokens to access files too.
Should MR need to be yarn aware?
#* The job client won't know about the behavior of downstream pluggable items
like shuffle handlers.
#* The job client won't know about dynamic runtime behaviors of a job.
All that said, maybe block tokens can be improved, but I don't see how path
based tokens are feasible.
* If the token path is per-file, it would be a slew of tokens per job, and for
the aforementioned reasons I just don't see how the job client can possibly
calculate all the paths up-front.
* If the token path is a non-recursive directory it has similar problems to the
per-file path approach. Also, it won't allow a recursive listing of a
directory, and jobs won't be able to access sub-directories created on the fly.
* If the token path is for recursive directory access, well, you know what
everyone will do: request a token for "/" negating any value of the path-based
token.
> Make Hadoop running more secure public cloud envrionment
> --------------------------------------------------------
>
> Key: HADOOP-8803
> URL: https://issues.apache.org/jira/browse/HADOOP-8803
> Project: Hadoop Common
> Issue Type: New Feature
> Components: fs, ipc, security
> Affects Versions: 0.20.204.0
> Reporter: Xianqing Yu
> Labels: hadoop
> Original Estimate: 2m
> Remaining Estimate: 2m
>
> I am a Ph.D student in North Carolina State University. I am modifying the
> Hadoop's code (which including most parts of Hadoop, e.g. JobTracker,
> TaskTracker, NameNode, DataNode) to achieve better security.
>
> My major goal is that make Hadoop running more secure in the Cloud
> environment, especially for public Cloud environment. In order to achieve
> that, I redesign the currently security mechanism and achieve following
> proprieties:
> 1. Bring byte-level access control to Hadoop HDFS. Based on 0.20.204, HDFS
> access control is based on user or block granularity, e.g. HDFS Delegation
> Token only check if the file can be accessed by certain user or not, Block
> Token only proof which block or blocks can be accessed. I make Hadoop can do
> byte-granularity access control, each access party, user or task process can
> only access the bytes she or he least needed.
> 2. I assume that in the public Cloud environment, only Namenode, secondary
> Namenode, JobTracker can be trusted. A large number of Datanode and
> TaskTracker may be compromised due to some of them may be running under less
> secure environment. So I re-design the secure mechanism to make the damage
> the hacker can do to be minimized.
>
> a. Re-design the Block Access Token to solve wildly shared-key problem of
> HDFS. In original Block Access Token design, all HDFS (Namenode and Datanode)
> share one master key to generate Block Access Token, if one DataNode is
> compromised by hacker, the hacker can get the key and generate any Block
> Access Token he or she want.
>
> b. Re-design the HDFS Delegation Token to do fine-grain access control for
> TaskTracker and Map-Reduce Task process on HDFS.
>
> In the Hadoop 0.20.204, all TaskTrackers can use their kerberos credentials
> to access any files for MapReduce on HDFS. So they have the same privilege as
> JobTracker to do read or write tokens, copy job file, etc.. However, if one
> of them is compromised, every critical thing in MapReduce directory (job
> file, Delegation Token) is exposed to attacker. I solve the problem by making
> JobTracker to decide which TaskTracker can access which file in MapReduce
> Directory on HDFS.
>
> For Task process, once it get HDFS Delegation Token, it can access everything
> belong to this job or user on HDFS. By my design, it can only access the
> bytes it needed from HDFS.
>
> There are some other improvement in the security, such as TaskTracker can not
> know some information like blockID from the Block Token (because it is
> encrypted by my way), and HDFS can set up secure channel to send data as a
> option.
>
> By those features, Hadoop can run much securely under uncertain environment
> such as Public Cloud. I already start to test my prototype. I want to know
> that whether community is interesting about my work? Is that a value work to
> contribute to production Hadoop?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira