0:00 Welcome back to another video. In the Teleport course, we've deployed Teleport, wired up to GitHub for single sign on, built fine-grained RBAC with deny rules set up just in time access requests. But there's one piece of the puzzle that we haven't explored yet and arguably the most important auditing everybody's most favorite subject. Every time someone runs a kubectl command through Teleport, an audit event is created. Every login, every API call, every session start and end, it's all recorded. This isn't the same as the Kubernetes native audit login, which we talked about in Video one. And if you remember the problem, the native audit log doesn't
0:49 really have any understanding of users or who did what and why. but with Teleport, every event is tied to a real human being that comes from your single sign on provider of choice, or your local teleport users. So the best way to understand how this works is just to go take a look. Let's have some fun. All right, so here we are logged in to Teleport as our admin user. We can click on audit where we get our audit log, and this will show us all the events. For today, of course, we can expand that to seven days or a
1:38 custom range, whatever we want. And what's really cool here is just the amount of information and granularity of the things that happen within a Cluster. Here we can see that a certificate was issued just after a single thing, a single sign on login event. You can click on this to get the JSON payload and understand this is the GitHub login and so forth. You can see here that we had two failed login attempts as I was messing around with the login interface using fake passwords and a failed MFA. So everything that is happening with your teleport Cluster is immediately
2:15 available to you via the audit log. So if we search for request first, we can see Kubernetes requests. This is every API call against a Kubernetes Cluster. We can see here that our dev user requested pods and the development namespace. If we scroll down, we'll actually see our access request that we created and the approval. This was our dev user requesting Cluster admin as part again of the previous video, and when we dropped our permissions, we actually get the expire event here too. So it doesn't matter what happens within your Cluster, everything is available to be audited
3:01 and help you understand what went wrong, whether your Cluster was compromised, or maybe a developer just made a mistake. Being able to retrace your steps and understand the full picture is vitally important, and this is just something that you get for free with teleport adoption within your organization. So let's try one more thing. Let's exec into a pod, in a development namespace where we can run ps, ls, p. S. Uh, RM minus rf, blah, blah, blah. I'm not actually gonna do this. Uh, we'll just pretend this stuff in temp and then we'll drop out. Now we can head back over to our audit log.
3:46 We can hit refresh. We, and we can see that there was a session created. With command execution. Now, if we click on this, all we see is that the user ran sh and then disconnected. So is it possible for teleport to show us what happened inside of this session? The answer is yes. From here we can do TSH recordings, LS. And we can see all of the recordings from all of the sessions within a Cluster. We can actually do ts play, Ts pass in the recording ID and watch the session. Now tell me that's not amazing.
4:52 Love that feature. Now as if that wasn't amazing enough. Let's do that exec again. Only this time we'll split this up and run sessions ls, and now we can see that we have an active session running on the Cluster. Well, what if we join the session? So why don't we do a TSH? Join and paste in the session Id. I cannot execute commands or monitor someone else's session or pair with my colleague as we debug a production issue. Now I know I say that a lot. I say this a lot in this course. This is one of my favorite features.
5:44 But honestly, teleport is full of amazing, brilliant, and genuinely helpful features, and this one just joins a list as one of my other favorites. This is something we used or used to use every single week when we filmed Klustered. So now no matter what commands I run, both sessions stay in sync. But I did mention pairing. And if we try to type in the bottom window, we actually are not pairing whatsoever. We're just observing. So let's leave that session and let's do it again. Only this time we're gonna set the mode to peer. The default is to observe, but you can join as a collaborator,
6:32 and now I can type and take over the driving of a peer programming session. Again, tell me that's not amazing. So that's it for the demos over these six videos. We've went from a blank slate to a fully functional teleport deployment running on Kubernetes with identity based access, fine-grained RBAC, just time access request, audit logging, session recording, peer programming, a whole lot of really awesome features. So where do you go from here if you're moving forward, if you're moving towards production? There are several features worth exploring. using Teleport as your access layer with OIDC and SAML, integrating with
7:23 your existing identity infrastructure. Is a no-brainer if you're in the enterprise, and security is really important. You're looking at FedRAMP. All of this is supported and available by speaking to the teleport team. And while this course focused on teleport on Kubernetes and for Kubernetes, it can actually proxy standard SSH sessions. The teleport agent can run on Linux machines. It can proxy request the database connections. It can expose applications via the teleport proxy, never exposing 'em to the public internet, but still making sure they're only available to the people and your team with the right rules, and even worked with Windows
8:12 desktops, all through the same unified access plane with the same audit trail. So my advice to you is to go check out the teleport documentation at goteleport.com slash docs. We also have an active community that are always willing to help if you run into problems. And one thing I'd love to emphasize before we close off the series, everything that we built and this course. Was done on Teleport Community Edition, which is free and open source. So thank you for following along. You now have the foundations for securing your Kubernetes access with Teleport. That means real identities.
9:05 Least privilege just in time elevation with a complete audit trail. And that's a meaningful improvement over where most teams start and sometimes where most teams are today. And you can build on it from there. But go forth, secure your clusters and have a whole lot of fun. We'll see you next time.