Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Free lesson

Who secures what in the cloud

After this lesson: I can say which security jobs are mine and which are the provider's for a cloud service.

60 min lesson9 commandsCloud lab: practise S3 buckets, SQS queues and DynamoDB tables with the AWS command line

A quick check that you are not a bot, then your own lab opens on the interactive lesson.

Already have an account? Sign in

The provider was not hacked

A small shop keeps its product photos and invoices in a cloud bucket. One morning the invoices turn up on a public website.

Nobody broke into the cloud provider. One setting that belonged to the shop was wrong, and nobody had checked it.

The one rule

Warning

Everything in this module happens in the practice cloud of your own lab. Testing a cloud account you do not own needs the owner's written permission. In the UK, without it, it can break the Computer Misuse Act 1990.

Quick check: the rule

Have a go

Quick check: the rule

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

By the end of this lesson

Note

I can say which security jobs are mine and which are the provider's for a cloud service.

Key words

WordWhat it means
Shared responsibilitysecurity split between the provider and you
Providerthe company that runs the cloud
IaaSrenting machines you look after yourself
PaaSrenting a platform that runs your code
SaaSrenting finished software
Defaultthe setting you get without choosing

The cells students fill in are left blank in this preview.

Starter

Have a go

Starter

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

The provider secures the cloud, you its contents

The provider secures its buildings, hardware and network, and the software behind each service. You secure your data, who can reach it and how each service is set up.

Where the line falls depends on what you rent. Rent a bare virtual machine and you patch its operating system. Rent finished software and you only look after your data and your users.

Who secures each layer

LayerIaaS: a virtual machinePaaS: a code platformSaaS: an email service
DataYouYouYou
Access: who can reach itYouYouYou
ApplicationYouYouProvider
RuntimeYouProviderProvider
Operating system and patchesYouProviderProvider
Network controlsYouProviderProvider
Hardware and buildingsProviderProviderProvider

The cells students fill in are left blank in this preview.

Try it: your layers for one model

Code: python
split = {"iaas": 6, "paas": 3, "saas": 2}
layers = ["data", "access", "application", "runtime",
          "operating system", "network controls", "hardware", "buildings"]
model = "paas"
for at, layer in enumerate(layers):
    who = "you" if at < split[model] else "provider"
    print(layer, ":", who)
# Change model to "saas". Which layers are still yours?

Make a free account to save your work and track your progress.

Check

Have a go

Check

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Your stack plays the provider

Your lab runs MiniStack, a practice copy of S3, SQS and DynamoDB. It plays the provider: you did not build it and you cannot patch it.

It is an emulator. It stores every setting you make and enforces none of them, but the commands and answers are the real ones. Set the made-up key, make the shop's bucket and ask the stack what it runs.

Point the aws command at your stack

Command
export AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test AWS_DEFAULT_REGION=us-east-1 AWS_ENDPOINT_URL=http://cloud:4566

Shown here, not run. Press Start lab to type it into your own lab’s terminal.

Make the shop's bucket

Command
aws s3 mb s3://shop-media

Shown here, not run. Press Start lab to type it into your own lab’s terminal.

Ask the stack which services it runs

Command
curl -s http://cloud:4566/_ministack/health

Shown here, not run. Press Start lab to type it into your own lab’s terminal.

What did the new bucket come with?

Each of the next three Runs asks the bucket for one setting: block public access, encryption at rest and versioning. Read each answer before the next.

Ask for block public access

Command
aws s3api get-public-access-block --bucket shop-media

Shown here, not run. Press Start lab to type it into your own lab’s terminal.

Ask for default encryption

Command
aws s3api get-bucket-encryption --bucket shop-media

Shown here, not run. Press Start lab to type it into your own lab’s terminal.

Ask for versioning

Command
aws s3api get-bucket-versioning --bucket shop-media

Shown here, not run. Press Start lab to type it into your own lab’s terminal.

Your stack and AWS compared

SettingWhat your stack printedA new bucket on AWS
Block public accessNoSuchPublicAccessBlockConfigurationAll four parts on, since April 2023
Default encryptionServerSideEncryptionConfigurationNotFoundErrorSSE-S3, since January 2023
VersioningNothing at allOff

The cells students fill in are left blank in this preview.

A common mistake

Warning

Many people think the provider keeps their data safe because it is in the provider's cloud. The provider secures the service, and the settings are yours. Read every setting yourself, because defaults differ between services, years and emulators.

Check

Have a go

Check

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Set your half, then read it back

Turn on default encryption and versioning for the bucket. Versioning keeps old copies, so a deleted or overwritten photo can come back. Then read both settings back, because a setting you have not read is a guess. Lesson 3 adds block public access.

Turn on default encryption

Command
aws s3api put-bucket-encryption --bucket shop-media --server-side-encryption-configuration '{"Rules":[{"ApplyServerSideEncryptionByDefault":{"SSEAlgorithm":"AES256"}}]}'

Shown here, not run. Press Start lab to type it into your own lab’s terminal.

Turn on versioning

Command
aws s3api put-bucket-versioning --bucket shop-media --versioning-configuration Status=Enabled

Shown here, not run. Press Start lab to type it into your own lab’s terminal.

Read both settings back

Command
aws s3api get-bucket-encryption --bucket shop-media --query 'ServerSideEncryptionConfiguration.Rules[0].ApplyServerSideEncryptionByDefault.SSEAlgorithm' --output text && aws s3api get-bucket-versioning --bucket shop-media --output text

Shown here, not run. Press Start lab to type it into your own lab’s terminal.

Check your half on a schedule

Anybody with the right access can undo a setting you fixed once. So a team writes its half of the split down as checks and runs them every day.

On AWS, AWS Config rules and Security Hub run checks like these. In lesson 6 you write your own posture check over your stack.

Assignment: whose layer is it?

Turn the table of layers into code a team could check against.

customer_layers(model) gives your layers for "iaas", "paas" or "saas", top first. who_secures(layer, model) answers "customer" or "provider". gaps(model, done) lists your layers that are not in done, in the order of LAYERS.

Code: python
LAYERS = ["data", "access", "application", "runtime", "operating system",
          "network controls", "hardware", "buildings"]
CUT = {"iaas": 6, "paas": 3, "saas": 2}


def customer_layers(model):
    # The layers you secure for this kind of service, top first.
    return []


def who_secures(layer, model):
    # "customer" or "provider".
    return "provider"


def gaps(model, done):
    # Your layers that are not in done, in the order of LAYERS.
    return []

Make a free account to save your work and track your progress.

Exit quiz

Have a go

Exit quiz

5 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Teaching a class? Set this module for your students with a teacher guide, marked assignments and a lab for every student.