Webinar
DevOps Debriefs: How The Financial Times Beat Leaks with OIDC
Things you’ll learn
- Securing your organization's pipelines
- OIDC authentication
- Say goodbye to long running tokens
Speakers
Summary
In our first episode of DevOps Debriefs, join Cloudsmith and special guest Rob Godfrey, Senior Technical Architect at the Financial Times (FT) for a discussion on the crucial role of authentication and credential management in ensuring software pipeline security.
We’ll discuss:
Innovative strategies that empowered the Financial Times team to overcome software supply chain risks in their pipelines.
How the team responded to the fallout of the CircleCI breach.
Insights into the challenges and triumphs as the Financial Times fortified its pipelines against potential risks.
The pivotal role of Cloudsmith in supporting FT's adoption of OIDC and providing comprehensive visibility into their entire software supply chain.
Transcript
- 00:00:00Ciara CareyHi, I'm Ciara Carey, and welcome to Cloudsmith's webinar on all things supply chain security and package management. Cloudsmith is your cloud native, universal, artifact management platform. We integrate with all your CI/CD, and we support all your formats, from your Docker images to your packages. Rust crates to your NPM today we're going to be talking about how to securely connect to your SaaS build tool in your build pipeline
- 00:00:26Ciara Careyoften these connections involve long running API tokens stored in your CI/CD environment, such as your GitHub Actions or your CircleCI. A classic use case might be you have your CI/CD tools, they need access to cloud services, your AWS, your Cloudsmith, to publish artifacts, to deploy software, access resources in their cloud provider.
- 00:00:50Ciara CareyAnd the classic way to do this is to create a user in your cloud service. To generate a secret access key. And then to have [00:01:00] this as your long lived credentials. These credentials need to be stored in your access from your pipeline. They're probably stored in some secret store on your CI/CD. And the problem with this is they tend to have very extensive permissions.
- 00:01:15Ciara CareyCause they need to create, your CI/CD needs to create, delete, update resources in your source code, in your infrastructure, in your artifact management accounts. And unfortunately, these credentials can be leaked. It's hard to detect when this happened. And it's a, it's a big process to rotate these keys. The issue with the workflow above is that the API, if the API key is stolen, there's, and then there's a risk of unauthorized access and attacker with these credentials can impersonate a user and execute malicious code.
- 00:01:50Ciara CareyA better alternative is to use. OpenID Connect OIDC and this enables short lived authentication tokens, helping you secure your [00:02:00] pipelines against the exposure of credentials. So providers can so providers can not support this, can improve the security of your supply chain overall. So today we are joined by Rob Godfrey.
- 00:02:15Ciara CareyHe's a senior technical architect at Financial Times, and the Financial Times is one of the world's leading business organizations. I'm going to bring Rob on stage now. Hi Rob, how are you?
- 00:02:28Rob GodfreyI'm very good, how are you?
- 00:02:29Ciara CareyHey do you want to tell us about your role in Financial Times?
- 00:02:33Rob GodfreyYeah I've been at the Financial Times for a little over a decade now, so I've done a few things there, but my current role is I look after two kind of areas.
- 00:02:43Rob GodfreySo one of my teams that I work with, we look after our cloud platforms, not cloud estate helping developers use AWS and Heroku and other tools effectively and also securely. And then the other team I work with look after our developer tooling. So things like GitHub and CircleCI [00:03:00] and Cloudsmith and a few other things as well.
- 00:03:03Rob GodfreySo yeah.
- 00:03:03Ciara CareyYeah. So I brought you on today because I know early in 2023, you got like a notice from CircleCI to say, That you're you need to rotate and revoke your keys, which I'm sure was an easy task. Oh, we've
- 00:03:18Rob Godfreygot thunder here.
- 00:03:20Ciara CareyThat is something. I hope
- 00:03:23Rob Godfreythe internet lasts.
- 00:03:26Ciara CareyIt was like foreboding. But yeah, so you got that action required notice from CircleCI.
- 00:03:35Ciara CareyAnd what was the first reaction?
- 00:03:38Rob GodfreyYeah, I think it was, I think my second day back after. New years and yeah waiting in my inbox when I kind of sort of started the day was this email from circle ci saying yeah, yeah an advisory to recommend that we Rotate all our secrets that we stored in circle ci pipelines and it was like Okay, so that's sort of I think my plans for [00:04:00] january kind of Disappeared out the window at that point because we use CircleCI extensively throughout our organization.
- 00:04:06Rob GodfreyWe have well over a thousand pipelines running in CircleCI and there's a lot of environment variables that we had to inspect basically in triage and then there were a lot of secrets. That's where we were potentially affected.
- 00:04:23Ciara CareyCan you give us an idea of what is a lot of secrets? Is it like a hundred?
- 00:04:29Rob GodfreyWell, we started, we didn't quite know to begin with. And so with, you know, we kind of used the APIs that CircleCI provide to enumerate all the projects and then enumerate the secrets. And we ended up with well over 14, 000 environment variables
- 00:04:45Ciara Careythat
- 00:04:46Rob Godfreywe were contending with. And then after some triaging where we did a bunch of pattern matching on, you know, we looked for AWS access key and, you know, other things like vault token and, you know, other, yeah, there's a big list of these [00:05:00] things that we went searching for.
- 00:05:01Rob GodfreyAnd then a bunch of human effort as well. We got that down. We reckon there was well over sort of 5, 000 secrets. that were affected and would need to be rotated. So this was quite a big deal. We had to coordinate a response across, probably dragged in 30 to 40 engineers to work on this problem for several weeks.
- 00:05:23Ciara CareySo it
- 00:05:23Rob Godfreywas a big deal at the time. And yeah, and yeah, it required a lot of coordination, a lot of effort from the teams, and yeah, the teams worked really hard. It was quite interesting work as well. So it took several, you know, we identified the critical and high stuff first. And that they were rotated fairly quickly, but there was quite a long tail of other things that we were less concerned about, but still needed to be rotated.
- 00:05:47Rob GodfreyAnd so, yeah, it took us, took us several weeks to, to get through that, that sets of, you know, thousands of secrets that needed to be rotated. So big deal.
- 00:05:56Ciara CareyYeah, no mess. And, and so like the [00:06:00] immediate steps you took, obviously you were talking about them. So identifying. the most critical tokens. Is that the first thing that you did?
- 00:06:08Rob GodfreyYeah, we had to yeah, do a bunch of, you know, the things we knew. So we were kind of looking for things like, okay, are there secrets that give you access to secret stores? Are there secrets that give you access to data and particularly sensitive data or PII, that sort of thing? Are there things that allow, you know, changes to infrastructure.
- 00:06:27Rob GodfreySo there were certain classes that we cared more about and there were other things like, you know, there were certain, I don't know, maybe sort of static analysis tool, sort of test coverage tools that we were kind of less concerned about. You know, there were kind of hoovering data out of our systems, but you couldn't really do much with that data that we were too worried about.
- 00:06:47Rob GodfreySo there were kind of definitely different categories of secrets. So we had to kind of, yes, assign a severity and then prioritize All the critical and kind of high severity things and get those rotated super quickly. [00:07:00]
- 00:07:01Ciara CareyAnd so did you use this as like a, I, well, I know the answer, but use this as an opportunity to actually improve the security of your build pipelines and your supply chain security overall?
- 00:07:12Rob GodfreyYeah definitely. I think, you know, never, never let a good crisis go to waste as it were. So so yeah, we, we kind of looked at a few things. So yeah, once, once you've The dust had settled. We sort of did, you know, sort of retrospective type stuff and kind of focus on a few areas. And so one of them was why, why do we have so many secrets?
- 00:07:30Rob GodfreyYou know, that's a big number, you know, with a lot of pipelines, you'd get a lot of secrets. But we were kind of, we'd already kind of started the journey of using OIDC with AWS.
- 00:07:39Ciara CareyOkay.
- 00:07:40Rob GodfreyBut we hadn't. use that exclusively everywhere. So focusing on these kind of using short lived ephemeral secrets wherever we can was kind of top of the list because it obviates the need to manage that secret within a pipeline, right?
- 00:07:56Rob GodfreySo, and then you don't need to manage it in a secrets manager and then there's a whole bunch of [00:08:00] complexities sidestepped by just using short lived secrets. We also then Decided that we're rather than having secrets sort of sat in environment variables within pipelines, we'd pull secrets from the secrets manager as part of the pipeline execution.
- 00:08:17Rob GodfreySo they then didn't live for a long time in the CircleCI environment. They were just there during the pipeline. a pipeline's execution, so
- 00:08:26Ciara Careyyou've got to
- 00:08:26Rob Godfreyminimize the time those secrets were kind of available within the build environment. And then thirdly, we looked at, you know, can we automate secret rotation wherever possible?
- 00:08:38Rob GodfreyBecause, you know, manually rotating secrets is toil and drudge work. And, you know, it actually, you know, it's really hard to do that for weeks on end without making mistakes.
- 00:08:50Ciara CareyYeah, and it's hard to keep the morale up and for weeks doing that kind of thing.
- 00:08:54Rob GodfreyYeah, definitely.
- 00:08:56Ciara CareyAnd does CircleCI provide with like extra tools to [00:09:00] help their customers during this time?
- 00:09:02Rob GodfreyThey did actually, they did a fairly good job. So they reacted pretty well. So, you know, I think we kind of realized that, you know, this isn't the first time we've had this sort of, a sort of a secret leak. We've, we've seen similar things with other suppliers as well. And so they provided some tools to help enumerate secrets.
- 00:09:20Rob GodfreyThey provided one thing that was missing that would was really useful when they added it was adding timestamps to the last change timestamps for environment variables. So you could tell if someone had changed the value of an environment variable, which kind of gave us an indication that yes, this had been dealt with as a secret had been rotated.
- 00:09:41Ciara CareyOh, yeah. And so is that in the audit log or is it in the settings or something? Where did you?
- 00:09:47Rob GodfreyYeah, I can't remember. I think they just, I think initially it was part of an API and then they exposed it maybe through the UI as well. So you could, yeah, so we could get the data that said, yeah, these are the things that haven't been rotated.
- 00:09:58Rob GodfreyBecause we already had rotation in place for [00:10:00] quite a lot of things, but there were definitely things that weren't. Weren't in, you know, being rotated as perhaps they should have been according to our internal policies.
- 00:10:08Ciara CareyOh, yeah Something like a crisis to make you realize this is not a drill And was there any When you were adopting OIDC, where available, I know not all built tools support it was there were there was it difficult or was it challenging at all to get it?
- 00:10:28Ciara CareyWas it just Like to get it All your configurations updated. Was it like a difficult process?
- 00:10:35Rob GodfreyThere is a bit of complexity in getting the sort of essentially the trust relationship between In our case, there was CircleCI in AWS and CircleCI in Cloudsmith So there is some configuration to get that set up.
- 00:10:46Rob GodfreyBut once that's set up It's then really focused on how do you make the developer? experience really simple. So Cloudsmith you provide an endpoint in your API, but even that we felt was too much. We [00:11:00] wanted a couple of lines in the CircleCI configuration to essentially give us this ephemeral token rather than invoke an API endpoint, get, get some, you know, parse the status code, parse the token out and kind of make it available.
- 00:11:14Rob GodfreySo we wrapped the API call in a, in a what's called a CircleCI orb, a bit of reusable. Pipeline configuration. So basically when an engineer wants to get a Cloudsmith OIDC token, it's sort of two lines in there.
- 00:11:31Ciara CareyOh, cool.
- 00:11:32Rob GodfreyCircleCI sort of configuration for that pipeline.
- 00:11:35Ciara CareyOh, that's cool. And so when you're, When you're doing this at scale, is it, is it like actually handy enough once you've already rotated all the tokens, you've tried to minimize the amount of tokens used or access.
- 00:11:51Ciara CareyAnd then, and then when, when you're adding OIDC, I suppose, It's, you've done all the hard work in doing all [00:12:00] the rotation already, so it's not such a hurdle to add this in, especially when you know this will stop this happening again, this, if a breach does happen, you're like,
- 00:12:12Rob Godfreywell, I think the nice thing about using OIDC is You, it's just a lot simpler, right?
- 00:12:17Rob GodfreySo with a short-lived credential, you a don't need to store it in a Secrets Manager. You then don't need to really track it and say who, who's gonna own this secret and be responsible for it. You then don't need to rotate it ever, because it's only gonna live for an hour. or so, you know, minutes or hours rather than weeks and months.
- 00:12:38Rob GodfreySo you kind of just, you completely sidestep a whole bunch of complexity. So that's why, you know, where OIDC is available to us, we will use that in a heartbeat over kind of long live credentials now.
- 00:12:51Ciara CareyOh, absolutely. And is there some tools that you kind of wish were supported? OIDC, is there?
- 00:12:57Rob GodfreyWell, if you just think of the moving parts in your [00:13:00] pipeline, yeah, you've kind of, it would be great if, you know, everything, you know, kind of hooked together with OIDC within the pipeline.
- 00:13:07Rob GodfreySo then all those things didn't know. A challenging bit and one thing we're looking at internally is whether internal kind of APIs could be enabled for some sort of OIDC integration, but that's going to be a custom built kind of Yeah, I
- 00:13:26Ciara Careyknow OIDC has this idea of the provider and the service. So in that scenario, who would, who's the provider?
- 00:13:35Ciara CareyI suppose you're just using your whatever the Google or AWS credentials. Is that what it is?
- 00:13:42Rob GodfreyYeah. So you've got the. CircleCI acts as the sort of, it will pass information about the pipeline and the organization and the various bits and pieces of information about the job execution and then it's up to the service essentially to [00:14:00] evaluate whether it's that information looks okay and then issue a short lived credential based on the information it provides and the trust relationship it has.
- 00:14:10Rob GodfreySo yeah, we're kind of looking to see if we can use kind of AWS's OIDC capabilities to essentially provide a shim to other services. Oh brilliant, for
- 00:14:21Ciara Careyinternal stuff as well.
- 00:14:23Rob GodfreyYeah, so you can lean on sort of IAM credentials and their their sort of new short lived role base type things.
- 00:14:31Ciara CareyYeah, and for for services that don't currently support OIDC, I think you you have a kind of a way to make that a little bit more secure as well and make revoking and rotating API tokens a bit easier.
- 00:14:45Rob GodfreyYeah, so one of the areas we looked at was how do we do sort of automated key rotation. And we, we, Use a top tool called Doppler and we've brought that tool in because it has integrations with various other bits of our estate so AWS [00:15:00] and Heroic, Q Circle, CI, GitHub and so you can basically Take a secret publish it into Doppler and then Doppler will know where to then push that secret To if that's how you want to set things up So you can say, okay, when I'm rotating a secret, you can basically go into Doppler and say, rotate this secret.
- 00:15:19Rob GodfreyIt can go off to AWS, say, generate a new user credential, and then push that out to CircleCI or wherever it needs to go. So it's kind of, it's taking all the, There's complexity and the toil away, I guess, is what it's trying to say. Yeah,
- 00:15:35Ciara Careyis that where you're always, do you find that security and simplicity just go really well together?
- 00:15:41Ciara CareyThat when you remove that complexity, that it just generally is more secure?
- 00:15:48Rob GodfreyIt doesn't have to be security. If you kind of, if you want to kind of make, you know, nudge an organization in a certain way, yeah, make it really simple. And, you know, so in this case, yes. It applies to security, [00:16:00] but there are lots of other things that we do similar things with cost optimization and things like that.
- 00:16:05Rob GodfreySo kind of making that the sort of preferred choice, the easy choice.
- 00:16:10Ciara CareyYes.
- 00:16:10Rob GodfreyYeah.
- 00:16:11Rob GodfreyIf it's hard, you're not going to get any traction. That's the reality.
- 00:16:15Ciara CareyAbsolutely. Yeah. So and so are there any after this breach and how it. It took so many resources of the financial times for weeks on end. What, was there any extra tooling and infrastructure that you brought in besides Doppler and OIDC?
- 00:16:32Ciara CareyOr training or anything like that? I
- 00:16:35Rob Godfreythink the One thing we did have, we have an internal sort of inventory of our infrastructure estate. And so some of the things we did to augment that was to actually expose metadata about secrets into that as well. So that gave us a way to, and this, this kind of inventory, it's basically a big graph database and it connects together our systems, the people that operate those systems, the [00:17:00] infrastructure components that make a kind of part of that system.
- 00:17:02Rob GodfreyAnd we didn't have secrets in this time last year, But now we do. So we can basically link together, okay, this, this, if we know this secret's been affected, we can easily work out, okay, well, we need to this team over here about that. So, and that's across all our different platforms. So we, we have little bots or agents that kind of, kind of go into AWS and put out metadata Heroku or, you know, CircleCI or GitHub and kind of metadata about our secrets and also things like SSH keys and certificates.
- 00:17:38Rob GodfreyAnd then once we have all that, it makes it really easy to sort of start to go. There's, there's issues over here that we need to go and look at.
- 00:17:45Ciara CareyAnd so do you have any advice to give, give give other companies that experienced a breach?
- 00:17:53Rob GodfreyYeah, I think it's worth preparing. for it. So at least, at least kind of run a thought experiment where you kind of think, [00:18:00] okay, what would happen if our secrets in some, one of our vendors were, were, were leaked, how would we react?
- 00:18:08Rob GodfreySo, and a part of that, I think what we worked out was we kind of need to know where our secrets are. What secrets do we have? Who's responsible for them? So then you got kind of a, you know, because one of the one of the challenge we had actually was we had secrets when we're trying to rotate that were part of systems that the the responsible person had maybe left the company.
- 00:18:29Rob GodfreyAnd so we now couldn't get into the You know an external system that issued the secret so we had to start raising support cases in certain Instances to kind of get access to to rotate secrets, which is never a great thing But yeah, that's these sorts of things happen when you know people leave organizations, unfortunately
- 00:18:48Ciara CareyYou were talking about this graph Catalog before is that is that how you addressed that issue?
- 00:18:55Rob GodfreyYeah Well, we can certainly spot things when we know if people have left the [00:19:00] organization for example so you can kind of quite quickly see that Are there kind of areas of our estate where we need to maybe reassign ownership of stuff and things like that? So
- 00:19:10Ciara Careyyeah, and even what you're saying there kind of reminds me of like the problem of like supply chain security where you need to know a big problem is when a vulnerability comes in You need to know actually what's in your software.
- 00:19:22Ciara CareySo it's like the same problem, basically. Knowing what you have is you're, and being able to audit that gives you a step up.
- 00:19:32Rob GodfreyYeah. And certainly things like knowing how to rotate, like rotation procedures, because you have all sorts of different secrets. And from different sort of source systems, you know, you kind of got to have that documented somewhere and so yeah, and then if you can automate those processes as well.
- 00:19:48Rob GodfreySo yeah, it's yeah, certainly when you kind of got lots of interconnectivity between lots of SaaS providers, it gets quite complicated.
- 00:19:56Ciara CareyYeah, it's like so simplicity, and knowing what you have and who [00:20:00] owns it is word for word. Would help
- 00:20:02Rob GodfreyYeah,
- 00:20:05Ciara Careyi'll just see if there's any questions. Oh, there's something in the chat Oh christopher can hear us both.
- 00:20:10Ciara CareyThank you. Christopher. Maybe it was just me then
- 00:20:13Ciara CareyAnd does anybody from that's joining us today have any other questions on how to react to a breach or OIDC We'd love to hear from you.
- 00:20:23Ciara CareyYeah, so so no questions so far, but looking ahead. Is there any other? Strategies that you'd like to adopt in order to improve the Your supply chain security your your build tool security.
- 00:20:37Rob GodfreyYeah, I mean we're definitely focused on package management So we became a Cloudsmith customer last year. So We recognized that our approach to package management needed some updating should we say?
- 00:20:51Rob GodfreyAnd yeah, we're kind of in the process of progressively rolling out Cloudsmith is our kind of universal package manager [00:21:00] for different ecosystems. So we've done about five language ecosystems now. We'll do a couple more this quarter and continue rolling them out throughout the organization.
- 00:21:09Ciara CareySo yeah, that's,
- 00:21:10Rob Godfreythat's the main focus from that sort of the build tooling.
- 00:21:15Rob GodfreyYeah, that's, that's
- 00:21:16Ciara Careygood. And do you think like this, this whole incident, do you think has made you more aware of other issues that were maybe Possibly in your build pipeline to kind of sit up and take note. Not that you didn't do that before, I'm sure.
- 00:21:31Rob GodfreyI think what it has done is basically it's sort of burst the bubble that you kind of, you know, I think when you came, we use lots of SAS vendors, right?
- 00:21:41Rob GodfreyAnd so you kind of expect them to manage stuff securely. And then I think when these sorts of things happen, and certainly happened to a few of your vendors, You kind of sort of take stock and think, well, it could probably happen to any of our vendors at some point. So we need to be somewhat prepared for that eventuality and [00:22:00] so that we can kind of respond appropriately.
- 00:22:02Ciara CareyYeah. So having like, yeah, having sort of like a plan to if something happened and not being shocked and kind of left standing still.
- 00:22:11Rob GodfreyYeah, definitely. And so, yeah, things like getting insight into, as I say, secrets now, we kind of prioritize that. So we kind of at least know where secrets are maintained and managed and that sort of thing really helps or will help, we hope, with anything in the future.
- 00:22:27Ciara CareyGreat. So thanks so much. Rob for today. Really appreciate it. And it was great talking to you about this, because I'm sure this can happen to any company, basically. We're nearly well, all the companies we deal with, they have a lot of, we're a SaaS tool that will probably have more than one SaaS tool in their bill pipeline.
- 00:22:46Ciara CareyAnd this will be front of mind for them. And like, maybe it was it's people use this as a time to reevaluate the tooling they are actually using in their bill pipeline. Cool. So [00:23:00] yeah, thank you so much Rob for today and so our next webinar will be next month and I will let you know the details of that and we'll, we'll talk to everybody soon.
- 00:23:10Ciara CareySo thanks again for coming and I'll talk to you soon. Bye bye. Bye thanks.