1 00:00:00,000 --> 00:00:04,340 All right, I'm Jason Schlesinger, and I'm an undergraduate at Arizona State University 2 00:00:05,120 --> 00:00:08,760 in computational mathematics, and here's my presentation. 3 00:00:09,300 --> 00:00:10,520 This is what we're going to cover today. 4 00:00:10,900 --> 00:00:15,760 We're going to cover what cloud computing is in the context of this presentation, because 5 00:00:15,760 --> 00:00:16,380 it's kind of vague. 6 00:00:17,120 --> 00:00:21,620 And then I'm going to introduce and describe what MapReduce is, so hopefully most of you 7 00:00:21,620 --> 00:00:23,480 should already, that should be a review. 8 00:00:23,760 --> 00:00:28,080 I'm going to introduce what Hadoop is, and then we're going to introduce security issues 9 00:00:28,080 --> 00:00:28,620 with Hadoop. 10 00:00:28,620 --> 00:00:33,680 With Hadoop, we're going to discuss some solutions and workarounds, and then we're 11 00:00:33,680 --> 00:00:35,860 just going to have some final thoughts on the whole situation in general. 12 00:00:36,620 --> 00:00:41,060 My main goals of this presentation is really to raise awareness of Hadoop and its potential, 13 00:00:41,560 --> 00:00:47,820 and then raise awareness of the security issues with it, and then hopefully inspire current 14 00:00:47,820 --> 00:00:51,220 and future users and administrators of Hadoop to be aware of these kind of issues. 15 00:00:52,320 --> 00:00:56,860 Now, what cloud computing is, is it's distributed across multiple machines that are linked together. 16 00:00:57,680 --> 00:00:58,600 It's fun. 17 00:00:58,600 --> 00:01:03,300 It's fault-tolerant to hardware failure, so if a hard drive or power supply fails, then 18 00:01:03,300 --> 00:01:04,780 the whole system keeps working. 19 00:01:05,260 --> 00:01:09,200 And the applications are abstracted somewhat from the operating system, and it's often 20 00:01:09,200 --> 00:01:13,700 used to offload tasks from user systems that would be difficult to maintain or run. 21 00:01:14,740 --> 00:01:18,380 Considering all this, Hadoop is an incarnation of MapReduce in a cloud environment. 22 00:01:19,440 --> 00:01:24,620 Now, what MapReduce is, is it's good for huge data sets that need to be indexed, categorized, 23 00:01:24,700 --> 00:01:26,200 sorted, culled, analyzed, so forth. 24 00:01:27,100 --> 00:01:32,800 It allows data to be distributed across a large cluster, and then the jobs are distributed 25 00:01:32,800 --> 00:01:35,340 out to the data, and they can work independently and in parallel. 26 00:01:36,040 --> 00:01:41,940 Google implemented MapReduce back in 2004, and then Apache created an open-source version 27 00:01:41,940 --> 00:01:42,160 of that. 28 00:01:45,720 --> 00:01:54,680 Now, an example of the speed-up of MapReduce in my MS Paint-tastic diagram here is if your 29 00:01:54,680 --> 00:01:55,240 data's laundry. 30 00:01:55,240 --> 00:02:00,480 Then, you're doing laundry in a serial environment, then you can only run one load at a time. 31 00:02:01,080 --> 00:02:05,140 And then when the load is done, then you need to break up your laundry based on material 32 00:02:05,480 --> 00:02:09,260 so that your dryer dries everything, because if you put in a pair of panties and a bunch 33 00:02:09,260 --> 00:02:11,680 of towels, then the panties are going to be burnt and the towels will still be wet. 34 00:02:13,720 --> 00:02:17,140 Now, even if you get creative with this, it can take up to two hours to do your laundry, 35 00:02:17,240 --> 00:02:18,780 and if not, then it's going to take three. 36 00:02:19,740 --> 00:02:24,780 MapReduce is like going to a laundromat, and you distribute out all your work across a 37 00:02:24,780 --> 00:02:25,220 bunch of washrooms. 38 00:02:25,240 --> 00:02:29,840 And then, that's going to take as long as the longest wash load. 39 00:02:30,200 --> 00:02:36,720 Then you have to break your data back up into the different types of materials, and then 40 00:02:37,240 --> 00:02:39,900 those go out to the dryers, which are analogous to reducers. 41 00:02:40,200 --> 00:02:44,760 Now, this is just an example of how the speed-up works, but as you can see, it definitely gives 42 00:02:44,760 --> 00:02:45,260 you a speed-up. 43 00:02:46,260 --> 00:02:51,860 Now, a real-world example of how you could use MapReduce, not really efficient, but 44 00:02:53,060 --> 00:02:54,380 let's say you need to do a word count. 45 00:02:54,380 --> 00:02:55,520 A lot of text files. 46 00:02:55,840 --> 00:03:01,820 Then what you could do is you then break up your text files to your mappers, and the 47 00:03:01,820 --> 00:03:07,780 mappers will count the number of words and the number of times each word appears in only 48 00:03:07,780 --> 00:03:08,500 one text file. 49 00:03:09,400 --> 00:03:15,660 Then they'll output sort of word-number pairs, and those will get grouped together based 50 00:03:15,660 --> 00:03:16,580 on the word as the key. 51 00:03:16,760 --> 00:03:22,460 And then similarly keyed pairs will get sent to reducers, and the reducers will then add 52 00:03:22,460 --> 00:03:23,920 up each of those numbers. 53 00:03:26,360 --> 00:03:31,700 Some other potential uses of MapReduce, and perhaps more realistic, are indexing large 54 00:03:31,700 --> 00:03:38,560 data sets, image recognition, also processing geographic information systems data, such 55 00:03:38,560 --> 00:03:40,160 as combining vector data with point data. 56 00:03:40,920 --> 00:03:45,740 It's good for analyzing unstructured data, or even stock data, or even using it for 57 00:03:45,740 --> 00:03:46,500 machine learning tasks. 58 00:03:47,820 --> 00:03:52,280 Pretty much any situation where the data is just incredibly cumbersome. 59 00:03:54,000 --> 00:03:56,480 Now, a little bit of a walkthrough of the terms that I've been using. 60 00:03:57,500 --> 00:04:02,520 There's map, which is a functional programming term, which means to use a function on each 61 00:04:02,520 --> 00:04:03,200 element in an array. 62 00:04:04,100 --> 00:04:09,060 The mapper performs a function on one element of the data set. 63 00:04:09,260 --> 00:04:15,160 So in this graphic here, which looks like it's kind of hard to see, the data gets split 64 00:04:15,160 --> 00:04:18,580 up, and those workers on the left are the mappers. 65 00:04:19,780 --> 00:04:23,640 Then reduce, or fold, is a functional programming term. 66 00:04:23,920 --> 00:04:28,440 Which means to iterate across the data using the results of the last element as the input of 67 00:04:28,440 --> 00:04:28,880 the next function. 68 00:04:30,180 --> 00:04:34,740 And like in our word count example, there was word five, word one, and word two. 69 00:04:35,620 --> 00:04:39,580 What it would do is it would add five and one, and then get six, and then add six and two, 70 00:04:39,680 --> 00:04:40,120 and get eight. 71 00:04:41,640 --> 00:04:47,260 And then the reducer, which are the workers on the right here, will reduce across the results 72 00:04:47,260 --> 00:04:48,560 of the mappers. 73 00:04:50,700 --> 00:04:52,280 Now a brief overview of what Hadoop is. 74 00:04:52,520 --> 00:04:53,460 It's a cloud platform. 75 00:04:53,920 --> 00:04:57,020 It's a framework that allows programmers to distribute data for MapReduce jobs. 76 00:04:57,760 --> 00:05:05,700 So you would use the Hadoop API to write programs in Java to then run on Hadoop cluster to process 77 00:05:05,700 --> 00:05:06,040 your data. 78 00:05:07,100 --> 00:05:10,360 As I said before, it was developed by Apache based on Google's paper. 79 00:05:11,480 --> 00:05:13,760 It runs on Java, like I also said before. 80 00:05:14,820 --> 00:05:20,000 It allows businesses to process large amounts of data quickly by distributing the work. 81 00:05:20,300 --> 00:05:23,460 And it's one of the leaders in the open source implementations of MapReduce. 82 00:05:23,920 --> 00:05:26,540 There are other implementations, but they're just one of the biggest. 83 00:05:26,860 --> 00:05:30,980 And it's very good for large data sets and on large clusters. 84 00:05:31,480 --> 00:05:35,440 With that, it's also bad with small data sets and on small clusters. 85 00:05:36,660 --> 00:05:38,760 It's also growing as a business tool. 86 00:05:39,100 --> 00:05:43,780 And as a business tool, some large content distribution companies, such as Yahoo, uses 87 00:05:43,780 --> 00:05:45,340 it for many of their tasks. 88 00:05:45,680 --> 00:05:50,440 They've got over 25,000 computers running Hadoop, and they use it so much, they recently 89 00:05:50,440 --> 00:05:52,580 released their own version of Hadoop with their own modifications. 90 00:05:53,660 --> 00:05:58,840 A9, which is Amazon's search engine, uses it to index their user-generated content as 91 00:05:58,840 --> 00:06:00,720 well as their product data and make that searchable. 92 00:06:01,200 --> 00:06:03,000 The New York Times is a really cool case. 93 00:06:03,460 --> 00:06:08,760 What they did is they took their public domain articles and they sent them to Amazon Web 94 00:06:08,760 --> 00:06:10,900 Services, which is really cool if you haven't already checked it out. 95 00:06:11,260 --> 00:06:16,400 And then they made a virtual Hadoop cluster on Amazon Web Services using their Elastic 96 00:06:16,400 --> 00:06:21,540 Cloud computing structure and processed the data and then got back the result, and then 97 00:06:21,540 --> 00:06:22,080 they could just... 98 00:06:22,580 --> 00:06:23,980 Get rid of the virtual cluster. 99 00:06:24,400 --> 00:06:31,460 And then Veo uses it to, quote, reduce usage data for internal metrics for search indexing 100 00:06:31,460 --> 00:06:32,460 and for recommendation data. 101 00:06:34,960 --> 00:06:39,840 Now, it's also used by non-content distribution companies, companies that have personal information, 102 00:06:39,940 --> 00:06:47,280 such as Facebook, eHarmony, Rackspace, ISP, and the NSA is using it, HGFS, for storing 103 00:06:47,680 --> 00:06:50,180 intelligence data, according to a recent Slashdot article. 104 00:06:52,580 --> 00:06:59,000 Now, other early adopters would include people who have medical records, tax records, network 105 00:06:59,000 --> 00:07:04,400 traffic, just any large quantities of data that they really need to process. 106 00:07:05,700 --> 00:07:09,260 Pretty much wherever there's lots of data, a Hadoop cluster's a good thing to put in. 107 00:07:10,740 --> 00:07:14,340 Now, that kind of leads us into our security framework and access control. 108 00:07:14,500 --> 00:07:20,300 I mentioned those companies that either would benefit from or are using Hadoop, but a company 109 00:07:20,300 --> 00:07:22,560 that can potentially benefit from Hadoop would be, say, Microsoft. 110 00:07:22,580 --> 00:07:28,100 Intel. They have a lot of business data, and then they've got a lot of chipset data. However, 111 00:07:29,040 --> 00:07:34,520 as I'm going to mention shortly, if they were to put them both in the same cluster, then 112 00:07:34,520 --> 00:07:36,900 people would have access to both sets of the data. 113 00:07:37,980 --> 00:07:41,980 Which kind of leads me into my point here, that HDFS, or the Hadoop Distributed File 114 00:07:41,980 --> 00:07:46,240 System, has no read control. So if you're any user on the cluster, then you can read 115 00:07:46,240 --> 00:07:51,420 anyone else's data. The client identifies which user is running the job by using who 116 00:07:51,420 --> 00:07:56,620 am I, or yeah, who am I, pardon me, which can be forged. And HBase, which is Bigtable 117 00:07:56,620 --> 00:08:01,460 for Hadoop, which is kind of a database, it's what you need to use if you're using Hadoop, 118 00:08:01,520 --> 00:08:07,160 but it's not quite a relational database, as of version 19.3, has no read or write control. 119 00:08:07,720 --> 00:08:13,040 And so the lamp analog of this would be that any application can access any database just 120 00:08:13,040 --> 00:08:19,620 by asking for it. What this means is that any business running into a Hadoop cluster 121 00:08:19,620 --> 00:08:21,160 gives all the programmers 122 00:08:21,160 --> 00:08:27,500 and all the users the same level of trust. Then any job running on that Hadoop cluster 123 00:08:27,500 --> 00:08:32,900 can access any of the data on that cluster. And even if a user only has a limited number 124 00:08:32,900 --> 00:08:38,120 of jobs that they can run, they can run those jobs on any data set in that cluster. Finally, 125 00:08:38,180 --> 00:08:41,560 malicious users could potentially modify user data that's on that cluster. 126 00:08:43,400 --> 00:08:51,140 Now, I'm gonna give a little demonstration of this. What I've done is I have a, I've 127 00:08:51,160 --> 00:08:57,380 done a Hadoop job running as two users. First as user A, so I sued into that. And then just 128 00:08:57,380 --> 00:09:03,820 a little LS of what they have. It's the Bible, is their data set. And they don't have any 129 00:09:03,820 --> 00:09:07,440 access to any of their stuff, which is unfortunate. 130 00:09:08,600 --> 00:09:11,800 So I'm gonna run a MapReduce job, which is gonna count the number of times begat appears. 131 00:09:12,120 --> 00:09:16,380 And it starts out by distributing, or the, distributing the job out, and then the mappers 132 00:09:16,380 --> 00:09:21,020 are gonna count the number of times they see the word begat and send that out. And as to 133 00:09:21,020 --> 00:09:26,300 finish the map job before it begins the reduce job, and the reduce job takes a little bit 134 00:09:26,300 --> 00:09:32,020 longer because it needs to send the data out and do remote reads and stuff like that. I 135 00:09:32,020 --> 00:09:36,120 actually sped this up. If you look at the time stamps, there's a good five seconds between 136 00:09:36,120 --> 00:09:42,440 each one of these ticks here, so. All right, so it finishes up. And then let's take a look 137 00:09:42,440 --> 00:09:49,860 at the result. And let's take a look at the, at the result. 138 00:09:53,540 --> 00:10:01,720 Hello, computer. There we go. Oh, it went away. It was 215. And then we have hack array, 139 00:10:01,880 --> 00:10:11,120 which is a different user, running the same job. And, come on. 221. That's what I meant 140 00:10:11,120 --> 00:10:20,720 to say. Now, some possible workarounds for this is that you can keep each data set on 141 00:10:20,720 --> 00:10:25,320 its own Hadoop cluster. If the attacker doesn't have any access to data they shouldn't have 142 00:10:25,320 --> 00:10:30,640 access to, the point is moot. It's also possible to run each job on its own cluster using Amazon 143 00:10:30,640 --> 00:10:35,000 Web Services. And with Elastic Map Reduce, it's even easier. All you need to do is just 144 00:10:35,000 --> 00:10:39,000 upload your data, send it the job that you want, tell it how many nodes you want to run, 145 00:10:39,120 --> 00:10:44,060 and then just pay for the time. And then there's Hadoop on Demand, where you can load 146 00:10:44,060 --> 00:10:48,360 your data into a real cluster, and then every time a job is run, it'll create a virtual 147 00:10:48,360 --> 00:10:55,440 cluster only with access to the data that you want it to have access to. Another possibility 148 00:10:55,440 --> 00:11:00,840 is that you just don't store any confidential information in Hadoop. If it's public information, 149 00:11:01,060 --> 00:11:06,080 then maybe they should be reading it. Another possibility is to encrypt all your sensitive 150 00:11:06,080 --> 00:11:10,940 data. Now, I've heard of some theoretical ways to encrypt data and still analyze it 151 00:11:10,940 --> 00:11:17,980 or process it, but as of right now, it would be difficult to process it if you have to 152 00:11:17,980 --> 00:11:22,720 unencrypt it and re-encrypt it every time you want to run an operation. And also, if 153 00:11:22,720 --> 00:11:25,760 you don't have access to it, then you just have the overhead of pushing this data around 154 00:11:25,760 --> 00:11:26,540 that you're not going to use. 155 00:11:28,140 --> 00:11:33,520 Now a solution would be to develop a solution that sits on the file system or at least 156 00:11:33,520 --> 00:11:39,020 write a concerned email to the Hadoop developers. The problem is that access control is held 157 00:11:39,020 --> 00:11:42,360 at the client level, when it should really be at the file system level. Access control 158 00:11:42,360 --> 00:11:46,320 list checks should be performed at the start of any read or write, and user authentication 159 00:11:46,320 --> 00:11:47,900 really should use a tried-and-true method. 160 00:11:53,180 --> 00:11:59,300 Now, some final thoughts. Hadoop is a rising technology. It's not quite mature and still 161 00:11:59,300 --> 00:12:02,500 holds plenty of its own issues. However, it's starting to take hold in the marketplace. 162 00:12:02,940 --> 00:12:06,680 A lot of businesses are using it, and despite its issues, it's really worthwhile trying 163 00:12:06,680 --> 00:12:12,020 out and using on your larger data sets. And we have the power to shape the future today. 164 00:12:12,240 --> 00:12:15,960 And with all our problems, we really should learn from our mistakes from the past and 165 00:12:17,180 --> 00:12:18,440 take that and move on. 166 00:12:19,040 --> 00:12:24,040 Now if you want to know more about Hadoop, there's another presentation on Saturday at 167 00:12:24,040 --> 00:12:31,520 four, in track four, that really covers more of Hadoop's capabilities and shows different 168 00:12:31,520 --> 00:12:36,620 ways to use it. Also, it explains some of the features that I talked about in a little 169 00:12:36,620 --> 00:12:37,080 more detail. 170 00:12:40,220 --> 00:12:44,880 All right. If you have any questions, please meet with me outside of the room or around 171 00:12:44,880 --> 00:12:45,180 the con. 172 00:12:45,960 --> 00:12:48,900 The next thing I'm going to is the beverage cooling contest, so you can meet me there.