IaaS, PaaS & SaaS

IaaS, PaaS & SaaS in DevOps Tools: Every cloud service hands you a different amount of a running system and keeps the rest for itself.

Every cloud service hands you a different amount of a running system and keeps the rest for itself. Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS) are three points on that spectrum, and the most consequential thing to learn about them is not what the provider gives you -- it is what the provider quietly leaves in your hands. This lesson builds a small, runnable model of the shared-responsibility split so the boundary becomes arithmetic instead of a slogan.


The Analogy: The Laundry-Service Spectrum

Picture a coin-operated launderette on a high street. The owner supplies the building, the plumbing, the electricity, and a row of industrial washers and dryers, and everything past that point is yours. You carry in your own clothes, sort the whites from the colours, choose the water temperature, measure the detergent, start the cycle, and come back to move the load before someone else claims the machine. If a washer breaks the owner repairs it, but if you tip a red sock into a white load the owner has no part in the result. This is Infrastructure as a Service: the provider keeps the heavy plant running and rents you raw capacity, and every operational decision above the bare machine is still yours to make and yours to get wrong.

A few doors down is a fluff-and-fold service. You walk in with a bag of laundry, write your name and a note on a ticket -- cold wash, no tumble dry on the wool -- and leave. Staff behind the counter operate the machines, pick the cycles, and fold everything into a neat parcel for collection, and you never touch a dial. What you still own is narrow but total: the clothes themselves and the instructions on the ticket. If the ticket says the wrong thing, or you handed over a garment that should never have gone in, the outcome is on you. This is Platform as a Service: the provider runs the machinery and the operating routine, and you supply only the payload and its configuration.

Across town a restaurant uses neither launderette nor drop-off. It subscribes to a linen-rental company. Clean tablecloths and napkins simply arrive on a schedule, soiled ones are collected, and no one at the restaurant ever sees a washing machine or chooses a cycle. The restaurant's only decisions are how many linens to order, in which sizes, and who on staff is allowed to change the standing order. This is Software as a Service: the provider owns and operates the entire production, and the customer is left with account settings, the data they feed in, and the question of who holds the keys to the account.

Here is the part that catches people. Move all the way to the fully-managed linen service and it is tempting to believe you have handed over every responsibility, but you have not. If you phone in the wrong size and dress every table in oversized cloths, the rental company did exactly what you asked. And if you tape your account number and password to the staff notice board, a stranger can redirect the delivery to their own address and the company will honour it, because they have no way to know the request was not yours. The two things you can never delegate, at any tier, are what you put into the service and who is allowed to act as you. Cloud shared-responsibility works the same way: the higher the tier, the more the provider operates, but your data and your access controls never leave your side of the counter.


Syntax or Core Structure

The three models differ only in where the line falls between provider-operated and customer-operated layers of a single stack. Model that stack as a list, from the physical machines at the bottom up to access control at the top, and record who operates each layer at each tier. A small resolver can then answer the only question that matters day to day: at this tier, which layers am I still responsible for? The dictionary below is the whole mental model in one place.

LAYERS = ['physical', 'network', 'os', 'runtime', 'app', 'data', 'access']
OWNER = {
    'IaaS': {'physical': 'provider', 'network': 'provider', 'os': 'customer',
             'runtime': 'customer', 'app': 'customer', 'data': 'customer', 'access': 'customer'},
    'PaaS': {'physical': 'provider', 'network': 'provider', 'os': 'provider',
             'runtime': 'provider', 'app': 'customer', 'data': 'customer', 'access': 'customer'},
    'SaaS': {'physical': 'provider', 'network': 'provider', 'os': 'provider',
             'runtime': 'provider', 'app': 'provider', 'data': 'customer', 'access': 'customer'},
}

for tier in ['IaaS', 'PaaS', 'SaaS']:
    owned = [layer for layer in LAYERS if OWNER[tier][layer] == 'customer']
    print('%s: customer operates %d of %d layers' % (tier, len(owned), len(LAYERS)))
    print('  ' + ', '.join(owned))

Output:

IaaS: customer operates 5 of 7 layers
  os, runtime, app, data, access
PaaS: customer operates 3 of 7 layers
  app, data, access
SaaS: customer operates 2 of 7 layers
  data, access

Read the result from the top down. At IaaS you still operate five of the seven layers, so most of the work -- and most of the risk -- is yours. At PaaS the provider absorbs the operating system and the runtime, leaving you three layers. At SaaS you operate only two. But notice which two survive all the way to the bottom of the list: data and access. They never move to the provider column, and the rest of this lesson is about why that single fact decides who is at fault when something leaks.


Technical Depth: The Shared-Responsibility Matrix

The canonical division of labour

Every major provider publishes a version of the same picture: a stack of layers with a line drawn through it. Below the line the provider operates; above the line the customer operates. Moving from IaaS to SaaS slides that line upward, handing more layers to the provider, but it never erases the top two rows from your column. The matrix below is the compact form every architecture review should start from.

Stack layerIaaSPaaSSaaS
Physical hardwareProviderProviderProvider
Networking fabricProviderProviderProvider
Operating systemCustomerProviderProvider
Language runtimeCustomerProviderProvider
Application codeCustomerCustomerProvider
DataCustomerCustomerCustomer
Access controlCustomerCustomerCustomer

The line that never moves

The bottom two rows of that table are an invariant, not a default you can renegotiate. No provider will decide, on your behalf, that a storage bucket should be private, that an API key should be rotated, or that a departing employee should lose access. Those are your decisions at every tier, so it is worth asserting the invariant directly rather than trusting the eye to scan a table.

# LAYERS and OWNER as defined in the first block
always = ['data', 'access']
for tier in ['IaaS', 'PaaS', 'SaaS']:
    print('%s: data=%s  access=%s' % (tier, OWNER[tier]['data'], OWNER[tier]['access']))
all_customer = all(OWNER[t][layer] == 'customer' for t in OWNER for layer in always)
print('customer owns data+access in every tier: %s' % all_customer)

Output:

IaaS: data=customer  access=customer
PaaS: data=customer  access=customer
SaaS: data=customer  access=customer
customer owns data+access in every tier: True

The check passes for every tier, and that is the whole point: the model refuses to let data or access slide into the provider column no matter how managed the service is. When someone says a SaaS vendor "handles security", they mean the vendor secures the layers it operates. The encryption of your records, the rules for who can read them, and the strength of your credentials remain your job, which is exactly the surface the next section attacks.


Real World Example: Attributing a Cloud Data Breach

A set of customer records leaks from a SaaS application: a data export was left publicly reachable and an old set of credentials was reused to reach it. In the post-incident meeting someone reaches for the intuitive rule -- the provider runs almost the entire stack at SaaS, so surely the provider is at fault. The program below makes that argument explicit and then contrasts it with the rule the shared-responsibility model actually implies, so the disagreement is printed rather than argued.

The naive attributor counts layers: whoever operates the majority of the stack owns the incident. The correct attributor ignores the count and asks a narrower question -- in which layer did the breach actually occur, and who operates that layer at this tier?

# LAYERS and OWNER as defined in the first block
tier = 'SaaS'
breach_layers = ['data', 'access']       # a public export plus reused credentials

prov = sum(1 for layer in LAYERS if OWNER[tier][layer] == 'provider')
cust = sum(1 for layer in LAYERS if OWNER[tier][layer] == 'customer')
naive_blame = 'provider' if prov > cust else 'customer'   # blame the majority operator

owners = sorted(set(OWNER[tier][layer] for layer in breach_layers))
correct_blame = owners[0] if len(owners) == 1 else 'shared'

print('tier: %s   provider-operated layers: %d   customer-operated layers: %d' % (tier, prov, cust))
print('breach occurred in layers: %s' % ', '.join(breach_layers))
print('naive (blame the majority operator): %s' % naive_blame)
print('correct (blame the layer owner): %s' % correct_blame)
print('naive and correct agree: %s' % (naive_blame == correct_blame))

Output:

tier: SaaS   provider-operated layers: 5   customer-operated layers: 2
breach occurred in layers: data, access
naive (blame the majority operator): provider
correct (blame the layer owner): customer
naive and correct agree: False

The two rules disagree, and the disagreement is the lesson. The naive rule sees the provider operating five of seven layers and concludes the provider is responsible; the correct rule notes the breach lived in the data and access layers, which the customer owns at every tier, and concludes the customer is responsible. In real incidents this is not academic: open storage buckets, over-broad access policies, and reused keys are the leading causes of cloud data loss, and all three sit squarely in the two rows that never leave the customer column. A provider being certified and compliant secures none of them, because the provider never operated them.

The design flaw in this code is deliberate and worth naming, because it is the same flaw a real on-call engineer reaches for under pressure. The naive rule decides fault by majority-of-stack ownership, a quantity that is completely invariant under where the breach actually happened. Feed it any SaaS incident at all and it returns provider, whether the true cause was a provider outage or a customer leaving a bucket world-readable. Because the count never looks at the breach layers, it cannot distinguish the one case from the other. The correct rule is better but still a teaching model: it assumes each layer has exactly one owner, when managed databases and serverless runtimes deliberately blur the line; it cannot express a provider bug that breaches a customer-owned layer; and it collapses responsibility into a single label when encryption, auditing, and incident response are themselves split across the boundary. Use it to find where the default line sits, then read your actual contract for the negotiated edges.


Common Mistakes

  1. Assuming a higher tier means less security work. Moving to SaaS shrinks the number of layers you operate, but the two layers most often breached -- data and access -- stay with you. The workload changes shape; it does not disappear.
  1. Believing the provider backs up your data. Most managed services guarantee the availability of their platform, not the recoverability of your content. An accidental delete or a bad migration is usually yours to restore from a backup you were responsible for taking.
  1. Confusing security of the cloud with security in the cloud. The provider secures the facilities, hardware, and managed services; you secure what you build and store on top. Treating the first as if it covered the second is how open buckets happen.
  1. Leaving storage or databases publicly reachable on PaaS and SaaS. The convenience of a managed data store tempts teams to skip network and access hardening, on the assumption the platform handles it. The platform serves whatever you configure, including public.
  1. Mistaking PaaS for SaaS. A platform still runs your code and your data model, so you own the application layer and its bugs. Only a finished SaaS product removes the application layer from your column.
  1. Forgetting that access control is always yours. Identity, permissions, key rotation, and offboarding are customer responsibilities at every tier. No provider revokes a departed employee's token for you.
  1. Reaching for IaaS to be safe. Operating the OS and runtime yourself adds patching, hardening, and monitoring work that a managed tier would absorb. More control is also more responsibility, not automatically more safety.
  1. Ignoring the data-residency and compliance line. Where your data physically lives and which regulations apply to it remain your obligation even on a fully managed service. The vendor's certifications do not transfer their scope to your data.
  1. Attributing incidents by who operates the most layers. As the example showed, majority-of-stack ownership is invariant under the actual cause of a breach. Fault follows the layer the incident occurred in, not the size of anyone's column.

Best Practices

  • Start every design by drawing the shared-responsibility line for the specific service you are using, and list explicitly which layers land in your column.
  • Treat data and access control as permanently yours: encrypt at rest and in transit, default storage to private, and rotate credentials on a schedule regardless of tier.
  • Choose the highest tier that still meets your control needs, so the provider absorbs the layers you have no reason to operate yourself.
  • Read the provider's shared-responsibility document for each managed service, because the line moves between services from the same vendor.
  • Automate access offboarding so that a departing person loses every credential at once, rather than relying on a manual checklist.
  • Take and test your own backups of anything a managed service stores for you, and confirm you can restore them without the vendor's help.
  • Record where regulated data resides and which region processes it, and verify that the managed service honours those constraints.
  • Run incident post-mortems against the layer the breach occurred in, not against a headcount of who operates more of the stack.

Practice Exercises

  1. Extend the OWNER model with a fourth column for an on-premises deployment where the customer operates every layer, then print how many layers the customer owns at each of the four tiers and confirm the counts decrease from on-prem through to SaaS.
  1. Write a function responsible_for(tier, layer) that returns the operator of a given layer at a given tier, and use it to prove that data and access both return customer for all three cloud tiers.
  1. Model a managed-database service as a tier where the runtime is shared: mark the runtime layer as shared and adjust the breach attributor to report shared when a breach layer is not owned by exactly one party.
  1. Given a list of real incidents each tagged with the layer it occurred in, write a report that groups them by responsible party at SaaS and prints what fraction fall in the customer-owned data and access layers.