O serviço FTP (IIS 7.5) no Windows 2008 R2 oferece suporte à autenticação Kerberos?

1

Eu configurei o serviço http no IIS 7.5 para autenticação do kerberos. E isso funciona bem.

Eu verifiquei na caixa de linux

# klist
Ticket cache: FILE:/tmp/krb5cc_0
Default principal: [email protected]

Valid starting     Expires            Service principal
03/08/16 10:19:30  03/08/16 20:19:31  krbtgt/[email protected]
        renew until 03/15/16 10:19:30
03/08/16 10:20:00  03/08/16 20:19:31  HTTP/[email protected]
        renew until 03/15/16 10:19:30

Teste simples

# curl --trace-ascii - --negotiate -u : http://www.example.net
Enter host password for user '[email protected]':
== Info: About to connect() to www.example.net port 80 (#0)
== Info:   Trying 192.168.1.100... == Info: connected
== Info: Connected to www.example.net (192.168.1.100) port 80 (#0)
=> Send header, 178 bytes (0xb2)
0000: GET / HTTP/1.1
0010: User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7
0050:  NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
008c: Host: www.example.net
00a3: Accept: */*
00b0:
...
== Info: Connection #0 to host www.example.net left intact
== Info: Issue another request to this URL: 'http://www.example.net/'
== Info: Re-using existing connection! (#0) with host www.example.net
== Info: Connected to www.example.net (192.168.1.100) port 80 (#0)
== Info: Server auth using GSS-Negotiate with user ''
=> Send header, 1969 bytes (0x7b1)
0000: GET / HTTP/1.1
0010: Authorization: Negotiate YIIFJgYJKoZIhvcSAQICAQBuggUVMIIFEaADAgE
0050: FoQMCAQ6iBwMFAAAAAACjggQkYYIEIDCCBBygAwIBBaENGwtFWEFNUExFLk5FVKI
0090: iMCCgAwIBA6EZMBcbBEhUVFAbD2RjMS5leGFtcGxlLm5ldKOCA+AwggPcoAMCARK
...
070f: User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7
074f:  NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
078b: Host: www.example.net
07a2: Accept: */*
07af:
<= Recv header, 17 bytes (0x11)
0000: HTTP/1.1 200 OK
<= Recv header, 25 bytes (0x19)
0000: Content-Type: text/html
<= Recv header, 46 bytes (0x2e)
0000: Last-Modified: Sat, 05 Mar 2016 17:15:16 GMT
<= Recv header, 22 bytes (0x16)
0000: Accept-Ranges: bytes
...

A autenticação anônima foi desativada e a autenticação do Windows foi habilitada na seção Autenticação do site e para todo o servidor. Eu deixei apenas Negociar: Kerberos na seção de Provedores. A autenticação no modo kernel foi desativada.

Eu criei um registro SPN para o serviço ftp

> setspn.exe -a ftp/ftp.example.net dc1
Registering ServicePrincipalNames for CN=DC1,OU=Domain Controllers,DC=example,DC=net
        ftp/ftp.example.net
Updated object

E eu posso ver o registro SPN recém-criado

> Setspn.exe -L DC1
Registered ServicePrincipalNames for CN=DC1,OU=Domain Controllers,DC=example,DC=net:
        ftp/ftp.example.net
        Dfsr-12F9A27C-BF97-4787-9364-D31B6C55EB04/dc1.example.net
        HOST/DC1/EXAMPLE
        ldap/DC1/EXAMPLE
        ldap/dc1.example.net/ForestDnsZones.example.net
        ldap/dc1.example.net/DomainDnsZones.example.net
        DNS/dc1.example.net
        GC/dc1.example.net/example.net
        RestrictedKrbHost/dc1.example.net
        RestrictedKrbHost/DC1
        HOST/dc1.example.net/EXAMPLE
        HOST/DC1
        HOST/dc1.example.net
        HOST/dc1.example.net/example.net
        ldap/dc1.example.net/EXAMPLE
        ldap/DC1
        ldap/dc1.example.net
        ldap/dc1.example.net/example.net
        E3514235-4B06-11D1-AB04-00C04FC2DCD2/f9c3624c-5f19-4e0a-8afa-d730b0bd4e6d/example.net
        ldap/f9c3624c-5f19-4e0a-8afa-d730b0bd4e6d._msdcs.example.net

Mas quando eu tento conectar ao serviço FTP, recebo o seguinte erro

# curl --trace-ascii - --krb 5 -u : ftp://ftp.example.net
== Info: About to connect() to ftp.example.net port 21 (#0)
== Info:   Trying 192.168.1.100... == Info: connected
== Info: Connected to ftp.example.net (192.168.1.100) port 21 (#0)
<= Recv header, 27 bytes (0x1b)
0000: 220 Microsoft FTP Service
== Info: Trying GSSAPI...
=> Send header, 13 bytes (0xd)
0000: AUTH GSSAPI
<= Recv header, 41 bytes (0x29)
0000: 504 Security mechanism not implemented.
== Info: GSSAPI is not supported by the server.
== Info: Logging in with password in cleartext!
...

Eu li muitas documentações oficiais, mas não consegui descobrir se é possível configurar a autenticação Kerberos para o serviço FTP.

Então, minhas perguntas são:

  • É possível a todos. Se for, o que eu perdi?
  • Se não for possível, qual servidor FTP posso usar com a autenticação do kerberos?

P.S. Nas configurações avançadas da seção Autenticação do Windows, há uma opção - Autenticação no modo kernel com a seguinte descrição

By default, IIS enables kernel-mode authentication, which may improve authentication performance and prevent authentication problems with application pools configured to use a custom identity. As a best practice, do not disable this setting if Kerberos authentication is used in your environment and the application pool is configured to use a custom identity.

Mas quando eu marquei a caixa, recebi o seguinte erro

Eu senti falta de algo? Porque na tela anterior o IIS recomendou não desabilitar a autenticação no modo kernel, especialmente para a autenticação do kerberos. Então estou um pouco confuso.

Obrigado antecipadamente

    
por ALex_hha 08.03.2016 / 12:18

0 respostas