Difference between revisions of "User:Msalle@nikhef.nl"

From PDP/Grid Wiki
Jump to navigationJump to search
Line 4: Line 4:
  
 
=== Introduction ===
 
=== Introduction ===
This project is a joined project between [http://www.mpi.nl/ The Max Planck Institute for Psycholinguistics], [http://www.surfnet.nl/ SURFnet] and [http://www.nikhef.nl/ Nikhef].
+
This project is a joined project between [http://www.mpi.nl/ The Max Planck Institute for Psycholinguistics (MPI)], [http://www.surfnet.nl/ SURFnet] and [http://www.nikhef.nl/ Nikhef].
  
The aim is to change the [http://www.mpi.nl/IMDI/tools/ IMDI BCBrowser] such that it can access corpora using client side certificates obtained from an online CA.
+
In the context of the ISLE Meta Data Initiative (IMDI) the Max Planck Institute for Psycholinguistics has developed a number of software tools, such as the [http://www.mpi.nl/IMDI/tools/ IMDI BCBrowser], to handle and explore corpora from the MPI and other institutes. These corpora were until now disclosed via Apache's basic authentication mechanism. Recently they were in addition also disclosed using the [http://shibboleth.internet2.edu/ Shibboleth system], since MPI joined in some EU projects requiring the use of federated login. This Shibboleth system is developed for use with web browsers and is less suitable for standalone applications such as the IMDI browser, which can download whole datasets. Hence it was necessary to look for a solution that would somehow
 +
allow both the direct Shibboleth access for web browsers but also enable non-webbrowser tools to use a federated login. The different authentication methods should all be consistent and intuitive for the user.
  
TODO: use case description, problem, Shibboleth versus PKI Certificates...
+
In the `Grid' world, Authentication and Authorization is based on the use of PKI (Public Key Infrastructure) in the form of X.509 certificates. Delegation (service A tries to access service B on behalf of the user) is implemented using proxy certificates (short lived, fully functional certificates, that
 +
can be traced back to the original user). This PKI system works well for many different applications, including web browsers, but is complex and difficult for many users.
  
=== Description ===
+
In order to try to get the best of both worlds, Shibboleth and PKI, there have been a number of initiatives to set up so-called SLCS services, Short-lived Credentials Services (see for example the [http://www.switch.ch/grid/slcs/ SWITCH SLCS service]). These services are connected to Online CA's that hand out fully functional, but short-lived, certificates to users, who authenticate using their institution login. By moving the identity vetting to the home institution, the process of receiving and using a certificate can stay mostly hidden for the user, thus greatly improving their user-friendliness.
Method used by the IMDI browser to obtain a certificate, see als [[#handshake|image below]].
+
 
 +
=== Aim of the project ===
 +
 
 +
It was decided to set up a project to look at the usability of such a SLCS service for access control of the IMDI corpora. Using PKI for authentication would have a number of extra benefits. First of all, as noted above, it can also be used for delegation, which in the IMDI browser use case would practically mean that while the user goes to a single point of entry, corpora can then try to obtain the requested information at other sites, corpora etc. on behalf of the original user (the `Shopping Basket' model). Secondly, it will make it possible to get access to the computing and data facilities of the Grid. Finally, from a technical point of view client-side certificates are relatively easy to implement.
 +
This project is also interesting as a technology study for the pan-European [http://www.clarin.eu CLARIN project] (Common Language Resources and Technology Infrastructure). As a first step it is therefore necessary to implement working PKI based authentication in the existing repository systems, both on client and server side, with certificates obtained from a SLCS service.
 +
 
 +
=== Work distribution ===
 +
 
 +
The developed implementation can be divided into four separate parts:
 +
# An SLCS service with Online CA, developed by SURFnet
 +
# A set of Java packages in the form of a JAR file, developed by Nikhef
 +
# Adaptions to the code of the MPI IMDI browser Java tool, implemented by Nikhef
 +
# Configuration of the Apache webservers at MPI such that they understand both plain Shibboleth and client side certificates from the SURFnet Onlince CA, implemented by MPI
 +
 
 +
=== Description of the Online CA/SLCS handshake ===
 +
Method used by the IMDI browser to obtain a certificate, see also the [[#handshake|image below]].
  
 
From a (mostly) '''User''' point of view:
 
From a (mostly) '''User''' point of view:
  
# '''User''' clicks/chooses initialization option
+
# The user goes to a login/initialize function of the IMDI browser (this instructs the tool to create a private-/public keypair and a certificate signing request (CSR)) and...
# java browser starts a webbrowser...
+
# ...lets the IMDI browser start a web browser...
# which via the online CA at SURFnet...
+
# ...to the SLCS with a hash of the CSR added
# redirects webbrowser to WAYF (Where Are You From) server where '''user''' chooses his ''Identity Provider''.
+
# The user gets redirected (optionally via a Where Are You From (WAYF)) to an Identity Provider (IdP) for his own institution.
# '''User''' logs in at ''IdP''
+
# The user logs in at his IdP.
# Webbrowser redirects back to online CA. '''User''' closes webbrowser.
+
# The web browser gets redirected back to the SLCS by the IdP, which informs the user he should go back to his application.
# After confirmation by '''user''', java browser now connects itself to online CA
+
# The user now has to instruct the IMDI browser that he is ready, which triggers the IMDI browser to send the full CSR to the SLCS.
# java browser retrieves certificate from online CA and the '''user''' can use it to authenticate with client side certificates.
+
# This step is transparent for the user: the Online CA signs a new certificate with the eduPersonPrincipalName as subject and SLCS sends it back. The IMDI browser stores this certificate and will be using it together with the private key it has, for client side authentication when setting up new https connections.
  
 
Technical overview:
 
Technical overview:
Line 28: Line 45:
 
<ol>
 
<ol>
 
<li> Initialization procedure:<ol  style="list-style-type:lower-alpha">
 
<li> Initialization procedure:<ol  style="list-style-type:lower-alpha">
<li> javabrowser creates a per-session keypair (i.e. never saved to disk).
+
<li> javabrowser creates a per-session keypair (it will never be saved to disk).
 
<li> javabrowser creates a certificate signing request (CSR)</ol>
 
<li> javabrowser creates a certificate signing request (CSR)</ol>
 
<li> javabrowser starts a webbrowser...
 
<li> javabrowser starts a webbrowser...
 
<li> the URL is the online CA + a hash of the CSR.
 
<li> the URL is the online CA + a hash of the CSR.
<li> Now the standard Shibboleth trajectory starts: Online CA redirects the browser to a WAYF where the user chooses his IdP.
+
<li> Now the standard [http://shibboleth.internet2.edu/ Shibboleth] trajectory starts: Online CA redirects the browser to a WAYF where the user chooses his IdP.
 
<li> User logs in at his/her IdP.
 
<li> User logs in at his/her IdP.
<li> Webbrowser sends the user back to the online CA. The URL is now rewritten using [http://shibboleth.internet2.edu/ Shibboleth], and the Online CA knows that the user, who send the CSR hash, is authorized. The user now tells the javabrowser that (s)he is finished with the webbrowser.
+
<li> Webbrowser sends the user back to the online CA. The URL is now rewritten using Shibboleth, and the Online CA knows that the user, who sent the CSR hash, is authorized. The user now tells the javabrowser that (s)he is finished with the webbrowser.
 
<li> The javabrowser sends the full CSR to the Online CA.
 
<li> The javabrowser sends the full CSR to the Online CA.
 
<li> The Online CA:
 
<li> The Online CA:
Line 45: Line 62:
 
The signed certificate is stored inside the javabrowser and will be offered as client side certificate upon opening a HTTPS connection.
 
The signed certificate is stored inside the javabrowser and will be offered as client side certificate upon opening a HTTPS connection.
 
</ol>
 
</ol>
 +
 +
:
 +
{| border="1" cellpadding="10"
 +
| <span id="handshake">[[Image:Imdi handshake.png||IMDI Browser handshake]]</span>
 +
|}
  
 
Notes:
 
Notes:
Line 51: Line 73:
 
* The SLCS model used here is similar (but not identical) to the [http://www.switch.ch SWITCH] model, which is described in detail in [https://edms.cern.ch/document/770102/ https://edms.cern.ch/document/770102/].
 
* The SLCS model used here is similar (but not identical) to the [http://www.switch.ch SWITCH] model, which is described in detail in [https://edms.cern.ch/document/770102/ https://edms.cern.ch/document/770102/].
 
* Another SLCS-like project, which is actually aiming at long-term (+/- 1 year) certificates is the [https://portal.nordu.net/display/ndgfwiki/confusa_intro Confusa/Terena] project.
 
* Another SLCS-like project, which is actually aiming at long-term (+/- 1 year) certificates is the [https://portal.nordu.net/display/ndgfwiki/confusa_intro Confusa/Terena] project.
* The main ''difficulty'' for these SLCS implementations is the interaction of a standalone, non-webbrowser based tool with Shibboleth, since Shibboleth IdP's only requirement is that they work with a webbrowser. On the other hand, the private key has to be present is the tool which eventually will be using the certificate. A number of solutions have been proposed and tried, but since the IdP is only guaranteed to work with a webbrowser we believe it is best to have the javabrowser start a webbrowser. The difficulty then is to guarantee the authentication across applications. We solved this by
+
* The main ''difficulty'' for these SLCS implementations is the interaction of a standalone, non-webbrowser based tool with Shibboleth, since Shibboleth IdP's only requirement is that they work with a webbrowser. On the other hand, the private key has to be present is the tool which eventually will be using the certificate. A number of solutions have been proposed and tried, but since the IdP is only guaranteed to work with a webbrowser we believe it is best to have the javabrowser start a webbrowser. The difficulty then is to guarantee the authentication across the two applications. We solved this by
 
** sending a hash of the CSR during the authentication which can be checked later when the javabrowser sends the CSR itself
 
** sending a hash of the CSR during the authentication which can be checked later when the javabrowser sends the CSR itself
 
** limiting the time between authentication and sending the CSR
 
** limiting the time between authentication and sending the CSR
 
** requiring both tools to work from the same host.
 
** requiring both tools to work from the same host.
  
:
 
{| border="1" cellpadding="10"
 
| <span id="handshake">[[Image:Imdi handshake.png||IMDI Browser handshake]]</span>
 
|}
 
  
 
=== Code and Files ===
 
=== Code and Files ===
  
*[http://www.nikhef.nl/grid/slcshttps/slcshttps_v0.2_full.zip full zip-archive] (Full zip including jar file, build, and javadoc)
+
*[http://www.nikhef.nl/grid/slcshttps/slcshttps_v0.2_full.zip full zip-archive] (Full zip file including jar file, classes and javadoc)
 
*[http://www.nikhef.nl/grid/slcshttps/slcshttps_v0.2_src.zip zip-archive] (Zip including only sources, run ant to get the rest)
 
*[http://www.nikhef.nl/grid/slcshttps/slcshttps_v0.2_src.zip zip-archive] (Zip including only sources, run ant to get the rest)
 
*[http://www.nikhef.nl/grid/slcshttps/slcshttps_jdk15_v0.2.jar JDK1.5 jarfile]
 
*[http://www.nikhef.nl/grid/slcshttps/slcshttps_jdk15_v0.2.jar JDK1.5 jarfile]
 
*[http://www.nikhef.nl/grid/slcshttps/doc/ Javadoc API]
 
*[http://www.nikhef.nl/grid/slcshttps/doc/ Javadoc API]
*[https://ndpfsvn.nikhef.nl/cgi-bin/viewvc.cgi/pdpsoft/trunk/nl.nikhef.slcshttps/ SVN repository with source]
+
*[https://ndpfsvn.nikhef.nl/cgi-bin/viewvc.cgi/pdpsoft/trunk/nl.nikhef.slcshttps/ Browsable SVN repository with source]
Check out all code using
+
*The code can be checked out using the command
 
  svn checkout https://ndpfsvn.nikhef.nl/repos/pdpsoft/trunk/nl.nikhef.slcshttps  
 
  svn checkout https://ndpfsvn.nikhef.nl/repos/pdpsoft/trunk/nl.nikhef.slcshttps  
  
 
Note that you also need the [http://www.bouncycastle.org/ BouncyCastle provider] to build and/or run.
 
Note that you also need the [http://www.bouncycastle.org/ BouncyCastle provider] to build and/or run.
Direct link to the BouncyCastle [http://www.bouncycastle.org/download/bcprov-jdk15-144.jar JDK1.5 jarfile]
+
Direct link to the [http://www.bouncycastle.org/download/bcprov-jdk15-144.jar BouncyCastle 1.44 JDK1.5 jarfile]
  
 
=== Talks ===
 
=== Talks ===

Revision as of 15:49, 5 January 2010

Projects:

nl.nikhef.slcshttps

Introduction

This project is a joined project between The Max Planck Institute for Psycholinguistics (MPI), SURFnet and Nikhef.

In the context of the ISLE Meta Data Initiative (IMDI) the Max Planck Institute for Psycholinguistics has developed a number of software tools, such as the IMDI BCBrowser, to handle and explore corpora from the MPI and other institutes. These corpora were until now disclosed via Apache's basic authentication mechanism. Recently they were in addition also disclosed using the Shibboleth system, since MPI joined in some EU projects requiring the use of federated login. This Shibboleth system is developed for use with web browsers and is less suitable for standalone applications such as the IMDI browser, which can download whole datasets. Hence it was necessary to look for a solution that would somehow allow both the direct Shibboleth access for web browsers but also enable non-webbrowser tools to use a federated login. The different authentication methods should all be consistent and intuitive for the user.

In the `Grid' world, Authentication and Authorization is based on the use of PKI (Public Key Infrastructure) in the form of X.509 certificates. Delegation (service A tries to access service B on behalf of the user) is implemented using proxy certificates (short lived, fully functional certificates, that can be traced back to the original user). This PKI system works well for many different applications, including web browsers, but is complex and difficult for many users.

In order to try to get the best of both worlds, Shibboleth and PKI, there have been a number of initiatives to set up so-called SLCS services, Short-lived Credentials Services (see for example the SWITCH SLCS service). These services are connected to Online CA's that hand out fully functional, but short-lived, certificates to users, who authenticate using their institution login. By moving the identity vetting to the home institution, the process of receiving and using a certificate can stay mostly hidden for the user, thus greatly improving their user-friendliness.

Aim of the project

It was decided to set up a project to look at the usability of such a SLCS service for access control of the IMDI corpora. Using PKI for authentication would have a number of extra benefits. First of all, as noted above, it can also be used for delegation, which in the IMDI browser use case would practically mean that while the user goes to a single point of entry, corpora can then try to obtain the requested information at other sites, corpora etc. on behalf of the original user (the `Shopping Basket' model). Secondly, it will make it possible to get access to the computing and data facilities of the Grid. Finally, from a technical point of view client-side certificates are relatively easy to implement. This project is also interesting as a technology study for the pan-European CLARIN project (Common Language Resources and Technology Infrastructure). As a first step it is therefore necessary to implement working PKI based authentication in the existing repository systems, both on client and server side, with certificates obtained from a SLCS service.

Work distribution

The developed implementation can be divided into four separate parts:

  1. An SLCS service with Online CA, developed by SURFnet
  2. A set of Java packages in the form of a JAR file, developed by Nikhef
  3. Adaptions to the code of the MPI IMDI browser Java tool, implemented by Nikhef
  4. Configuration of the Apache webservers at MPI such that they understand both plain Shibboleth and client side certificates from the SURFnet Onlince CA, implemented by MPI

Description of the Online CA/SLCS handshake

Method used by the IMDI browser to obtain a certificate, see also the image below.

From a (mostly) User point of view:

  1. The user goes to a login/initialize function of the IMDI browser (this instructs the tool to create a private-/public keypair and a certificate signing request (CSR)) and...
  2. ...lets the IMDI browser start a web browser...
  3. ...to the SLCS with a hash of the CSR added
  4. The user gets redirected (optionally via a Where Are You From (WAYF)) to an Identity Provider (IdP) for his own institution.
  5. The user logs in at his IdP.
  6. The web browser gets redirected back to the SLCS by the IdP, which informs the user he should go back to his application.
  7. The user now has to instruct the IMDI browser that he is ready, which triggers the IMDI browser to send the full CSR to the SLCS.
  8. This step is transparent for the user: the Online CA signs a new certificate with the eduPersonPrincipalName as subject and SLCS sends it back. The IMDI browser stores this certificate and will be using it together with the private key it has, for client side authentication when setting up new https connections.

Technical overview:

  1. Initialization procedure:
    1. javabrowser creates a per-session keypair (it will never be saved to disk).
    2. javabrowser creates a certificate signing request (CSR)
  2. javabrowser starts a webbrowser...
  3. the URL is the online CA + a hash of the CSR.
  4. Now the standard Shibboleth trajectory starts: Online CA redirects the browser to a WAYF where the user chooses his IdP.
  5. User logs in at his/her IdP.
  6. Webbrowser sends the user back to the online CA. The URL is now rewritten using Shibboleth, and the Online CA knows that the user, who sent the CSR hash, is authorized. The user now tells the javabrowser that (s)he is finished with the webbrowser.
  7. The javabrowser sends the full CSR to the Online CA.
  8. The Online CA:
    1. calculates the hash
    2. checks whether it is known/corresponds to a authorized user.
    3. if yes, signs the CSR
    4. sends a HTTP reply with the signed certificate.

    The signed certificate is stored inside the javabrowser and will be offered as client side certificate upon opening a HTTPS connection.

[[Image:Imdi handshake.png IMDI Browser handshake]]

Notes:

  • In Shibboleth terminology, The Online CA is a Service Provider (SP) whose service is the creation of certificates.
  • In standard CA/RA certificate terminology, the online CA Service Provider is the CA, while the IdP plays the role of RA.
  • The SLCS model used here is similar (but not identical) to the SWITCH model, which is described in detail in https://edms.cern.ch/document/770102/.
  • Another SLCS-like project, which is actually aiming at long-term (+/- 1 year) certificates is the Confusa/Terena project.
  • The main difficulty for these SLCS implementations is the interaction of a standalone, non-webbrowser based tool with Shibboleth, since Shibboleth IdP's only requirement is that they work with a webbrowser. On the other hand, the private key has to be present is the tool which eventually will be using the certificate. A number of solutions have been proposed and tried, but since the IdP is only guaranteed to work with a webbrowser we believe it is best to have the javabrowser start a webbrowser. The difficulty then is to guarantee the authentication across the two applications. We solved this by
    • sending a hash of the CSR during the authentication which can be checked later when the javabrowser sends the CSR itself
    • limiting the time between authentication and sending the CSR
    • requiring both tools to work from the same host.


Code and Files

svn checkout https://ndpfsvn.nikhef.nl/repos/pdpsoft/trunk/nl.nikhef.slcshttps 

Note that you also need the BouncyCastle provider to build and/or run. Direct link to the BouncyCastle 1.44 JDK1.5 jarfile

Talks

gLite security

See e.g. Nikhef Site Access Control pages