Grokking the Solutions Architect Interview
Vote

0% completed

​

Identity and Security Foundations

Shared Responsibility

Identities, Roles, and Policies

Temporary Credentials

Accounts and Guardrails

Encryption and Secrets

Audit Logs

Compliance Frameworks

Using This in an Interview

Key Takeaways

Practice Questions

Title image: a long-lived key with administrator rights above a role whose credentials allow one action and expire within hours, with the role highlighted in green.
Title image: a long-lived key with administrator rights above a role whose credentials allow one action and expire within hours, with the role highlighted in green.

The retailer's order service needs permission to write order records into cloud storage. One engineer creates a secret key for it, gives the key full administrator rights, and saves it in a configuration file in the code repository. The key never expires, so it works until someone deletes it.

A second engineer gives the same service a role instead. The service receives a short-lived key automatically, the platform replaces the key every few hours, and the key allows only one action: writing orders. If either key leaks, the first one gives access to the whole cloud account, while the second one allows one action for a few hours at most.

Only the second design limits the damage of a mistake. This lesson explains the security foundations behind that choice and how an SA applies them in a customer design.

Shared Responsibility

In the cloud, the provider secures the platform, and the customer secures what it builds on the platform. AWS calls this the shared responsibility model: the provider is responsible for security of the cloud, and the customer for security in the cloud.

The division between the two depends on the type of service. On a rented virtual server, the customer installs the security fixes (patches) for the operating system. On a managed database, the provider patches the database software, but the customer still decides who may connect and whether the data is encrypted.

Who secures each layer for three service types: the provider is responsible for more layers as services become more managed, and the customer always secures data, identities, and access rules.
Who secures each layer for three service types: the provider is responsible for more layers as services become more managed, and the customer always secures data, identities, and access rules.

Two layers always stay with the customer: the customer's data and the decisions about who can reach it. Many cloud security incidents start in those layers, with a wrong permission or a leaked key.

Identities, Roles, and Policies

Every request to a cloud platform is made by an identity, and a policy decides whether the request is allowed. An identity is anything that can make a request: a person, or a program such as the order service. A policy is a document that lists which actions an identity may perform on which resources.

A role is an identity with no permanent password or key. A person or a program takes on the role for a limited time and receives the role's permissions during that time.

Least privilege means that each identity receives only the permissions its task needs. The policy below lets the retailer's image upload service read and write files in one bucket, a named container in the S3 object storage service, and nothing else. A real AWS policy also states a version line, which is left out here.

{ "Statement": [ { "Effect": "Allow", "Action": ["s3:GetObject", "s3:PutObject"], "Resource": "arn:aws:s3:::retailer-product-images/*" } ] }

AWS denies every action that no policy allows, so the service cannot delete images or read the order database.

Temporary Credentials

Leaked long-lived keys are a common cause of cloud security incidents, so designs use temporary credentials instead. Temporary credentials are keys that the platform issues for a short period, such as one hour, and then rejects.

Programs receive them through a role attached to their server, container, or function. People sign in through the company's central login system and then take on a role.

Accounts and Guardrails

Large customers split their workloads across many accounts, because an account is the strongest boundary between workloads. An account is a container for cloud resources with its own bill and its own permissions. A mistake in the test account cannot change production unless a policy allows it.

For the retailer, the SA proposed separate accounts for production, testing, shared networking, and security logs.

An organization of accounts can also carry guardrails: rules set at the top of the organization that no account can override. In AWS Organizations, these are service control policies. One common guardrail stops anyone from turning off audit logging. Another allows resources only in the regions that the company has approved. A region is a geographic area where the provider runs several availability zones.

Encryption and Secrets

Data should be encrypted in two states: at rest, when it is stored, and in transit, when it moves across a network. Encryption in transit usually means TLS, the protocol behind HTTPS. Encryption at rest is a setting on most managed storage services.

The encryption keys themselves are stored in a key management service, such as AWS KMS. It stores keys, controls who may use them, and records every use. A person who copies a disk but has no permission to use its key cannot read it.

A secret is a password, an API key, or a database connection string. Secrets belong in a secrets store, such as AWS Secrets Manager, and never in code or configuration files. The retailer's online store reads its database password from Secrets Manager when it connects, and Secrets Manager changes that password every 30 days with no code change.

Audit Logs

An audit log records requests made to the platform: who made each one, what they did, and when. On AWS, this log comes from CloudTrail. By default, it records management actions, such as creating or changing a resource. Reads and writes of single files must be turned on separately. The logs should be copied to a separate security account, so that an intruder in production cannot delete the record.

Compliance Frameworks

A compliance framework is a set of security rules that a law or an industry body requires for certain data. An SA should know when each common framework applies:

FrameworkApplies toDesign effect
PCI DSSSystems that store, process, or transmit payment card dataStrict network separation, logging, and yearly assessment of every system in scope
HIPAAHealth information in the United StatesEncryption, access controls, audit logs, and a signed agreement with the provider
GDPRPersonal data of people in the European UnionLimits on moving data outside the EU, and rights to access and deletion

GDPR does not require that all data stay in the EU, but it restricts transfers abroad. Many customers therefore choose to keep personal data in an EU region, which is called data residency.

The retailer's case shows why this matters early. Card payments go through an outside payment provider, so card numbers never enter the retailer's systems. The checkout page still sends the customer to the payment provider, so it remains in a small PCI DSS scope, but the order database does not. The retailer does hold customers' names, addresses, and order histories, so only the order service and two administrator roles may access the order database.

Using This in an Interview

In a design round, state the identity model, encryption, logging, and compliance scope in a few sentences instead of leaving security for the end.

"Every service runs with its own role and gets temporary credentials, so there are no stored keys. Production, testing, and logs are in separate accounts, and a guardrail stops anyone from disabling the audit log. Data is encrypted at rest with keys in the key management service and in transit with TLS. Card data stays with the payment provider, which keeps the order database out of PCI DSS scope."

Expect two follow-up questions:

  • "A developer needs production access to fix an incident. What do you do?" Give them a role that grants access for a few hours, requires approval, and is recorded in the audit log.
  • "How would you find permissions that are broader than needed?" Compare each policy with the actions that the audit log shows were used, and remove the rest.

Key Takeaways

  • The provider secures the platform; the customer always secures its data, identities, and access rules.
  • Each identity gets a policy with only the permissions its task needs.
  • Temporary credentials through roles replace long-lived keys.
  • Separate accounts with guardrails limit the damage of a mistake, and audit logs belong in a separate account.
  • Compliance frameworks change the design, so find out early which data falls under which rule.

The next lesson, Availability, Disaster Recovery, and Observability, shows how to keep these systems running when parts of the platform fail.

Practice Questions

1. A customer's database runs on a managed service. Who is responsible for deciding who can connect to it?

<details><summary>Show answer</summary>

The customer is responsible. The provider patches the database software and runs the hardware, but access rules and encryption settings are always the customer's decisions.

</details>

2. Why is a temporary credential safer than a permanent access key with the same permissions?

<details><summary>Show answer</summary>

Because a leaked temporary credential stops working within its short lifetime. A permanent key works until someone notices the leak and deletes it. The temporary credential also never needs to be stored in code or configuration.

</details>

3. The retailer stores no card numbers. Why is its checkout page still in PCI DSS scope?

<details><summary>Show answer</summary>

Because the page sends customers to the payment provider and could be changed to send them elsewhere. The scope is much smaller than for a system that stores card numbers, but the page that starts the payment must still be protected and reviewed.

</details>

Reading Progress

0%


Vote for new content

On This Page

Shared Responsibility

Identities, Roles, and Policies

Temporary Credentials

Accounts and Guardrails

Encryption and Secrets

Audit Logs

Compliance Frameworks

Using This in an Interview

Key Takeaways

Practice Questions