PAPI Archivos

The PAPI authentication and authorization framework

PAPI@LISTSERV.REDIRIS.ES

Opciones: Vista Forum

Use Monospaced Font
Por defecto enseñar Text Part
Mostrar todas las cabeceras de correo

Mensaje: [<< Primero] [< Prev] [Siguiente >] [Último >>]
Tema: [<< Primero] [< Prev] [Siguiente >] [Último >>]
Autor: [<< Primero] [< Prev] [Siguiente >] [Último >>]

Print Responder
Subject:
Emisor:
Daniel García <[log in para visualizar]>
Reply To:
The PAPI authentication and authorization framework <[log in para visualizar]>
Fecha:
Tue, 9 Dec 2008 11:18:05 +0100
Content-Type:
multipart/signed
Parts/Attachments:
text/plain (6 kB) , smime.p7s (6 kB)


	Hola Mikel,

Un par de comentarios sobre la configuración de Apache (van entre  
líneas)

El 05/12/2008, a las 20:14, Mikel Carrasco escribió:

> Hola Dani:
>
> Hace algun tiempecillo te envie un mensaje comentandote los  
> problemas que tengo para papizar recursos. No se si al final te  
> llego. La historia es que cada vez que vuelve Libo de una reunion  
> vuestra de Red Iris, viene con la idea de que hay que instalar PAPI,  
> o rodara mi cabeza. La historia es que era incapaz de "papizar" una  
> pagina web  de apache ya que me daba:
>
>
> Forbidden
>
> You don't have permission to access /prueba/ on this server.
>
> El fichero de virtual host es el siguiente:
>
> NameVirtualHost 158.227.101.41:443
> <VirtualHost 158.227.101.41:443>
>       ServerAdmin webmaster@localhost
>       ServerName  scuc01.sc.ehu.es
>       SSLEngine On
>       SSLCertificateFile /etc/apache2/server.crt
>       SSLCertificateKeyFile /etc/apache2/server.key
>       DocumentRoot /var/www/
> #Añadido para PAPI
>
>       <Location /prueba>
>               AllowOverride None
>               Order allow,deny
>               Allow from all
		#Yo eliminaría las 3 líneas anteriores, ya que dichos controles los  
puedes realizar con filtros de PAPI, pero no es necesario.	
> 	
>               PerlSetVar              Service_ID Mi_PoA_ID
>               PerlOptions             +ParseHeaders
>               SetHandler              perl-script
		# Y añadiria:
		PerlFixupHandler    PAPI::DirectoryFixup
		# Esto es para corregir un problemilla con los DirectoryIndex que da  
Apache2. De momento es un parche, pero estamos tratando de
		# hacerlo transparente.
>               PerlAccessHandler       PAPI::Main
>       </Location>
>
>       ScriptAlias /cgi-bin/ /var/www/cgi-bin/
>       <Directory "/var/wwww/cgi-bin/">
>               AllowOverride None
>               Order allow,deny
>               Allow from all
>       </Directory>
>
>       ErrorLog /var/log/apache2/error.log
>
>       # Possible values include: debug, info, notice, warn, error,  
> crit,
>       # alert, emerg.
>       LogLevel debug
>
>       CustomLog /var/log/apache2/access.log combined
>       ServerSignature On
>
>
> </VirtualHost>
>
> El tema es que Libo me ha dicho que a la hora de papizar una pagina  
> web, hay algo que no se debe de papizar, la pagina de  
> autentificacion. Eso es correcto? Como se hace?

Te aclaro esto, si proteges la página de autenticación, no podras  
acceder a ella para autenticarte ¿no?... eso sería la pescadilla que  
se muerde la cola, para acceder debes autenticarte, y si para  
autenticarte debes acceder a algo que está protegido a menos que estés  
ya autenticado ¿no?

Te mando un pequeño Virtualhost con todo a modo de ejemplo:

<!--  
**************************************************************************** -->
<!-- * AuthServer & PoA -  
test.rediris.es                                       * -->
<!--  
**************************************************************************** -->
<VirtualHost *>
   ServerName test.rediris.es
   DocumentRoot /home/spool/PAPI/test
   DirectoryIndex index.html index.es.html
   CustomLog var/log/AS_&_PoA_access_log common
   ErrorLog  var/log/AS_&_PoA_error_log
   LogLevel debug

   # Esto declara donde está el AuthServer (la pagina de autenticación)
   ScriptAliasMatch ^/AS/$ "/home/spool/PAPI/test/AS/AuthServer"
   ScriptAliasMatch ^/AS$ "/home/spool/PAPI/test/AS/AuthServer"

   ErrorDocument 403 /papi-noauth.phtml

  <Location /papizado>
     Options FollowSymLinks
     AllowOverride None
     Order Deny,Allow
     Allow .rediris.es
     Deny from all

     PerlSetVar          ServiceID papizado
     PerlOptions         +ParseHeaders
     SetHandler          perl-script
     PerlFixupHandler    PAPI::DirectoryFixup
     PerlAccessHandler   PAPI::Main
   </Location>
</VirtualHost>

Con esto tienes las 2 urls siguientes:

http://test.rediris.es/AS (página de autenticación de acceso libre).
http://test.rediris.es/papizado (página protegida, solo accesible una  
vez que te hayas autenticado) (todo lo que está por debajo de dicha  
url también estaría protegido).

La configuración para esto sería algo así como:

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE PAPI_Configuration SYSTEM "file:///...../papi_conf.dtd">
<PAPI_Configuration>
  <Global>
   <Auth_Location>/papiPoA</Auth_Location>
   <Accept_File>/....../accept-file</Accept_File>
   <Reject_File>/....../reject-file</Reject_File>
   <Debug>1</Debug>
   <HKey>95e17eea42015cc1f069f587e8e1fc85</HKey>
   <LKey>f4a438aeb80afad4b4921cc5cb81313a</LKey>
   <Pubkeys_Path>/....../KEYS</Pubkeys_Path>
   <Hcook_DB>/....../hcookdb</Hcook_DB>
   <Lcook_Timeout>18000</Lcook_Timeout>
   <CRC_Timeout>1800</CRC_Timeout>
   <URL_Timeout>1800</URL_Timeout>
   <Req_DB>/....../req_db.mldbm</Req_DB>
  </Global>

  <!--  
*********************************************************************** -->
  <!-- *  
test.rediris.es                                                     *  
-->
  <!--  
*********************************************************************** -->
  <Server name="test.rediris.es" port="80" independent="0">
   <Debug>1</Debug>
   <Location path="/papizado" id="papizado" filtered="true"  
independent="1">
     <HKey>0c5064330bd7892d4c314bf589afe0e2</HKey>
     <LKey>808f3a12fc8f1da47692b0599f6776fc</LKey>
     <Pubkeys_Path>/....../KEYS</Pubkeys_Path>
     <Hcook_DB>/....../hcook</Hcook_DB>
     <Lcook_Timeout>3600</Lcook_Timeout>
     <Req_DB>/....../DBs/reqs</Req_DB>
     <PAPI_AS id="test.rediris.es" url="http://test.rediris.es/ 
AS/">The TEST PAPI AS at RedIRIS</PAPI_AS>
   </Location>
  </Server>
</PAPI_Configuration>


Como ves sólo se declara un PoA, al igual que en Apache, y a dicho PoA  
le indicamos que su AS es http://test.rediris.es/AS/ (como sabás al AS  
le tienes indicar que reconozca este PoA)


	Saludos

P.D. como siempre para cualquier cosa no dudes en preguntar.


>
>
> Me podrias echar un cable en este tema?
>
> Gracias de antemano.
>
> Mikel.
>

--
Daniel García Franco		E-mail: [log in para visualizar]
				Jabber: [log in para visualizar]
Red.es/RedIRIS			Tef:+34 955 05 66 23
Edificio CICA
Avenida Reina Mercedes, s/n
41012 Sevilla
SPAIN

- Red Académica y Científica española (http://www.rediris.es) -
- Spanish NREN (http://www.rediris.es) -



ATOM RSS1 RSS2