Security Flashcards
CloudTrail
Console shows past 90 days
Default UI only shows Create, Modify and Delete events
Can create a CloudTrail
Get detailed list of all events you choose, can include events happening at the object level in S3
Can store trail events in S3 for further analysis
Can be region specific or global (IAM etc)
If something is deleted look in CloudTrail
CloudTrail Delivery to S3
- Can enable versioning
- Can use encryption SSE-S3, SSE-KMS
- MFA Delete Protection
- S3 Lifecycle policy (Glacier, IA)
- Object locks to protect from delete or modify
- Can do sha-256 for hashing and signing verifying the content is as expected
CloudTrail delivery notifications
Could be setup through:
- CloudTrail directly sns -> sqs, lambda
- S3 events sns, sqs, lambda
CloudTrail - MultiAccount, Multi Region
For Write need Bucket Policy
For Reads and Gets need either Cross Account role + AssumeRole OR bucket policy
CloudTrail Alerts for API calls
CloudTrail -> CW Logs -> Metric Filter -> CW Alerts -> SNS
Ex:
- Count number of API calls of type or per user
- Detect high number of denied API calls
CloudTrail Speed
Can take 15 minutes to deliver events
- CW events - fastest most reactive, single API call
- Delivery to CW Logs - streamed, aggregated, multiple API calls
- Delivery to S3 - can check integrity, cross account, glacier, more comprehensive (athena)
AWS KMS
AWS manages key for you, integration with IAM for authorization.
Only able to encrypt up to 4KB per call
if > 4KB, use Envelope Encryption using DTK
All API calls recorded to CloudTrail
AWS KMS Acess
- Need Key policy
- IAM policy to allows KMS API calls
AWS KMS CMK
CMK is used to encrypt/decrypt put can never be seen. Can be rotated
KMS keys
Customer Managed
- Create, manage, user, enable/disable
- Rotate, old is kept new added every year
- Key policy
- Leverage for envelope encryption
AWS Managed
- Used by AWS services
AWS Parameter Store
- Securely store configuration and secrets
- Mostly free, seamless KMS integration, serverless
- Version tracing of configurations/secrets
- Can notify of changes via CW events
- Dynamic parameter interpolation for CloudFormation
AWS Parameter Store Paths
- Can retrieve secrets from Secrets manager using parameter store API, using pre-defined special path
- Special paths include retrieving latest ami id
- IAM integration on configuration path level
- GetParameters/GetParametersByPath
AWS Secrets Manager
- Can automatically rotate secrets every X days
- Integration with RDS (admin passwords etc)
- Encrypted with KMS
RDS Security at rest
KMS Encryption at rest for underlying EBS volume/snapshots
RDS Security TDE
TDE for Oracle and Sql Server only