Table of Contents
01. AWS 보안 및 인증 서비스
(01) 왜 필요할까 ?
- 보안
어플리케이션은 기본적으로, 외부의 침입이나, 데이터의 유출을 방지 해야한다. - 인증
서비스에 접근하려면 기본적으로 승인된 사용자들의 접근 만을 허용 해야한다. 이를 위해 사용자들을 인증 하고 권한을 제한 하는 작업이 필요 하다.
(02) 데이터 보호 서비스
- Amazon Macie
민감한 데이터를 보호하고 검색하도록 도와주는 서비스 - AWS KMS
암호화된 키를 보관하고 관리하는 서비스 - AWS CloudHSM
하드웨어 기반 키 보관 서비스 - AWS Certificate Manager
서버를 증명하거나 HTTPS 통신을 위해 사용되는 TLS, SSL 등의 인증서를 등록하고 관리하는 서비스 - AWS Secrets Manager
DB 패스워드나 외부 노출이 민감한 정보를 별도로 보관하게 해, 코드 상 유출등을 방지하는 서비스
(03) 인프라 보호 서비스
- AWS Shield
DDOS 와 같은 서비스 거부 공격을 방어하는 서비스 - AWS Web Application Fireall
웹 트래픽을 필터링 할 수 있는 서비스 (웹 방화벽) - AWS Firewall Manager
방화벽 규칙을 중앙에서 관리할 수 있는 서비스
(04) 위협 탐지
- Amazon GuardDuty
자동으로 보안 취약점을 분석하는 서비스 - Amazon Inspector
어플리케이션 보안성을 분석하는 서비스 - AWS Config
AWS Resorce 의 사용 리소스 구성을 기록하고 평가하는 서비스 - AWS CloudTrail
사용자의 활동이나, API 의 사용등의 대해서 추적하는 서비스
(05) 인증 관리 서비스
- AWS IAM
계정, 서비스, 리소스 등의 보안 관리 서비스 - AWS Single Sign-on
클라우드에서 SSO 인증을 도와주는 서비스 (한번 로그인 하면 연관 사이트 다 사용 가능) - Amazon Cognito
어플리케이션 내의 인증 정보를 관리하는 서비스 - AWS Dirctory Service
Microsoft 의 Active Directory 를 통해서 통해 관리하는 서비스 - AWS Organization
조직에서 AWS 계정을 중앙 집중식으로 관리하기 위해 사용하는 서비스
02. IAM
01) IAM 살펴 보기
(01) IAM 이란 ?
- AWS 계정이 어떤 작업이 가능한지 관리하는 서비스이다.
- 사용자와 그룹으로 생성하고 관리할 수 있으며, 기본적으로 리소스에 대한 허용 / 거부 정책등을 수립할 수 있다.
(02) IAM 의 사용자와 사용자 그룹
IAM 을 사용할때, 기본적으로 사용자와 사용자 그룹 2가지로 구별되게 된다.
- 사용자
일반적으로 회사라면 임직원 개별의 아이디가 된다. 만약 모든 사용자가 관리자 계정이 필요하더라도, 사용자를 구별하는 것이 좋으며, 이는 문제 발생시의 책임 소재에 대해서 쉽게 판별할 수 있다. - 그룹
사용자들을 묶는 하나의 단위로 부서별로 묶을 수 있으며, 사용자는 여러 그룹에 속할 수도 있다.
(03) IAM 의 정책 Code
AWS 의 기본적인 계정들의 권한은 아무것도 할수 없는 상태이다. 이에 따라, 해당 계정 혹은 그룹이 특정한 행위를 하고 싶다면,
Policy 정책을 수립하여 정책을 부여 해야 한다.
[관리자]
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "*"
,
"Resource": "*"
}
]
}
- Effect : “Allow” -> 권한을 허용하겠다는 뜻으로, 일반적으로 설정이 되어있지 않다면 “Deny” 이다
- Action : “*” -> 어떤 작업을 허용하겠다는 것으로 “*” 의 경우 모든 작업이 허용되는 경우이다.
- Resorce : “*” -> 어떤 서비스 리소스(서비스)에 대해서 적용할지를 나타낸다.
-> 이 정책은 모든 서비스에 대해서 모든 작업이 허용되게 하였다.
[AWS EC2 ReadOnlyAccess]
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "ec2:Describe*",
"Resource": "*"
},
{
"Effect": "Allow",
"Action": "elasticloadbalancing:Describe*",
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"cloudwatch:ListMetrics",
"cloudwatch:GetMetricStatistics",
"cloudwatch:Describe*"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": "autoscaling:Describe*",
"Resource": "*"
}
]
}
위와 동일하게 해석한다면, 어떤 리소스이든 ec2와 관련된 작업에 대해서 읽을 권한이 있음을 알 수 있다.
02) IAM 실제 설정하기 (GUI)
(01) IAM 접근 방법
![](https://jayslog.com/wp-content/uploads/2023/08/image-101-1024x258.png)
참고 사항: AWS IAM 은 기본적으로 리전은 Global 이다. 즉, 리전과 관계 없이 모두 공통으로 사용이 가능하다.
(02) 계정 생성
[Users] -> [Create User]
![](https://jayslog.com/wp-content/uploads/2023/08/image-102-1024x352.png)
[User 이름 입력후 할당]
![](https://jayslog.com/wp-content/uploads/2023/08/image-103-1024x384.png)
[Permission 설정]
- [Group] 을 선택하는 경우 특정 그룹에 속하게 할수 있다. (일반적)
- [Copy] 특정 유저의 권한을 그대로 가져올 수 있다.
- [Attach policies directly] : 계정 정책을 바로 할당할 수 있다.
![](https://jayslog.com/wp-content/uploads/2023/08/image-104-1024x553.png)
[Review]
![](https://jayslog.com/wp-content/uploads/2023/08/image-105-1024x566.png)
아무런 설정을 하지 않은 경우 위와 같이 생성할 수 있다.
(03) 계정 삭제
계정을 선택하고 삭제할 수 있다.
![](https://jayslog.com/wp-content/uploads/2023/08/image-107-1024x296.png)
(04) 그룹 생성
[User Groups] 를 통해서 생성이 가능하다.
![](https://jayslog.com/wp-content/uploads/2023/08/image-108-1024x322.png)
그룹 생성시, 아래와 같은 정책 설정이 가능하며, 많이 사용하는 설정은 AWS 자체적으로 미리 생성되어 있고, 필요에 따라 Create Policy 를 통해 생성할 수 있다.
-> 여기서 체크를 하면, 해당 그룹은 해당 폴리시를 지닌 그룹에 포함된다.
![](https://jayslog.com/wp-content/uploads/2023/08/image-109-1024x320.png)
(04) Policy 관련 설정
[IAM] -> [Policies] 를 참고하면 되며, 기존에 이미 설정된 정책들은 아래와 같이 선택하면 상세한 내역을 볼수 있다.
이를 기반으로 Policy 를 설정하여 수행이 가능하다.
![](https://jayslog.com/wp-content/uploads/2023/08/image-110-1024x476.png)
(05) 유저를 특정 그룹에 포함시키기
[유저 생성] 에서 특정 그룹에 바로 포함시키는 방법이 있으며, 추후에도 등록이 가능하다.
![](https://jayslog.com/wp-content/uploads/2023/08/image-112-1024x499.png)
-> User 정보에서 [Group] -> [Add User to groups] 를 통해서 유저가 속한 그룹을 추가할 수 있다.
03. 시크릿 매니저 살펴보기
(01) 시크릿 매니저가 필요한 이유 ?
우리가 프로그램을 개발하면, 데이터 베이스의 접속 정보(id, pw) 등을 소스코드에 하드 코딩하는 경우가 많다. 이 경우 소스코드가 유출되거나, 불 필요하게 개발자가 PW를 알고 있어, 악용할 가능성이 존재하게 된다. 또한, 보안상 패스워드는 특정 주기로 변경하는 것이 좋은데, 수동으로 기록된 코드를 변경하는 경우, 연관된 모든 서비스가 비밀번호를 변경해야 하기에 실수의 우려가 발생한다.
이러한 케이스를 방지하기 위해, 별도로 이런 정보들을 관리하는 서비스를 시크릿 매니저라고하며, 코드에서 불러올 때 시크릿 매니저를 호출하여 실제 정보를 얻도록 할 수 있다.
(02) 코드 예시
import mysql.connector
connection = mysql.connector.connect(
host='localhost',
database=‘DBserver',
user=‘root’,
password=get_secret_value_response['DB_Password']
)
비밀번호를 위와 같이 코드를 통해서 가져오게 만든다.
04. AWS Directory Service
아직도 많은 PC 사용자들은, 윈도우를 많이 사용하고 있다. 이에 따라, MS Active Directory 를 AWS 에서 동일하게 사용할수 있는 서비스 이다.
MS Active Directory 는 기본적으로, 윈도우에서 로그인 되는 ID 와 PW 를 개별 PC 에 보관하지 않고, 회사용 데이터 베이스에 모아서 관리하는 서비스이다. 이를 통해, PC 사용 현황을 파악할 수있고, 다른 PC 를 사용하는 경우에도, 로그인 계정 정보를 통해, 이전에 설정한 PC 환경을 불러와 사용할 수 있다.
Hello there! This post couldn’t be written any better! Reading through this post reminds me of my old room mate! He always kept chatting about this. I will forward this article to him. Fairly certain he will have a good read. Many thanks for sharing!
Very nice post and right to the point. I am not sure if this is truly the best place
to ask but do you people have any ideea where to employ some professional writers?
Thanks 🙂 Escape room lista
You have noted very interesting points! ps nice web site.!
п»їbest mexican online pharmacies
https://cmqpharma.com/# buying from online mexican pharmacy
buying prescription drugs in mexico
pharmacies in mexico that ship to usa: mexican border pharmacies shipping to usa – mexico drug stores pharmacies
pharmacy website india [url=https://indiapharmast.com/#]best online pharmacy india[/url] india pharmacy mail order
http://indiapharmast.com/# india pharmacy mail order
india pharmacy: indian pharmacies safe – online shopping pharmacy india
pharmacy rx world canada [url=https://canadapharmast.online/#]canadian king pharmacy[/url] canadian pharmacy service
reputable mexican pharmacies online: buying prescription drugs in mexico online – buying prescription drugs in mexico
pharmacies in mexico that ship to usa: mexican rx online – medicine in mexico pharmacies
reputable mexican pharmacies online [url=https://foruspharma.com/#]reputable mexican pharmacies online[/url] mexican rx online
indian pharmacy paypal: reputable indian pharmacies – reputable indian pharmacies
india pharmacy: top 10 online pharmacy in india – india online pharmacy
canadian discount pharmacy [url=http://canadapharmast.com/#]safe canadian pharmacy[/url] reputable canadian online pharmacy
https://indiapharmast.com/# indianpharmacy com
mexico drug stores pharmacies: mexican drugstore online – mexican pharmaceuticals online
mexican pharmaceuticals online: п»їbest mexican online pharmacies – mexico drug stores pharmacies
reputable mexican pharmacies online: mexican drugstore online – mexico pharmacy
https://amoxildelivery.pro/# amoxicillin over counter
can i order clomid online [url=http://clomiddelivery.pro/#]where can i buy generic clomid now[/url] where buy generic clomid
https://paxloviddelivery.pro/# buy paxlovid online
buy amoxicillin online with paypal: amoxicillin 500 coupon – amoxicillin capsule 500mg price
http://paxloviddelivery.pro/# п»їpaxlovid
where to get cheap clomid prices [url=http://clomiddelivery.pro/#]can you buy generic clomid without insurance[/url] where to get cheap clomid without dr prescription
http://ciprodelivery.pro/# ciprofloxacin 500 mg tablet price
ciprofloxacin generic: buy cipro no rx – ciprofloxacin generic
https://amoxildelivery.pro/# amoxicillin order online
Paxlovid buy online [url=http://paxloviddelivery.pro/#]paxlovid for sale[/url] paxlovid covid
http://doxycyclinedelivery.pro/# doxycycline in usa
https://paxloviddelivery.pro/# paxlovid covid
https://amoxildelivery.pro/# where can i buy amoxicillin without prec
paxlovid pharmacy [url=http://paxloviddelivery.pro/#]Paxlovid buy online[/url] Paxlovid over the counter
doxycycline tablets for sale: cheap doxycycline 100mg capsule – doxycycline 300 mg price
https://amoxildelivery.pro/# amoxicillin 500mg for sale uk
https://clomiddelivery.pro/# can i buy clomid online
how can i get cheap clomid without prescription [url=http://clomiddelivery.pro/#]how to buy cheap clomid[/url] how can i get cheap clomid online
paxlovid india: paxlovid pharmacy – paxlovid pill
http://amoxildelivery.pro/# amoxicillin 500mg
https://doxycyclinedelivery.pro/# where can you buy doxycycline
where to get generic clomid pills [url=http://clomiddelivery.pro/#]where to get clomid now[/url] how can i get clomid online
http://amoxildelivery.pro/# order amoxicillin online uk
how can i get cheap clomid without dr prescription: cost clomid tablets – how to get generic clomid without prescription
http://clomiddelivery.pro/# can i get generic clomid online
http://amoxildelivery.pro/# amoxicillin 825 mg
https://doxycyclinedelivery.pro/# where can i buy doxycycline over the counter
paxlovid price [url=https://paxloviddelivery.pro/#]paxlovid for sale[/url] paxlovid cost without insurance
where to buy doxycycline online: where can i buy doxycycline over the counter – buy doxycycline 50 mg
where buy cheap clomid: where can i buy generic clomid without a prescription – can i get cheap clomid pills