brunch

403. ADFS 구축하기

by Master Seo

목표

ADFS와 Domain Controller를 이용해 AWS 접속하려 한다.


ADFS 동작



1000 adfs.png


1 auth_process2.png



<0> 구성

Public : RDGW (게이트웨이 서버)

Private : DC (Domain Controller) , ADFS


요약

1

Domain Controller에서는 그룹, 사용자 계정 생성


2

AD FS에서 도메인 가입하고, 인증 생성한다


3

AWS에서는 IAM 설정한다



<1> Public에 있는 RDGW 연결

<2> RDGW에서 Private에 있는 DC에 연결 => DC에서 그룹, 사용자 만든다.

<3> ADFS 도메인에 가입

<4> ADFS 인증 생성하기

<5> ADFS 설치

<6> ADFS와 동작하도록 IAM 설정하기

<7> AWS Trust



<1> Public에 있는 RDGW 연결


1

Public에 있는 RDGW 연결

서비스 > EC2 > RDGW 연결

. pem 키로 암호해독한다.


2

mydomain\Administrator

연결


3

Windows powershell 실행

방화벽 임시 제거

Set-NetFirewallProfile -Profile Private -Enabled False



<2> RDGW에서 Private에 있는 DC에 연결 => DC에서 그룹, 사용자 만든다.


1

RDGW에서

> 시작 > remote desktop connection(mstsc) > 도메인 컨트롤러 (10.0.0.10) > 연결

Administrator


2

시작 > Active Directory 사용자 및 컴퓨터 > mydomain.local > 새로 작성 > 그룹 > 그룹 이름

AWS-View-EC2

확인

// 그룹 이름이나 사용자 이름은 대소문자 구별한다.

// ADFS , SAML 에서 사용하므로 이름이 같아야 한다.


또는

시작 > Active Dir 친다.


멤버 > 추가 >

Administrator

이름 확인

확인


3

mydomain.local > 새로 작성 > 그룹 > 그룹 이름

AWS-View-S3

오른 마우스 > 속성 > 멤버 > 추가 >

Administrator

이름 확인

확인


4

mydomain.local > 새로 작성 > 사용자 >

First name

seo

User logon name

seo

// 로그온 시 암호 변경 체크 해제 , 나중에 점검 시 오류가 나서 우선 해제

마침



<3> ADFS의 도메인에 가입


1

RDGW 에서

remote desktop connection (mstsc) >

10.0.0.15 (ADFS 접속) >

Administrator

// 암호


2

방화벽 임시 해제

Windows PowerShell

Set-NetFirewallProfile -Profile Private -Enabled False


3

DNS를 DC로 변경

C:\Windows\System32\control.exe ncpa.cpl

dns를 DC인 10.0.0.10 으로 변경


4

ping mydomain.local


5

도메인 변경하기

systempropertiescomputername

컴퓨터 이름

adfsserver


6

change 클릭

컴퓨터 이름

adfsserver

domain으로 변경

mydomain.local

재시작





<4> AD FS 인증 생성하기


1

Windows > mstsc > ADFS접속 10.0.0.15

Administrator

암호


2

Server Manager에서 IIS 웹서버 설치

windows > Server manager > 역할 및 기능 추가 (Add roles and features) > next> next> 서버 역할 > Web Server(IIS) 체크 > next > next > next > Install


3

인증 생성

오른쪽 위 Tools > IIS Manager > adfsserver > server 인증 더블클릭


오른쪽 위 Actions > create self-signed certificate >

adfs

웹호스팅용으로 변경

ok


4

인증서 받아 두기

오른쪽 Export

C:\Users\administrator\Desktop\adfs.pfx

암호

암호

ok


5

IIS 닫기



<5> AD FS 설치


1

AD Ferderation Service 클릭 >

Server Manager에서 > 오른쪽 위 Manage > 룰과 기능 추가 > next > next > Active Directory Federation Services 체크 > next > next > Restart the destination server automatically if required 체크 > 설치



2

인증서 임포트 하기

오른쪽 위 깃발 더블 클릭 > Welcome 페이지 (Active Directory Federation Services Configurattion Wizard) > Create the first federation sever in a federation server farm 선택 > Connect to active directory domain services > change > username

mydomain\administrator


3

import 클릭

adfs 파일


4

Federation Service Display Name >

AWSADFS


5

Specify Service Account

ADFSSVC

g100!


6

// setspn관련 에러 뜰 때 Powershell에서 아래 명령어 실행

setspn -a host/localhost adfssvc


7

powershell

cd Desktop

wget https://adfsserver.mydomain.local/FederationMetadata/2007-06/FederationMetadata.xml -OutFile FederationMetadata.xml

> 다운로드한 파일 확인 FederationMetadata.xml


8

ADFS에서 개인 PC에 FederationMetadata.xml 복사 하기




<6> AD FS와 동작하도록 IAM 설정하기


1

AWS > Serivce > IAM > 자격증명 공급자 > create provider > Provider type SAML > 공급자 생성 > SAML 선택 > Provider Name

ADFS

choose file

FederationMetadata.xml

next

create




<7> AWS Trust


1

rdp > ad fs 10.0.0.15


2

Server manager > local server > properties : IE Enhanced Security Configuration ON => OFF로 변경


3

신뢰할 수 있는 대상 지정

오른쪽 위 tools > adfs management > actions > add relying part Trust > Welcome > Start > Federation metadata address

https://signin.aws.amazon.com/static/saml-metadata.xml

next > next > close


4

// SAML 응답하도록 설정한다.

Tools > AD FS management > Relying party Trusts > Action > Edit Claim Issuance Policy > Add rule >

Transform an incoming claim으로 변경 >

Claim rule name

Name ID



<8> 테스트


https://localhost/adfs/ls/IdpInitiatedSignOn.aspx

접속

advances , Processd to localhost




감사합니다.






keyword
매거진의 이전글402 ElastiCache 사용법- linux