Commit Graph

35 Commits

Author SHA1 Message Date
Benjamin Dauvergne 7231771856 All: Rework include files handling, separated ID-WSF code from SAML2/ID-FF code
* nearly all C files: change includes for relative paths.
 * lasso/id-wsf/id_wsf.h, lasso/id-wsf-2.0/id_wsf_2.h: add top level
   public include files for ID-WSF 1.0 and ID-WSF 2.0.
 * lasso/id-ff/server.*, lasso/id-ff/session.*, lasso/id-ff/identity.*:
   remove most of the code related to ID-WSF and push into
   lasso/id-wsf/id_ff_extensions.* and lasso/id-wsf-2.0/identity.c,
   lasso/id-wsf-2.0/server.c, lasso/id-wsf-2.0/session.c.
 * lasso/id-wsf-2.0/saml2_login.c,
   lasso/id-wsf-2.0/saml2_login_private.h: same change but for ID-WSF
   2.0 support in SAML2 SSO profile.
2009-08-26 15:14:32 +00:00
Benjamin Dauvergne fbfbe5553d ID-FF&Core: Seal public field of LassoSession
* id-ff/session.h: seal public fields.

 * id-ff/session.c, id-ff/sessionprivate.h: add accessors for reading
   the is_dirty flag and counting store assertions.

 * id-ff/logout.c, id-ff/login.c, saml-2.0/login.c, saml-2.0/logout.c,
   saml-2.0/profile.c: use the new accessors.

 * id-ff/profile.c: include the private header file, use the new
   accessors, and remove unnecessary setting of is_dirty to FALSE (it
   should be false at instanciation).

 * utils.h: add a macro to access private content, prepare for using
   G_TYPE_INSTANCE_GET_PRIVATE and the GObject infrastructure for
   private structures eventually.
2009-08-26 15:13:55 +00:00
Benjamin Dauvergne 8841328655 Do not remove signatures on assertion when using HTTP Redirect
* lasso/saml-2.0/profile.c:
   HTTP Redirect binding mandate to remove signature at the SAML message
   level, but signatures at the assertion, especially if the SP asked for
   it, must be preserved.
2009-06-15 12:27:50 +00:00
Benjamin Dauvergne c5f5f84329 SAML 2.0: Fix many leaks
* lasso/saml-2.0/login.c:
 * lasso/saml-2.0/logout.c:
 * lasso/saml-2.0/name_id_management.c:
 * lasso/saml-2.0/profile.c:
 * lasso/saml-2.0/provider.c:
   do not mix g_malloc strings with libxml strings, use the
   string/gobject handling macros as much as possible, be a good memory
   citizen, don't put your elbows on the table.
2009-04-30 14:58:11 +00:00
Benjamin Dauvergne 2a75e87543 More work on signature validation for SAML 2.0
* lasso/saml-2.0/profile.c:
   in lasso_saml20_profile_process_any_request and
   lasso_saml20_profile_process_any_response do not make signature
   validation failure as call failure, just store the result in
   profile->signature_status and let the upper level functions handle
   what to do with it. also add documentation about those two functions.

 * lasso/saml-2.0/logout.c:
 * lasso/saml-2.0/name_id_management.c:
   handle new signature_status semantic.

 * lasso/saml-2.0/login.c:
   add internal documentation for
   lasso_saml20_login_process_authn_response_msg.
2009-04-27 15:48:53 +00:00
Benjamin Dauvergne 4ba02b0725 lasso_saml20_profile_init_artifact_resolve(): check http_method
* lasso/saml-2.0/profile.c:
   check the given http_method it must one in
   - LASSO_HTTP_METHOD_ARTIFACT_POST,
   - LASSO_HTTP_METHOD_ARTIFACT_GET.
2009-04-27 08:19:24 +00:00
Benjamin Dauvergne 8fe7780441 SAML 2.0: Use new API lasso_url_add_parameter
* lasso/saml-2.0/profile.c:
   use new API lasso_url_add_parameter to handle RelayState parameter
   creation.
2009-04-22 23:49:24 +00:00
Benjamin Dauvergne 280f5d0c72 SAML 2.0: Update generic relaystate handling
* lasso/saml-2.0/profile.c:
   in lasso_saml20_profile_build_redirect_request_msg and
   lasso_saml20_profile_build_redirect_response, use new function
   lasso_saml20_profile_build_http_redirect.
2009-03-27 15:06:44 +00:00
Benjamin Dauvergne 88eaabc94d SAML 2.0: add direct treatment of relaystate for HTTP-Redirect binding
* lasso/saml-2.0/login.c: In
  lasso_saml20_login_process_authn_request_msg change handling of
  relayState do not rely upon parsing by the node object, but extract
  directly from the query string. Use new function
  lasso_get_relaystate_from_query.
* lasso/saml-2.0/logout.c: In lasso_saml20_logout_process_request_msg
  change handling of relayState do not rely upon parsing by the node
  object, but extract directly from the query string.
* lasso/saml-2.0/profile.c: In
  lasso_saml20_profile_init_artifact_resolve, add handling of the
  relayState transmitted to the assertion consumer URL.
* lasso/saml-2.0/name_id_management.c: In
  lasso_name_id_management_process_request_msg change handling of
  relayState do not rely upon parsing by the node
  object, but extract directly from the query string.
2009-03-27 15:05:52 +00:00
Benjamin Dauvergne f55ff8ea5e SAML 2.0: Add helper function to implement the HTTP-Redirect binding
* lasso/saml-2.0/profile.c, lasso/saml-2.0/profileprivate.h:
   - remove_all_signature traverse a tree of LassoNode objects to unset
     all signature_type field in on nodes supporting signature
     generation.
   - lasso_saml20_profile_export_to_query does the job of generateing
     the url containing the message content and the relaystate, then
     sign it using lasso_query_sign.
   - lasso_saml20_profile_build_http_redirect use those two functions
     and the metadatas to build the signed redirect url.
2009-03-27 15:05:44 +00:00
Benjamin Dauvergne 5d93009e0b SAML 2.0: add internal generic implementation
* lasso/saml-2.0/profile.c:
 * lasso/saml-2.0/profileprivate.h:
   the current effort is to simplify implementation code in saml-2.0 and
   much of the other frameworks. Those new methods:
        lasso_saml20_init_request
        lasso_saml20_profile_process_name_identifier_decryption
        lasso_saml20_profile_process_soap_request
        lasso_saml20_profile_process_soap_response
        lasso_saml20_profile_process_any_request
        lasso_saml20_profile_process_any_response
        lasso_saml20_profile_setup_request_signing
        lasso_saml20_profile_build_request_msg
        lasso_saml20_profile_build_response
        lasso_saml20_profile_init_response
   should help reduce code in login.c, logout.c, name_id_management.c
   and assertion_query.c. They should also permit to make all profiles
   at the same level of binding support
   (GET,REDIRECT,POST,ARTIFACT_GET,ARTIFACT_POST).

   Those function centralize error code handling, initialization of
   commong class (LassoSamlp2StatusResponse and
   LassoSamlp2RequestAbstract) and also the handling of NameID
   decryption.
2009-03-27 15:05:07 +00:00
Benjamin Dauvergne b09ef2e015 Core: do not mix public and private headers
* lots of files:
   explicitely load the internal header xml/private.h where needed.
2009-03-27 15:04:26 +00:00
Benjamin Dauvergne 9ed0670e48 * Remove ending blanks 2008-09-12 15:06:58 +00:00
Benjamin Dauvergne ae1f6a297c * Remove warnings:
- remove unused parameter from private function signatures
 - remove unused variable
 - initialize variable potentially accessed uninitialized
 - add G_GNUC_UNUSED if function is public or adhering to an interface, and a
   parameter is unused.
 - if ID-WSF is not compiled in, define stubs with G_GNUC_UNUSED on parameters.
 The goal is to compile with -Werror.
2008-09-12 13:57:22 +00:00
Damien Laniel cf4cf42f1a added a missing reference 2008-05-21 22:13:16 +00:00
Damien Laniel a6ed1b1c11 added some more missing unreference 2008-05-21 17:28:44 +00:00
Benjamin Dauvergne 6a1e276c71 * validate input in lasso_profile_is_saml_query 2008-05-13 13:48:11 +00:00
Frédéric Péters ea872ad761 error checking when processing artifact response. 2007-10-19 08:54:28 +00:00
Damien Laniel 4fc6657e0c updated Copyright dates in all files 2007-05-30 17:17:45 +00:00
Frédéric Péters 7de91cfa6e removed memory leak (GPtrArray was not freed) by directly accessing assertions
from their hash table instead of an intermediary GPtrArray.
2007-01-03 20:58:38 +00:00
Frédéric Péters 5dee8a3682 changed test against assertions which could yield a useless
LASSO_ERROR_UNDEFINED
2006-12-27 16:12:50 +00:00
Frédéric Péters 1b0f96f6c7 fixed a few (harmless) warnings detected when compiling with -Wall
-Wmissing-declarations -Wdeclaration-after-statement
2006-12-21 00:03:08 +00:00
Frédéric Péters c5572210da SAMLv2 compliance fix (mostly RelayState and affiliations related) 2006-12-07 15:19:30 +00:00
Frédéric Péters 08bcef745b re-enabling saml2 signature check 2006-11-29 23:36:26 +00:00
Damien Laniel 6ce1f2f044 return -1 was not cute 2006-11-24 09:11:11 +00:00
Damien Laniel 0a391478be Added an original node to encrypted elements, only in dumps, for the dump to be readable 2006-11-23 17:44:26 +00:00
Damien Laniel 1e7983b0df Encrypt and decrypt Assertion 2006-11-21 13:31:35 +00:00
Damien Laniel 45e7e8e448 Replaced some LASSO_ERROR_UNDEFINED with real error codes 2006-11-14 10:36:40 +00:00
Frédéric Péters bb60709b78 fix saml2 artifact decoding 2006-11-03 09:42:55 +00:00
Frédéric Péters 44ad1a38cc new lasso_profile_is_saml_query function 2006-11-02 14:13:19 +00:00
Frédéric Péters bb5f3e06d3 include authentication statement in saml2 assertion 2006-10-30 12:48:26 +00:00
Frédéric Péters 0a2da8394c saml2 artifacts include an endpoint index; fill it with 0 for the moment. 2006-10-30 09:51:04 +00:00
Frédéric Péters dd76935c23 use new error code for missing artifact 2006-10-29 18:17:00 +00:00
Frédéric Péters 853f46fd93 starting SAML 2 logout 2005-11-21 18:51:52 +00:00
Frédéric Péters ebb9f7dffc SAML 2.0 support (only web-sso for the moment) 2005-11-20 15:38:19 +00:00