Keith “Danger” Casey

Keith “Danger” Casey

Apr 22, 2024

In this episode, Scott talks to Keith “Danger” Casey about being called "Danger", his talks at php[tek] 2024, and the benefits of going to conferences. Links: caseysoftware.com LinkedIn Learning - https://www.linkedin.com/learning/instructors/keith-casey Tickets to php[tek] 2024 - http://tinyurl.com/tek-2024-tickets 00:00 Intro 01:02 "Danger"? 03:29 Lifts and Shifts 10:32 php[tek] 2024 11:25 What is OAuth? 19:28 LinkedIn Learning 20:28 Outro

Transcript

Scott Keck-Warren Scott Keck-Warren 0:04
Hello developers, and welcome to the Community Corner podcast, where we have conversations with members of the web development community. I'm your host, Scott Keck Warren, and today we're talking with Danger Casey about his talks at PHP Tech 2024 and how he got to be called Danger. Keith Danger Casey currently serves on the product team at Pangea, working on the AuthN and AuthZ APIs. to help people secure their users and apps better than ever before. Previously, he served on the product teams at ngrok, launching the GTM efforts, Okta, working on identity and authentication APIs, as an early developer evangelist at Twilio, and he worked to answer the ultimate geek question at the Library of Congress. His underlying goal is to get good technology into the hands of good people to do good things. In his spare time, he writes at kcsoftware.com, lives in the woods, and has recorded numerous API courses with LinkedIn Learning. Thank you, Danger, for finding time to talk to me today.
B
Speaker B 1:00
Yeah, thanks for having me. Looking forward to it.
Scott Keck-Warren Scott Keck-Warren 1:02
Can we start out and talk about like why it's Keith Danger Casey?
B
Speaker B 1:06
Yes. Danger is actually my first name, not my middle name. But no, Keith is actually my middle name. And so what happened is I'm a junior. So years ago, I started going by D. Keith Casey, not using my first name, which does start with a D. And it was funny because for years people would misread it as doctor. And I'd always correct them and everything like that. And then I went to a Health 2.0 conference, and in front of 400 doctors, they introduced me as Dr. Casey. And I was like, oh, this, this is awkward. So I was like, okay, I need something else to, uh, that to use in that spot for D, something that's not going to be confused so much. And so I just started screwing around saying, you know, Danger is my first name. And when I went over to Okta, the hiring manager over there thought that was hilarious. So he set up like all my information with Danger, like in the unofficial repositories, not the HR systems, but all the unofficial places. So then when I joined up, I hacked our employee directory and I did change my first name to Danger. So internally at Okta, whenever I'd finish a presentation, I would say, and if you need to find me, look for Danger, I'll be there. Which you have to admit is a like mic drop kind of closing. And the greatest moment of all came about a year into Okta. And the CEO was sitting in the front row of my presentation. And I gave my line of, if you need to find me, look for danger, I'll be there. About a half hour later, I get an email from him and he's saying, I went to the directory, I looked for danger and you were there. And I had that moment of panic and I was like, okay, I could still log into things. I must still work here. And after that, it stuck. I can't get rid of it now. And that's fine because it's a fun thing to do. To reuse.
Scott Keck-Warren Scott Keck-Warren 2:48
Yeah, absolutely. And I mean, it's like a great conversation starter for, for real.
B
Speaker B 2:52
So exactly. And everyone's looking for a little bit of danger.
Scott Keck-Warren Scott Keck-Warren 2:54
At my previous employer, we did that kind of, I don't know, nonsense with like the phone system. Like we'd go in there and like change people's phone, phone names, you know, like at one point, like my boss was calling people as Batman. Um, so, but you know, nobody ever got, it was just fun, you know, and it wasn't, it was all internal. So like nobody got in trouble for it.
B
Speaker B 3:13
Nice. Nice. Yeah. And, uh, When I was at ngrok, I actually requested the email address danger@ngrok.com.
Scott Keck-Warren Scott Keck-Warren 3:19
Did you get that?
B
Speaker B 3:20
Oh, yeah. They gave it to me as an alias. So it was fantastic because I tell people that was my email and they're like, whoa, that is so cool. I'm like, yep. And they never forget it.
Scott Keck-Warren Scott Keck-Warren 3:29
Yeah. That is pretty fun. So you're one of the speakers at PHP Tech 2024. You're doing 2 talks. And the first one that we're going to talk about today is the Lifts and Shifts: Cutovers and Other Bad Habits. Can you give us just like a brief introduction as to what that's going to be about?
B
Speaker B 3:46
Yeah, absolutely. So my, my underlying premise is at this point we've all moved to the cloud. You know, at least half of our stuff is in the cloud. We're all doing these things. But in a lot of cases, we didn't rethink our constraints because when we initially built our application, we had certain, certain constraints, certain mindsets, certain architecture as we were building things out. And when we moved to the cloud, all of that changed. All the constraints, all of our capabilities, all the tooling that we have radically changed. But in a lot of cases, we didn't go back to those initial decisions that we made in architecting our app and say, well, wait a minute, now that these things have changed, how do I come to a different decision? Or should I come to a different decision? We just lifted and shifted what we had. And I always use it to, uh, or compare it to when you move and you move houses or you move apartments and you end up with this box. And you put all this stuff in this box, and then you move to the next place, and you move this box. You never open it. You never figure out what's inside. You never say, "Oh, wait a minute! I kept that because you know when I lived in that apartment five years ago, I needed that, and now I don't." And so we have this all this stuff, all this junk that we're carrying from system to system, from apartment to apartment, and it's just a lot of extra work that we're putting in and not getting any value out of. So in lift and shift, I want to go back and say. Our constraints have changed. How have they changed? Let's understand that first. And then let's understand like what decisions can we make differently this time and should we make those decisions now?
Scott Keck-Warren Scott Keck-Warren 5:15
That sounds really interesting. So, so like there's, there's a couple design patterns you're going to talk about during this talk, the circuit breaker, the strangler, and pub/sub. And like, so, so can you give us just kind of like a brief, like understanding of what those, those kind of things are or?
B
Speaker B 5:29
Yeah, absolutely. So pub/sub is one of my favorites out there. It's a really straightforward thing. If you use webhooks, you use Pub/Sub. So it's a really simple pattern that basically everyone uses. But when you're thinking about moving things to the cloud, you're starting to build distributed architectures. And we're all in the cloud now, but we haven't realized we're doing things in a distributed way in a lot of cases. So I say, well, let's introduce Pub/Sub. Let's make sure that the components that we have in our system can talk to one another. And that's really important as we break things up. We go a step below that, or a step before that, I guess. Circuit breaker pattern is another exceptionally useful one. When you have a circuit breaker in your house, when there's a short in some line or something has a problem, you know, a circuit breaker cuts off all access to it, cuts off all the current flowing to that device or that outlet. Circuit breaker in this works exactly the same way. We detect a fault somewhere in our system. instead of just continuing to operate like nothing's wrong, we detect that and then we shut off access to that. And then now your system hopefully can still operate in some maybe limited state, but it can still operate without running into these catastrophic errors. So it's thinking about like, how do we isolate and protect our system from potentially failed components? And in distributed systems, we're going to have failed components because, you know what, that routing table might be off. that, that service that we're dependent on might go down and we need to plan for that. And then in addition to that, we've got the strangler pattern, which sounds horrifying, but it's a lot less creepy than it is. Strangler pattern is any time we want to rewrite a component and the component we have already works and yes, it's worked, it's been there for 10 years. We're all a little nervous about making any modifications to it. So the idea behind a strangler pattern is that we can put a proxy in front of that service And on day 1, we just proxy that service. We're not doing anything special. We're not changing the traffic. We're not doing anything unique. But then over time, we embed a little bit of intelligence into that proxy, and then we build a service next to our existing service, and we slice off a component, and we do some of our capabilities and some of our needs in that other service. And over time, we switch more and more things away from our old service to to the new service using that proxy to kind of broker that traffic. And so you basically strangle it out of existence.
Scott Keck-Warren Scott Keck-Warren 7:54
That, that is, that is kind of gruesome to call it that, but I understand like where that's coming from with, with that example.
B
Speaker B 8:01
Yes. But, and now you remember it, you're never going to forget that one.
Scott Keck-Warren Scott Keck-Warren 8:04
No, obviously not. So is, is, is this something that people who may not be in the cloud, um, now, um, they, they could come to and get some information about it as well? kind of like help them with their existing codebase, or is this really only people who are making that transition into the cloud?
B
Speaker B 8:19
I think even if people are still on-prem in their own data, like on their own hardware and everything, can absolutely get a lot of value out of it. If you're thinking about like blue-green deployments and a continuous deployment system, that fundamentally is a strangler pattern. You've— you're bringing up the old system or the new system while the old system's online. You're transitioning traffic to it. That's a strangler pattern. If you're using any service like Stripe or Twilio or Pangea where I work currently, like you have to be prepared for there to be system outages or for things to go wrong or for your account to run out of credit. So like pub/sub and webhooks makes a lot of sense and circuit breaking makes a lot of sense just because weird things happen sometimes. So I think all those concepts apply no matter what you're working in.
Scott Keck-Warren Scott Keck-Warren 9:05
We've even like used like the strangler As, as a, like we said, okay, we have this class and it needs it like through, for some reason it needs to be completely re-shot, right? Just redo it. So we will actually do that internally inside of our code, not with a proxy, but with like a proxy class. So, you know, like you can come in and learn that as well, which would be helpful.
B
Speaker B 9:24
Yeah, absolutely. And it's the exact same concept. Um, I, I speak in terms of proxies and components just because that's usually the level I'm working at, but doing it with a class is the exact same thing.
Scott Keck-Warren Scott Keck-Warren 9:35
Yeah, absolutely. So is there anything else that you want people to know about this talk before we switch over to the other one, or?
B
Speaker B 9:40
Yeah, sure. Part of this is I'm doing a theme of kind of like back to basics of understanding our, our core constraints. And so I'm doing this one at Tech. I'm doing the kind of sequel to it at that conference in July up in Wisconsin. So I'm— and it's not the same talk. It's kind of the next group of patterns that we can all group together and use in a coherent way. So I'm really trying to say this theme of let's get back to basics, let's understand our constraints. I'm baking that throughout all my presentations over the next year or two.
Scott Keck-Warren Scott Keck-Warren 10:11
Okay, that's interesting. Like an interesting way to do that. So, so is the THAT conference?
B
Speaker B 10:16
Yes, THAT conference. T-H-A-T, THAT conference.
Scott Keck-Warren Scott Keck-Warren 10:20
Okay, that's a new one on me. I'll have to look that one up.
B
Speaker B 10:22
It's hands down my favorite conference of the year.
Scott Keck-Warren Scott Keck-Warren 10:25
Oh, okay. Well, that's a glowing recommendation. I'll have to check that out. So we'll be right back after this word from our sponsors. Attention all PHP developers. Did you know that one of the best ways to improve your skills is to attend a conference? It's true. And have I ever got news for you because PHP Tech is returning for another year of leadership, expertise, and networking all in one event. It's a relaxing atmosphere for tech leaders and developers to share, learn, and grow professionally while also providing you the knowledge to solve your everyday problems. You'll learn things like building for the PHP command line interface, From Steve Grunwell and the Dark Corners of the SPL from Omni Adams. Join us April 23rd to 25th, 2024, just outside of Chicago, Illinois, or online, as all talks will be streamed live. If you can't make it during the conference itself, all talks will be available later for you to watch at your convenience. You'll even get access to last year's talks. Tickets are on sale now at tech.phparch.com or use my link in the description for a discount. And now back to the video. So we're back with Danger Casey. So the other talk that you're going to give at Tech this year is the Many Layers of OAuth, which is like talking about OAuth authentication, which is like one of the key components to like the modern web, essentially. Can you start off? And for those of our listeners who don't know what OAuth is yet, kind of explain what OAuth is and then we can talk about your talk after that.
B
Speaker B 11:48
Yeah, absolutely. So OAuth is fundamentally a way of being able to share authorization between services. So anytime you have a— you hit a new website and it says sign in with, and it's, you know, Twitter or Facebook or Google or anything like that, fundamentally that's OAuth behind the scenes. And so what's happening is that you're using your credentials from one system to create or activate or connect to accounts on a new system. And so— and the important thing is it never touches your credentials. So you're effectively delegating access to your existing account to that new account. Um, and that's kind of like the, the bare bones implementation. That's OpenID Connect, which is a subset of OAuth specifically. Uh, but that, that's really what it's all about. It's sharing access, sharing authorization without sharing credentials.
Scott Keck-Warren Scott Keck-Warren 12:35
Yeah. And like, I, I, I don't know, like I remember like back when we used to have like passwords for everything. I mean, we still have to have passwords for a lot of things, but anytime now where it's like log in with Google, I'm like, I just clicked that button. Like I didn't even think about it. I'm just like, log in with Google. So that's, that's what, like what we're, what we're talking about when we talk about OAuth for the most part is like a quick login.
B
Speaker B 12:54
And there's still lots of places that aren't doing that or aren't doing that in good intelligent ways. Like anytime you've, you've got a, one of those budgeting apps where it's like, oh yeah, just put in your banking credentials here. That terrifies me. That absolutely terrifies me. I'm like, you know, more and more of these banks are supporting OAuth where instead of doing that, you could say, grant us read access to your account. Because you have to remember, when you give someone your credentials, they're you for all intents and purposes. So anything you can do to that account, they can do that to that account, whereas OAuth scopes it down to limited things.
Scott Keck-Warren Scott Keck-Warren 13:28
Right. Very, very, very specifically. So what is it that, that people can expect to know, learn about at your talk about OAuth?
B
Speaker B 13:34
Yeah, absolutely. So one of the things I've realized over the years is everyone kind of knows what OAuth is, but they don't really understand the mechanics behind it. And so I constantly come into these conversations of they're saying, I want to support OAuth or my system does support OAuth. How do I integrate with it? And what I lay out in the presentation is that's a, that's a very vague statement fundamentally because OAuth itself is a framework. It's not a specification. And the difference between those is a framework is like borrowing $10 from your buddy for lunch. Should you pay them back? Yes. Will you actually use it for lunch? Maybe. There's all these like social conventions around it, and there's like social pressure, but there's no written-in-stone contract. Whereas a formal specification is closer to getting a mortgage of here's what you have to do, here's what they have to do, here's what the exchange back and forth of information looks like, and all that stuff. So OAuth is like borrowing that money from your buddy. There's a lot of social conventions around it, and those social conventions are defined by the extensions, and every extension is optional. So we end up in this weird spot where somebody says, I support OAuth, and what they really mean is they support the core framework and this mix of extensions, but what they really needed was that other mix of extensions. And so we end up in this complex mess where we think we're describing things the same. We think we're using the same language and we're not. And I spent 5 years at Okta living and breathing OAuth. So I realized like the depth and complexity and the pain of this one. So I've just been trying to at least get people to realize they're not using the same language and therefore how can we make things better?
Scott Keck-Warren Scott Keck-Warren 15:25
That's— I, I honestly, like, I, I did not know that OAuth was that complicated. Like, this is like eye-opening. Just this little bit of information that you're giving me right now is eye-opening. Um, because I just assume, oh, like OAuth is just this thing, right? And it's just like a key exchange essentially. But what you're saying is it's like more complicated than that, obviously, because it's these extensions.
B
Speaker B 15:45
The base framework can be as simple as that, but I talked about, you know, sign in with Google. That's actually not core OAuth. That's OpenID Connect, which is an extension to OAuth. And OpenID Connect makes it much more strict and rigid, which is good for single sign-on because you can have something as simple as, I want to share my profile information. And before OpenID Connect, your profile information, your first name might be fname or firstname or first_name or all these different things. And you just didn't know how that payload was going to be structured, how the fields were going to be named. OpenID Connect came on top of OAuth and said, You know what, if you're going to do single sign-on or shared credentials like this shared profile, here's what you must do. You must name these fields this way. The payload must be structured this way. And as a result, we get systems that are interoperable.
Scott Keck-Warren Scott Keck-Warren 16:34
Yeah. And it's always fascinating to me too, like when we have these concepts. So it's like OAuth is a base level like usage thing for the internet now, right? Like everyone is using it because it's like, this is a good standard. And so like everybody just adopted it. This whole, like, there's always these conversations where we're just like, well, OAuth is what, right? And like this, like this clarification is going to be, I think just this in general is going to be helpful if you want to go to this talk to like understand what exactly like OAuth is. Because obviously I didn't know what it was if it's much more complicated than what I thought it was.
B
Speaker B 17:06
So, um, yeah. And it, and it's deceptively complex because you look at it and you go, oh yeah, I could do that. Oh, my library supports that. Well, actually your library supports this mix of extensions and those aren't the ones that you need right now. So now you're the library that you thought that you picked out and you told your team lead or your product manager, yeah, we got this covered. It's going to bite you at some point.
Scott Keck-Warren Scott Keck-Warren 17:27
Okay, man, that's fascinating. I didn't, again, like I'm, I, I, I've talked to this about other people that we've interviewed for like that are speakers at the, at the conference. And it's just like, I'm like, oh, well, like I'm going to talk to so-and-so about their talks. And then every time I talk to somebody about their talks, I'm like, well, I got to go to both of these. Like, it's just like every talk is just like so, so interesting to me. I'm like, I, I'm probably like the worst person to do this too, because, because like I want to go to every talk.
B
Speaker B 17:52
No, that, that's great. And I think fundamentally that's the value of a conference is that you've got— if you do it right, the community is your extended R&D group of I don't have time to spend 40, 80, 200 hours diving into the subject, understanding all the nuance. But if I can come to your presentation for an hour, I can shave that time in half. I can save weeks of effort to go, oh, wait a minute, this guy, this woman wrote this presentation. Here's a slide deck. I'm not going to hit these dead ends because they went ahead of me and they did that trailblazing for me. So I think that's a great mindset to be in.
Scott Keck-Warren Scott Keck-Warren 18:30
Yeah, I was at Longhorn last year and I apologize if the person who presented is here. I don't remember who did it, but they were talking about the caching layer that they had built for Um, for, for the company that they work at. And like, it dealt with like, it deals with like nested caching problems where you might have like, you know, this thing that uses this thing that uses this thing that uses this thing. And then this thing changes, which has to invalidate all the cache all the way up. And like, I looked at it and that's a problem we have at work. And I looked at it and I was like, oh, this just like solved so many of my problems. And I just like, oh, we just use this library now. Like we had like all this, like stuff in our code to work around it. And it's just like, well, use this library. We're using this library and we solved a whole bunch of problems.
B
Speaker B 19:12
Yeah, the ROI on you attending that one presentation was huge, and it'll be felt for months or years. And that's awesome. Like, when we— when the community is healthy, it's doing interesting creative things, and we can learn so much. That's why I tell people, you know, get involved in your community as much as possible.
Scott Keck-Warren Scott Keck-Warren 19:28
So is there anything else you want to direct our listeners and our viewers to before we let you go today?
B
Speaker B 19:33
Yeah, absolutely. So I do a ton of LinkedIn Learning courses. I do one on OAuth and OpenID Connect specifically. I do API design, another one on API security. I do a design patterns in PHP talk where I talk about here's some core concepts and here's what they look like in different frameworks. So those, those are all useful. So definitely check that out. You know, Keith Casey on LinkedIn or Danger Casey if you prefer, and you'll find all that stuff. Uh, in addition to my day job, I'm living and breathing security via APIs at Pangea and, uh, having lots of fun baking like good secure authentication into any system using IP intelligence, domain intelligence, uh, all kinds of interesting things.
Scott Keck-Warren Scott Keck-Warren 20:14
We'll link to the, to some of that stuff in, in the description for the, the episode and the, and the YouTube video.
B
Speaker B 20:20
Brilliant. Thank you.
Scott Keck-Warren Scott Keck-Warren 20:21
Yeah. Awesome. So thank you again, uh, for finding time to talk to us.
B
Speaker B 20:26
Yeah. Thank you for having me. I appreciate it.
Scott Keck-Warren Scott Keck-Warren 20:27
Yeah. Awesome. I have to say another heartfelt thank you to Danger for all of his time and all of your time as well. If you're not already a subscriber, make sure you subscribe with whatever your preferred method is and leave us a comment or a review as it does help others find us. This podcast is available both as an audio version on the PHP Architect website and a video version on our YouTube channel. This is Scott Keck Warren for the Community Corner podcast signing off and reminding you to keep listening. Keep coding and keep reading.