기본 FTP 사용자 지정 인증 공급자 <공급자>
개요
요소는 <providers>
FTP 사이트에 대한 사용자 지정 FTP 인증 공급자의 기본 컬렉션을 지정합니다.
사용자 지정 인증 공급자가 FTP 사이트에 추가되면 FTP 서비스는 FTP 구성 설정에서 공급자가 지정된 순서대로 사용하도록 설정된 각 사용자 지정 인증 공급자를 사용하여 사용자를 인증하려고 시도합니다. 사용자 지정 인증 공급자를 사용하여 사용자를 인증할 수 없는 경우 FTP 서비스는 기본 인증(활성화된 경우)을 시도하여 사용자를 인증합니다.
사용자 지정 인증 공급자를 사용하는 기본 이점은 사용자 계정을 서버 또는 도메인에 만들 필요가 없다는 것입니다. 이렇게 하면 네트워크의 보안이 향상됩니다.
참고
FTP 7.0 및 FTP 7.5는 두 개의 사용자 지정 인증 공급자와 함께 제공됩니다.
- ASP.NET 멤버 자격 인증: ASP.NET 멤버 자격 데이터베이스를 사용하여 사용자 이름 및 암호의 유효성을 검사합니다. 자세한 내용은 Microsoft의 IIS.net 웹 사이트에서 .NET 멤버 자격 인증을 사용하여 FTP 구성 항목을 참조하세요.
- IIS 관리자 인증: IIS 관리 사용자 저장소를 사용하여 사용자 이름 및 암호의 유효성을 검사합니다. 자세한 내용은 IIS 7.0 관리자 인증을 사용하여 FTP 구성 항목 Microsoft의 IIS.net 웹 사이트를 참조하세요.
참고
요소에 추가되는 사용자 지정 인증 공급자는 <customAuthentication/providers>
컬렉션에 <system.ftpServer/providerDefinitions>
등록되어야 합니다.
참고
사용자 지정 인증 공급자를 만들기 위한 지원은 FTP 7.5에 도입되었습니다. 사용자 지정 인증 공급자를 만드는 방법에 대한 자세한 내용은 Microsoft www.iis.net/learn 웹 사이트의 FTP 7.5 개발 섹션을 참조하세요.
호환성
버전 | 참고 |
---|---|
IIS 10.0 | <providers> 요소가 IIS 10.0에서 수정되지 않았습니다. |
IIS 8.5 | <providers> 요소가 IIS 8.5에서 수정되지 않았습니다. |
IIS 8.0 | <providers> 요소가 IIS 8.0에서 수정되지 않았습니다. |
IIS 7.5 | <providers> 요소의 <customAuthentication> 요소는 IIS 7.5의 기능으로 제공됩니다. |
IIS 7.0 | <providers> 요소의 <customAuthentication> 요소는 IIS 7.0에 대한 별도의 다운로드인 FTP 7.0에서 도입되었습니다. |
IIS 6.0 | <ftpServer> 요소와 해당 자식 요소는 LM/MSFTPSVC 메타베이스 경로에 있던 IIS 6.0 FTP 설정을 대체합니다. |
참고
FTP 7.0 및 FTP 7.5 서비스는 IIS 7.0용 대역 외 서비스를 제공했으며, 다음 URL에서 모듈을 다운로드하고 설치해야 했습니다.
Windows 7 및 Windows Server 2008 R2에서는 FTP 7.5 서비스가 IIS 7.5의 기능으로 제공되므로 FTP 서비스를 더 이상 다운로드할 필요가 없습니다.
설치 프로그램
웹 서버에 대한 FTP 게시를 지원하려면 FTP 서비스를 설치해야 합니다. 이렇게 하려면 다음 단계를 수행합니다.
Windows Server 2012 또는 Windows Server 2012 R2
작업 표시줄에서 서버 관리자를 클릭합니다.
서버 관리자관리 메뉴를 클릭한 다음 역할 및 기능 추가를 클릭합니다.
역할 및 기능 추가 마법사에서 다음을 클릭합니다. 설치 유형을 선택하고 다음을 클릭합니다. 대상 서버를 선택하고 다음을 클릭합니다.
서버 역할 페이지에서 웹 서버(IIS)를 확장한 다음 FTP 서버를 선택합니다.
다음을 클릭한 다음 기능 선택 페이지에서 다음을 다시 클릭합니다.
설치 선택 확인 페이지에서 설치를 클릭합니다.
Results(결과) 페이지에서 Close(닫기)를 클릭합니다.
Windows 8 또는 Windows 8.1
시작 화면에서 포인터를 왼쪽 아래 모서리로 이동하고 시작 단추를 마우스 오른쪽 단추로 클릭한 다음 제어판 클릭합니다.
제어판프로그램 및 기능을 클릭한 다음 Windows 기능 켜기 또는 끄기를 클릭합니다.
인터넷 정보 서비스를 확장한 다음 FTP 서버를 선택합니다.
확인을 클릭합니다.
닫기를 클릭합니다.
Windows Server 2008 R2
작업 표시줄에서 시작을 클릭하고 관리 도구를 가리킨 다음 서버 관리자 클릭합니다.
서버 관리자 계층 구조 창에서 역할을 확장한 다음 웹 서버(IIS)를 클릭합니다.
웹 서버(IIS) 창에서 Role Services 섹션으로 스크롤한 다음 역할 서비스 추가를 클릭합니다.
역할 서비스 추가 마법사의 역할 서비스 선택 페이지에서 FTP 서버를 확장합니다.
FTP 서비스를 선택합니다.
다음을 클릭합니다.
설치 선택 확인 페이지에서 설치를 클릭합니다.
Results(결과) 페이지에서 Close(닫기)를 클릭합니다.
Windows 7
작업 표시줄에서 시작을 클릭한 다음 제어판 클릭합니다.
제어판프로그램 및 기능을 클릭한 다음 Windows 기능 켜기 또는 끄기를 클릭합니다.
인터넷 정보 서비스를 확장한 다음 FTP 서버를 확장합니다.
FTP 서비스를 선택합니다.
확인을 클릭합니다.
Windows Server 2008 또는 Windows Vista
다음 URL에서 설치 패키지를 다운로드합니다.
다음 연습의 지침에 따라 FTP 서비스를 설치합니다.
방법
FTP 사이트에 IIS 관리자 인증을 사용하도록 설정하는 방법
IIS(인터넷 정보 서비스) 관리자를 엽니다.
Windows Server 2012 또는 Windows Server 2012 R2를 사용하는 경우:
- 작업 표시줄에서 서버 관리자 클릭하고 도구를 클릭한 다음 IIS(인터넷 정보 서비스) 관리자를 클릭합니다.
Windows 8 또는 Windows 8.1 사용하는 경우:
- Windows 키를 누른 채로 문자 X를 누른 다음 제어판 클릭합니다.
- 관리 도구를 클릭한 다음 IIS(인터넷 정보 서비스) 관리자를 두 번 클릭합니다.
Windows Server 2008 또는 Windows Server 2008 R2를 사용하는 경우:
- 작업 표시줄에서 시작을 클릭하고 관리 도구를 가리킨 다음 IIS(인터넷 정보 서비스) 관리자를 클릭합니다.
Windows Vista 또는 Windows 7을 사용하는 경우:
- 작업 표시줄에서 시작을 클릭한 다음 제어판 클릭합니다.
- 관리 도구를 두 번 클릭한 다음 IIS(인터넷 정보 서비스) 관리자를 두 번 클릭합니다.
연결 창에서 서버 이름을 확장하고 사이트 노드를 확장한 다음 사이트 이름을 클릭합니다.
사이트의 홈 창에서 FTP 인증 기능을 두 번 클릭합니다.
원하는 경우 모드를 강조 표시하고 작업 창에서 사용 안 함을 클릭하여 기본 인증 또는 익명 인증을 사용하지 않도록 설정할 수 있습니다.
FTP에 대한 IIS 관리자 인증을 구성하는 방법에 대한 자세한 내용은 Microsoft의 www.iis.net/learn 웹 사이트에서 IIS 7.0 관리자 인증으로 FTP 구성 항목을 참조하세요.
FTP 사이트에 대한 관리 코드 사용자 지정 인증 공급자를 추가하는 방법
참고
이러한 단계에서는 사용자 지정 FTP 인증 공급자가 이미 설치되어 서버의 GAC(전역 어셈블리 캐시)에 등록되었다고 가정합니다. 관리되는 어셈블리를 등록하는 방법에 대한 자세한 내용은 MSDN 웹 사이트의 전역 어셈블리 캐시 도구(Gacutil.exe) 항목을 참조하세요.
확장성 공급자에 대한 어셈블리 정보를 확인합니다.
- Windows Explorer "C:\Windows\assembly" 경로를 엽니다. 여기서 C: 는 운영 체제 드라이브입니다.
- 어셈블리를 찾습니다. 예를 들어 FtpAuthenticationDemo입니다.
- 어셈블리를 마우스 오른쪽 단추로 클릭하고 속성을 클릭합니다.
- 문화권 값을 복사합니다. 예를 들어 중립입니다.
- 버전 번호를 복사합니다. 예를 들어 1.0.0.0입니다.
- 공개 키 토큰 값을 복사합니다. 예를 들어 426f62526f636b73입니다.
- 취소를 클릭합니다.
확장성 공급자를 FTP 인증 공급자의 전역 목록에 추가합니다.
- IIS(인터넷 정보 서비스) 관리자를 엽니다.
- 연결 창에서 컴퓨터 이름을 클릭합니다.
- 기본 창에서 FTP 인증을 두 번 클릭합니다.
- 작업 창에서 사용자 지정 공급자...를 클릭합니다.
- 등록을 클릭합니다.
- 이름 상자에 사용자 지정 인증 공급자의 이름을 입력합니다. 예를 들어 FtpAuthenticationDemo입니다.
- 관리되는 공급자(.NET)를 클릭합니다.
- 이전에 복사한 정보를 사용하여 확장성 공급자에 대한 어셈블리 정보를 입력합니다. 예를 들면 다음과 같습니다.
FtpAuthentication.FtpAuthDemo, FtpAuthenticationDemo, version=1.0.0.0, Culture=neutral, PublicKeyToken=426f62526f636b73 - 확인을 클릭합니다.
- 공급자 목록에서 사용자 지정 인증 공급자의 검사 상자를 선택 취소합니다.
- 확인을 클릭합니다.
FTP 사이트에 대한 사용자 지정 인증 공급자를 추가합니다.
- IIS(인터넷 정보 서비스) 관리자에서 FTP 사이트를 엽니다.
- 기본 창에서 FTP 인증을 두 번 클릭합니다.
- 작업 창에서 사용자 지정 공급자...를 클릭합니다.
- 공급자 목록에서 사용자 지정 인증 공급자를 선택하고 사용하도록 설정해야 합니다.
- 확인을 클릭합니다.
구성
특성
없음
자식 요소
요소 | Description |
---|---|
add |
선택적 요소입니다. 사용자 지정 인증 공급자의 기본 컬렉션에 공급자를 추가합니다. |
clear |
선택적 요소입니다. 사용자 지정 인증 공급자의 기본 컬렉션을 지웁니다. |
remove |
선택적 요소입니다. 사용자 지정 인증 공급자의 기본 컬렉션에서 공급자를 제거합니다. |
구성 샘플
다음 구성 샘플에서는 기본 사용자 지정 인증 공급자를 정의하는 FTP 서비스의 예제 <siteDefaults>
요소를 표시합니다.
<siteDefaults>
<ftpServer>
<security>
<authentication>
<customAuthentication>
<providers>
<add name="FtpCustomAuthenticationModule" enabled="true" />
</providers>
</customAuthentication>
</authentication>
</security>
</ftpServer>
</siteDefaults>
샘플 코드
다음 코드 샘플에서는 FTP 서비스에 대한 기본 사용자 지정 인증 공급자의 구성을 보여 줍니다.
AppCmd.exe
appcmd.exe set config -section:system.applicationHost/sites /+"siteDefaults.ftpServer.security.authentication.customAuthentication.providers.[name='FtpCustomAuthenticationModule',enabled='True']" /commit:apphost
참고
AppCmd.exe 사용하여 이러한 설정을 구성할 때 commit 매개 변수 apphost
를 로 설정해야 합니다. 그러면 구성 설정이 ApplicationHost.config 파일의 적절한 위치 섹션에 커밋됩니다.
C#
using System;
using System.Text;
using Microsoft.Web.Administration;
internal static class Sample
{
private static void Main()
{
using (ServerManager serverManager = new ServerManager())
{
Configuration config = serverManager.GetApplicationHostConfiguration();
ConfigurationSection sitesSection = config.GetSection("system.applicationHost/sites");
ConfigurationElement siteDefaultsElement = sitesSection.GetChildElement("siteDefaults");
ConfigurationElement ftpServerElement = siteDefaultsElement.GetChildElement("ftpServer");
ConfigurationElement securityElement = ftpServerElement.GetChildElement("security");
ConfigurationElement authenticationElement = securityElement.GetChildElement("authentication");
ConfigurationElement customAuthenticationElement = authenticationElement.GetChildElement("customAuthentication");
ConfigurationElementCollection providersCollection = customAuthenticationElement.GetCollection("providers");
ConfigurationElement addElement1 = providersCollection.CreateElement("add");
addElement1["name"] = @"FtpCustomAuthenticationModule";
addElement1["enabled"] = true;
providersCollection.Add(addElement1);
serverManager.CommitChanges();
}
}
}
VB.NET
Imports System
Imports System.Text
Imports Microsoft.Web.Administration
Module Sample
Sub Main()
Dim serverManager As ServerManager = New ServerManager
Dim config As Configuration = serverManager.GetApplicationHostConfiguration
Dim sitesSection As ConfigurationSection = config.GetSection("system.applicationHost/sites")
Dim siteDefaultsElement As ConfigurationElement = sitesSection.GetChildElement("siteDefaults")
Dim ftpServerElement As ConfigurationElement = siteDefaultsElement.GetChildElement("ftpServer")
Dim securityElement As ConfigurationElement = ftpServerElement.GetChildElement("security")
Dim authenticationElement As ConfigurationElement = securityElement.GetChildElement("authentication")
Dim customAuthenticationElement As ConfigurationElement = authenticationElement.GetChildElement("customAuthentication")
Dim providersCollection As ConfigurationElementCollection = customAuthenticationElement.GetCollection("providers")
Dim addElement1 As ConfigurationElement = providersCollection.CreateElement("add")
addElement1("name") = "FtpCustomAuthenticationModule"
addElement1("enabled") = True
providersCollection.Add(addElement1)
serverManager.CommitChanges()
End Sub
End Module
JavaScript
var adminManager = new ActiveXObject('Microsoft.ApplicationHost.WritableAdminManager');
adminManager.CommitPath = "MACHINE/WEBROOT/APPHOST";
var sitesSection = adminManager.GetAdminSection("system.applicationHost/sites", "MACHINE/WEBROOT/APPHOST");
var siteDefaultsElement = sitesSection.ChildElements.Item("siteDefaults");
var ftpServerElement = siteDefaultsElement.ChildElements.Item("ftpServer");
var securityElement = ftpServerElement.ChildElements.Item("security");
var authenticationElement = securityElement.ChildElements.Item("authentication");
var customAuthenticationElement = authenticationElement.ChildElements.Item("customAuthentication");
var providersCollection = customAuthenticationElement.ChildElements.Item("providers").Collection;
var addElement1 = providersCollection.CreateNewElement("add");
addElement1.Properties.Item("name").Value = "FtpCustomAuthenticationModule";
addElement1.Properties.Item("enabled").Value = true;
providersCollection.AddElement(addElement1);
adminManager.CommitChanges();
VBScript
Set adminManager = createObject("Microsoft.ApplicationHost.WritableAdminManager")
adminManager.CommitPath = "MACHINE/WEBROOT/APPHOST"
Set sitesSection = adminManager.GetAdminSection("system.applicationHost/sites", "MACHINE/WEBROOT/APPHOST")
Set siteDefaultsElement = sitesSection.ChildElements.Item("siteDefaults")
Set ftpServerElement = siteDefaultsElement.ChildElements.Item("ftpServer")
Set securityElement = ftpServerElement.ChildElements.Item("security")
Set authenticationElement = securityElement.ChildElements.Item("authentication")
Set customAuthenticationElement = authenticationElement.ChildElements.Item("customAuthentication")
Set providersCollection = customAuthenticationElement.ChildElements.Item("providers").Collection
Set addElement1 = providersCollection.CreateNewElement("add")
addElement1.Properties.Item("name").Value = "FtpCustomAuthenticationModule"
addElement1.Properties.Item("enabled").Value = True
providersCollection.AddElement(addElement1)
adminManager.CommitChanges()