Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "CardSync Authentication"

(Authentication with OpenId, X509Certificate, ...)
 
(11 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
[[Image:Higgins_logo_76Wx100H.jpg|right]]
 
[[Image:Higgins_logo_76Wx100H.jpg|right]]
  
With the exception of addUserProfile, getPasswordResetCode etc. all [[CardSync API]] methods require user authentication. These diagrams illustrate the sequence of interactions between Local I-Card Selector and CardSync Web App.
+
With the exception of addUserProfile, getPasswordResetCode etc. all [[CardSync Web App]] methods require authentication. This page describes the auth flow.
 
+
'''NOTE: this page is obsolete after a discussion on this topic week of 3/30/2009'''
+
  
 +
===Sequences===
 +
These diagrams illustrate the sequence of interactions between a selector and the [[CardSync Service]].
  
 
[[Image:AuthenticationUSD.jpg|790x400px]]
 
[[Image:AuthenticationUSD.jpg|790x400px]]
Line 11: Line 11:
  
 
===Authentication Process===
 
===Authentication Process===
1. Get Access Token (Sign on).<br>
+
#Get Access Token (Sign on).<br>
1.1 Local ICard Selector may request AccessToken  by passing the following credentials: <br>
+
##Local ICard Selector may request AccessToken  by passing one of the following types of credentials:  
* SamlTokenCredentialTO - for authenticating by using SAML token;
+
##*SamlTokenCredentialTO - for authenticating by using SAML token;
* UsernamePasswordCredentialTO - for authenticating by using username/password.
+
##*UsernamePasswordCredentialTO - for authenticating by using username/password.
1.2 Card Sync Web App invokes authenticate(AuthCredentialTO) method of Card Sync Service. <br>
+
##Card Sync Web App invokes authenticate(AuthCredentialTO) method of Card Sync Service.  
1.3 Card Sync Service delegate authentication to ILoginService (JAAS).<br>
+
## Card Sync Service delegate authentication to ILoginService (JAAS).
1.4 if ILoginService may  authenticate user it return UserAccout instance (it needs for accessing protected data).<br>
+
## if ILoginService authenticates user it returns a UserAccount instance (it needs for accessing protected data).
1.5 Card Sync Web App  invokes buildAccessToken(userAccount) Card Sync Service method for generating AccessToken.<br>
+
## Card Sync Web App  invokes buildAccessToken(userAccount) Card Sync Service method for generating an AccessToken.
1.6 Card Sync Service builds and stores AccessToken.<br>
+
## Card Sync Service builds and stores AccessToken.
1.7 Card Sync Web App return AccessTokenTO to Local ICard Selector.<br>
+
## Card Sync Web App returns AccessTokenTO to Local ICard Selector.
<br><br>
+
#Get user protected data.<br>
 
+
## Selector application asks Card Sync Web App for protected data by using Access Token Identifier (AccessTokenTO.id).
2. Get user protected data.<br>
+
## Card Sync Web App delegates validation of Access Token Identifier to Card Sync Service's checkAccessToken(AccessTokenTO.id) method.
2.1 Local ICard Selector asking  Card Sync Web App for protected data by using Access Token Identifier (AccessTokenTO.id).<br>
+
## if Access Token Identifier is valid Card Sync Service returns AccessToken.
2.2 Card Sync Web App delegates validation of Access Token Identifier to Card Sync Service checkAccessToken(AccessTokenTO.id).<br>
+
## Card Sync Web App retrieves protected data by using AccessToken.
2.3 if Access Token Identifier is valid Card Sync Service return AccessToken.<br>
+
## Card Sync Web App returns protected data to Selector.
2.4 Card Sync Web App retrieve protected data by using AccessToken.<br>
+
# Delete Access Token (Sign out).<br>
2.5 Card Sync Web App return  protected data to Local ICard Selector.<br>
+
## Selector has to invoke deleteAccessToken(AccessTokenTO.id) Card Sync Web App method.<br>
<br>
+
## Card Sync Web App delegates it to Card Sync Service by using  deleteAccessToken(id) method.<br>
3. Delete Access Token (Sign out).<br>
+
3.1 Local ICard Selector has to invoke deleteAccessToken(AccessTokenTO.id) Card Sync Web App method.<br>
+
3.2 Card Sync Web App delegates it to Card Sync Service by using  deleteAccessToken(id) method.<br>
+
  
 
===Pass Access Token Identifier with HTTP header===
 
===Pass Access Token Identifier with HTTP header===
We're going to support Rest API for synchronizing user cards. It assumes to use http GET requests for retrieving protectedn data, so it has to include  Access Token Identifier to request url. if we  pass  Access Token Identifier by using http header, it may be more protected way (of course only with https).   
+
We're going to support Rest API for synchronizing user cards. It assumes the use of http GET requests for retrieving protected data, so it has to include  Access Token Identifier in request url. If we  pass  Access Token Identifier in the http header, it may be more protected way (of course only with https).   
  
 
Both Rest and Soap web services would read access token from http headers.
 
Both Rest and Soap web services would read access token from http headers.
  
Local ICard Selector should pass Access Token Identifier by using http "Authorization" header according to the following format.
+
The Selector application should pass the Access Token Identifier by using http "Authorization" header according to the following format.
 
<code>Authorization: HWS <Access Token Identifier></code>
 
<code>Authorization: HWS <Access Token Identifier></code>
 
  
 
===Access Token idle timeout and max live time===
 
===Access Token idle timeout and max live time===
Line 49: Line 45:
  
 
=== Authentication with SAML token===
 
=== Authentication with SAML token===
1. Local ICard Selector has to invoke getSecurityPolicy() Card Sync Web App method for obtaining security policy.
+
1. Local ICard Selector has to invoke getSecurityPolicy() Card Sync Web App method for obtaining security policy.<br>
 
2. Local ICard Selector has to invoke getAccessToken(SamlTokenCredentialTO) Card Sync Web App method for authenticating with SAML token.
 
2. Local ICard Selector has to invoke getAccessToken(SamlTokenCredentialTO) Card Sync Web App method for authenticating with SAML token.
 
  
 
=== Authentication with OpenId, X509Certificate, ...===
 
=== Authentication with OpenId, X509Certificate, ...===
For supporting new authentication type we have to add just one method getAccessToken(<new  credential data> ).
+
To support new authentication types we have only to add one method, getAccessToken(<new  credential data>).

Latest revision as of 02:14, 30 July 2009

{{#eclipseproject:technology.higgins|eclipse_custom_style.css}}

Higgins logo 76Wx100H.jpg

With the exception of addUserProfile, getPasswordResetCode etc. all CardSync Web App methods require authentication. This page describes the auth flow.

Sequences

These diagrams illustrate the sequence of interactions between a selector and the CardSync Service.

AuthenticationUSD.jpg AuthenticationULD.jpg

Authentication Process

  1. Get Access Token (Sign on).
    1. Local ICard Selector may request AccessToken by passing one of the following types of credentials:
      • SamlTokenCredentialTO - for authenticating by using SAML token;
      • UsernamePasswordCredentialTO - for authenticating by using username/password.
    2. Card Sync Web App invokes authenticate(AuthCredentialTO) method of Card Sync Service.
    3. Card Sync Service delegate authentication to ILoginService (JAAS).
    4. if ILoginService authenticates user it returns a UserAccount instance (it needs for accessing protected data).
    5. Card Sync Web App invokes buildAccessToken(userAccount) Card Sync Service method for generating an AccessToken.
    6. Card Sync Service builds and stores AccessToken.
    7. Card Sync Web App returns AccessTokenTO to Local ICard Selector.
  2. Get user protected data.
    1. Selector application asks Card Sync Web App for protected data by using Access Token Identifier (AccessTokenTO.id).
    2. Card Sync Web App delegates validation of Access Token Identifier to Card Sync Service's checkAccessToken(AccessTokenTO.id) method.
    3. if Access Token Identifier is valid Card Sync Service returns AccessToken.
    4. Card Sync Web App retrieves protected data by using AccessToken.
    5. Card Sync Web App returns protected data to Selector.
  3. Delete Access Token (Sign out).
    1. Selector has to invoke deleteAccessToken(AccessTokenTO.id) Card Sync Web App method.
    2. Card Sync Web App delegates it to Card Sync Service by using deleteAccessToken(id) method.

Pass Access Token Identifier with HTTP header

We're going to support Rest API for synchronizing user cards. It assumes the use of http GET requests for retrieving protected data, so it has to include Access Token Identifier in request url. If we pass Access Token Identifier in the http header, it may be more protected way (of course only with https).

Both Rest and Soap web services would read access token from http headers.

The Selector application should pass the Access Token Identifier by using http "Authorization" header according to the following format. Authorization: HWS <Access Token Identifier>

Access Token idle timeout and max live time

Access Token will be deleted automatically on server side:

  • if it isn't used more than idle timeout;
  • if maximum live time expires (difference between creation time and current server time).

Authentication with SAML token

1. Local ICard Selector has to invoke getSecurityPolicy() Card Sync Web App method for obtaining security policy.
2. Local ICard Selector has to invoke getAccessToken(SamlTokenCredentialTO) Card Sync Web App method for authenticating with SAML token.

Authentication with OpenId, X509Certificate, ...

To support new authentication types we have only to add one method, getAccessToken(<new credential data>).

Back to the top