Security Flashcards
How do kms and cloudtrail work together?
With cloudtrail you are able to audit every KMS key usage.
What is a kms symmetric key?
Same key is used to encrypt and decrypt data
AWS Services integrated with KMS use symmetric keys
What is a kms asymmetric key?
2 keys. Public key to encrypt, private key to decrypt data.
For cases when you encrypt data outside of aws and then receive data.
What types of keys does aws kms have?
AWS Owned keys: Free default keys. (these are the service owned keys like SSE-S3, SSE-SQS, SSE-DDB),
AWS Managed keys: Free (these are the kms managed keys that services use like SSE-KMS in s3: example: aws/servicename)
Customer Managed Keys created in KMS: 1$ per month
Customer Managed Keys imported (external): 1$ per month
What is automatic key rotation?
AWS KMS managed keys rotate automatically every 1 year.
For AWS KMS Customer managed keys created in kms, you can enable it and its a custom period.
For external keys only manual possible. Cause KMS cant rotate them.
What happens to encrypted EBS volumes when copied to another region?
KMS re encrypts the volumes with a different key.
Keys are regional.
What are kms key policies?
Define who can access and administer your kms keys
Only for customer managed kms keys. For default keys everyone has access as long as they have iam permissions.
You have cross account access to kms keys.
Why would you need cross account access to a KMS Key?
For copying encrypted snapshots across accounts.
What are muti region keys?
KMS Keys that are replicated from the origin region to other regions.
Ending up with the same identical key in multiple regions.
Not global, 1 master key and many replica keys. Each replica key is managed independently.
Great to be able to decrypt data from other regions.
Great to lower latency decryption when using encrypted global databases. Or encrypted columns.
How does encryption behave with s3 replication?
There is decryption and re-encryption with object replication across regions.
What is SSM parameter store?
Its a secure storage for your configurations and secrets.
You use it by creating parameters with the written text of your data. And you can encrypt them if you want.
You can access these parameters with get commands from the cli, and with lambda functions if you have the correct iam permissions for the lambda function.
What is AWS Secrets Manager?
For storing secrets or passwords. You can force rotation of secrets every x number of days.
You can also force generation of secrets on rotations, with lambda. Meaning automatically renew passwords.
Secrets can be encrypted with kms
Which services does secrets manager integrate with?
DBs like RDS, aurora, documentdb, redshift, etc can use secrets manager for you databases user and passwords.
You create a user and secret and specify for which db service you want it, and then choose the database. Now you will be able to access the database with these credentials, and you have secrets manager features like encryption and automatic rotation.
Which server is integrated with RDS and Aurora, or other databases to store users and secrets of your databases?
AWS Secrets Manager
What is a Secrets Manager feature?
You can replicate secrets across regions.
A use case is with read replicas, you can promote a read replica secret to a standalone secret when you need to do disaster recovery in your RDS database.
This is also great for multi region apps, disaster recovery strategies, multi region DBs.
What is AWS Certificate Manager? (ACM)
Provision, manage, and deploy TLS Certificates
Supports creation of both public and private TLS Certificates, for free, for your aws resources.
Supports importing external certificates, with no automatic renewal.
ACM Public Certificates can be used with ALB, NLB, Cloudfront Distributions, APIs on API Gateway and Elastic Beanstalk.
You can’t use public ACM Certs with EC2 instances.
Whats are the differences between AWS Certificate manager (ACM) certificates and traditional CA certificates like DigiCert?
There is no difference in functionality.
AWS CM Public Certificates are free, but limited to specific aws services.
What is a great advantage of AWS Certificate Manager owned Certificates when renewing them?
They are renewed automatically and installed automatically too thanks to ACM being integrated with these services: ALB, NLB, Cloudfront Distributions, APIs on API Gateway, elastic beanstalk.
You don’t need to worry about installing the new certificate.
How does the ALB integration with ACM work?
Requests made with HTTP to your ALB, are redirected to HTTPS by the ALB which has this option. And then the connection will leverage the TLS certificate coming from the ACM. Then the request will be redirected to the target group.
What is AWS WAF?
Web Application Firewall:
Protects your web apps from common web exploits. In layer 7 HTTP.
What are the possible targets of WAF?
ALB
API Gateway
CloudFront (http cache endpoint)
AppSync GraphQL API (Web apis)
Cognito User Pool (web and mobile app authentication)
Can you deploy WAF on an NLB?
No. WAF if for layer 7 protection, so you can only deploy it in the ALB load balancer. NLB is layer 4.
What options do you have for WAF firewall configurations?
You can define web ACLs, based on http headers, body, URI strings.
You can block countries
DDOS protection by counting number of requests and blocking ips if they go over a specified number of requests per second.
All of this to protect against HTTPS attacks, these attacks could be SQL injections, cross site scripting.