Right Tool, Right Job: Tags and the CMDB for Attribution¶
Your scanner just told you a server is running an outdated version of TLS. Whose server is it? Is it production? Is it facing the internet? If you can't answer that in a minute, you're doing archaeology, not security.
The usual answer is "check the CMDB". In my experience that rarely works. The CMDB isn't bad, we're just using a chainsaw for surgery. I'll walk you through why, and what to pick up instead.
What is attribution, anyway?¶
In security reporting, attribution is assigning dimensions to the resources we measure. Who owns it, how important is it, is it production, is it exposed. Those dimensions help us prioritise, and they tell us who to chase when something needs fixing.
Why do I keep reaching for the CMDB?¶
Let's take a step back. We have a security reporting tool, and it measures how well our controls work across the enterprise. Very quickly we can tell which servers have been backed up, which workstations need their EDR (Endpoint Detection and Response) agent updated, and which websites are running an outdated version of TLS.
What we really need to know is which of these systems are production, which are internet facing, and which are our crown jewel applications (the ones the business can't live without).
I can hear the GRC (governance, risk and compliance) people at the back screaming: "Use your CMDB!" (the Configuration Management Database, the register of everything we own). Right... I have, and it kept letting me down. Here's why.
It is out of date¶
There is just something about maintaining a CMDB that gets out of hand. Teams are good at deploying it, but not so good at keeping it current. It's usually accurate on go-live day, assuming the process is rigorous enough.
After that, servers change, things get moved around, workloads migrate from one cloud to another, modernisation kicks in, name your pick. All of it causes drift, and your CMDB stops reflecting reality.
One system, many names¶
The same thing goes by a lot of different names. Say we have our corporate ecommerce application. Our asset register lists it as "ECommerce Platform". It has an owner, it's flagged as production, and hopefully it also says whether it's in scope for PCI (the payment card industry standard).
But that "ECommerce Platform" has a few other names out there:
- If you're using an EASM (External Attack Surface Management) tool, your system may know it as
https://www.example.com - If you're using an EDR tool, your system may know it as
HOSTNAME - If you're on AWS (as an example), depending on your context, the system is known as
i-0a7f3c91e5d24b86f,ec2-203-0-113-47.ap-southeast-2.compute.amazonaws.com, orip-10-20-4-117.ap-southeast-2.compute.internal(see how AWS builds its hostnames)
Here's what that looks like from the CMDB's side of the fence.
flowchart LR
A["EASM tool
https://www.example.com"] --> P
B["EDR tool
HOSTNAME"] --> P
C["AWS instance ID
i-0a7f3c91e5d24b86f"] --> P
D["AWS public DNS
ec2-203-0-113-47.ap-southeast-2.compute.amazonaws.com"] --> P
E["AWS private DNS
ip-10-20-4-117.ap-southeast-2.compute.internal"] --> P
P(["ECommerce Platform"])
Five names, one application. None of these tools are wrong, they're each describing the same system from their own point of view. But unless something ties i-0a7f3c91e5d24b86f back to "ECommerce Platform", your CMDB has no idea that the finding belongs to your crown jewel application.
One thing shows up as many¶
Naming gets worse when one thing shows up as many. Some systems have multiple IP addresses, so your scanner picks up several systems when in reality they're all the same thing. The same thing is measured in different ways by different tools, and suddenly one server looks like three in your report.
One application, many parts¶
And let's not forget everything else. That application will have a load balancer, a database, maybe some S3 storage for backups, a couple of Fargate containers, who knows. They're all part and parcel of the same application.
We have the application neatly articulated in our CMDB, yet the components that make it up are not uniformly catalogued, so we just don't know about them.
A chainsaw and a scalpel¶
Let me be fair to the CMDB. Both a chainsaw and a scalpel can cut, but they do it in completely different ways. The CMDB and resource tags are the same. Both can tell you what something is and who it belongs to, and they don't work against each other. They're just built for different jobs.
| CMDB (the chainsaw) | Tags (the scalpel) | |
|---|---|---|
| Where it lives | In a register, away from the resource | On the resource itself |
| Who keeps it current | People, after the fact | The deployment, as the resource is built |
| Good for | The big picture of applications and owners | Pinpointing exactly which resource belongs to what |
You wouldn't take a chainsaw into an operating theatre. Attribution is surgery. We're cutting one finding out of thousands of resources and handing it to exactly the right person, and that takes the sharper tool.
So where should attribution come from?¶
In the cloud world, tagging is the de facto solution for attribution, yet we keep drifting back to the CMDB as the data source. AWS's own tagging best practices frame tags as a way to track which resources belong to which application, and its Well-Architected guidance calls a standard tagging and attribution strategy the foundation for cost allocation, governance and security. In reality, your resource tags should identify the project, and the CMDB should supply the business detail behind it.
I don't think we'll ever get rid of the CMDB, and we shouldn't. The chainsaw still has plenty of work to do. I do think its shape needs to change. The big challenge is the business perception of information assets, and the core components deployed to make up that asset.
Cloud architecture guidance tells you to tag your resources, and I reckon it's "the" way to manage attribution. So start tagging your resources! It's really not that hard.
- If you're a click ops shop, include the tags every time you touch a resource. You can even write some CLI commands to do it for you.
- If you're using Terraform, it's really straightforward to add tags to your resources.
Once the tags are there, a finding finds its own way home.
flowchart LR
F["Finding
outdated TLS on a server"] --> R["The resource"]
R --> T["Its tags
project_id, impact, crown_jewel, owner"]
C["The CMDB
project 1234"] -.->|"sync"| T
T --> O["Right owner
right priority"]
Where does the CMDB fit back in?¶
Tagging doesn't replace the CMDB. It gives the CMDB something to hang on to.
The tag on the resource carries a project_id, and that ID is the relationship back to the CMDB. The tag does the pinpointing, so we know exactly which application this resource belongs to. The CMDB holds the business logic for that application: how critical it is, whether it's a crown jewel, who owns it.
Then we can sync those fields from the CMDB back onto the tags. That way the cloud and security teams have the right information on hand when they need it. It sits on the resource itself, so nobody has to go and ask the CMDB.
The two tools each do the job they're good at. The chainsaw does the big, structural work, and the scalpel does the precision cuts. When the business changes its mind about how important an application is, we change it once in the CMDB, and that change can flow out to every resource tagged to that project.
And if you don't have a CMDB at all? Don't wait for one. Your tags can become your CMDB.
What should we put in a tag?¶
Before we go crazy and tag a bunch of stuff, the important bit is the schema. What tags do we care about, and what data do we need? If we have a location tag, and people can enter Head Office, Melbourne, MEL or HQ, all meaning the same thing, we're in trouble. We have to be able to enforce rules on certain fields.
So let's define a schema we want to enforce. Not every field is typed in by hand. Fields like impact and crown_jewel can be synced from the CMDB. Here's a working example you can start with (and I'll keep updating it as folks tell me what works in their environment).
| Field | Required | Field Type | Description |
|---|---|---|---|
project |
✅ | text |
The application title as it is recorded in the CMDB |
project_id |
✅ | integer |
The project id for the CMDB |
business |
✅ | enum |
A list of valid business units, like ['Sales','Marketing','Accounting','HR'] |
crown_jewel |
true / false |
A simple true field indicates that this is a crown jewel. Default to false if not set. |
|
internet_facing |
true / false |
A simple true field indicates that this asset is reachable from the internet. Default to false if not set. |
|
impact |
✅ | enum |
A list, typically ['critical','high','medium','low'] that defines how important this asset is to the organisation. |
owner |
✅ | hierarchy |
Another enum, but a lookup against the org structure, so we know that Accounting and Accounts Payable are part of the same team. |
pci |
true / false |
Defines if the asset is in scope for PCI assessment. Default to false if not set. |
If you'd rather have something a machine can read, here's the same schema as YAML:
tags:
project:
required: true
type: text
description: The application title as it is recorded in the CMDB
project_id:
required: true
type: integer
description: The project id for the CMDB
business:
required: true
type: enum
values: [Sales, Marketing, Accounting, HR]
description: The business unit that the asset belongs to
crown_jewel:
required: false
type: boolean
default: false
description: Indicates that this asset is a crown jewel
internet_facing:
required: false
type: boolean
default: false
description: Indicates that this asset is reachable from the internet
impact:
required: true
type: enum
values: [critical, high, medium, low]
description: How important this asset is to the organisation
owner:
required: true
type: hierarchy
description: A lookup against the org structure that defines who owns the asset, so teams roll up to the same parent (Accounting and Accounts Payable, for example)
pci:
required: false
type: boolean
default: false
description: Defines if the asset is in scope for PCI assessment
This is just a suggestion, so adjust it any way you like. The idea is to get the various teams involved, because each of them needs something different from a tag:
- Cost
- IT Operations
- Security
- Compliance
How do we keep the tags honest?¶
A schema is only useful if people follow it. There are two ways to make sure they do:
- Enforce it in your CI/CD pipeline. A resource with missing or invalid tags gets stopped before that module makes it to production.
- Run a report against all your tags, to see how they line up with the schema. This one catches what's already out there, including things deployed by hand.
Use the pipeline to stop new problems, and the report to find the old ones.
How bad is "critical"?¶
I find impact is not always well understood, so let's align on a definition. Impact is how much it would hurt the organisation if this asset went down or got compromised. Think of your CIA (confidentiality, integrity and availability). Typically the impact is the highest of the three.
This table should give you an idea of how to calibrate it.
| Impact | Pain felt within | Who is woken up | Area impacted |
|---|---|---|---|
critical |
Within an hour | CEO / Board | Entire Company |
high |
Within a day | CISO | Single Site |
medium |
Within a week | Head of unit | Single team |
low |
Within a month | Technical team | Single individual |
Tagging is the key. Get the tags right, and the next time a scanner flags that outdated TLS, nobody has to dig through a spreadsheet to find out whose problem it is.