Commit Graph

377 Commits

Author SHA1 Message Date
Benjamin Dauvergne a041a2ef81 Initialize all uninitialized rc variables 2010-04-30 09:23:01 +00:00
Benjamin Dauvergne 6e072c2b5f Fix wrong change g_free -> lasso_release inside example code 2010-04-22 11:19:32 +00:00
Benjamin Dauvergne 2f5ef5fef0 Improve safety by replacing all g_list_free use by lasso_release_list 2010-04-22 00:44:57 +00:00
Benjamin Dauvergne 0a169eda51 Improve safety by replacing all g_free use by lasso_release 2010-04-22 00:44:45 +00:00
Benjamin Dauvergne c93fb2a356 Start an example listing for an IdP SingleSignOn endpoint 2010-04-22 00:44:31 +00:00
Benjamin Dauvergne 2d89170af6 Login: remove symbol markers in example code 2010-04-19 11:51:28 +00:00
Benjamin Dauvergne 05aad98ec3 Fix documentation problems 2010-04-19 11:30:35 +00:00
Benjamin Dauvergne c95e6b9918 Docs: remove from documentation comments characters outside ASCII for python bindings 2010-04-06 13:11:00 +00:00
Benjamin Dauvergne 7d9159dea8 update documentation of lasso_login_build_authn_response_msg 2010-03-27 17:40:03 +00:00
Benjamin Dauvergne 34e9e35413 update documentation of lasso_login_build_authn_request_msg 2010-03-27 17:40:01 +00:00
Benjamin Dauvergne 9aa68aa4ef improve documentation of lasso_login_build_artifact_msg 2010-03-27 17:40:00 +00:00
Benjamin Dauvergne 938d84e0ea use lasso_release_gobject in lasso_login_destroy 2010-03-27 17:39:59 +00:00
Benjamin Dauvergne aea8e65e82 update lasso_login_accept_sso documentation 2010-03-27 17:39:57 +00:00
Benjamin Dauvergne f09332e9d6 ID-FF&SAML2: complete documentation of lasso_login_build_assertion 2010-03-27 17:39:56 +00:00
Benjamin Dauvergne f5442dc84b SAML 2.0: add support for attribute, authentication and authorization authorities metadata
* server.c,serverprivate.h: add new private method
   lasso_server_get_firs_providerID_by_role(server, role)w
 * defederation.c: use new private method
   lasso_server_get_first_providerID_by_role for find providerID
   when the argument remote_providerID is null in
   lasso_defederation_init_notification.
 * lasso/id-ff/login.c (lasso_login_init_authn_request): use new private
   method lasso_server_get_first_providerID_by_role.
 * provider.h: add thre new provider role (authn,pdp,attribute) and
    four new services (authn,assertionid,attribute,authz) and also
    a ROLE_ANY value (-1) for catchall purpose and a ROLE_LAST for
    array sizing.
 * provider.h: add a LAST member to LassoMdProtocolType enum.
  * providerprivate.h,provider.c:
   - removes separate hashtable for descriptors depending on provider role,
     use only one table named Descriptors.
   - use the LAST members of enumerations to dimention static string arrays.
  * provider.h: add a LAST member to the e
2010-03-27 16:51:43 +00:00
Benjamin Dauvergne 59246ba028 Add complete error code listing for lasso_login_process_response_msg
* lasso/id-ff/login.c:
   list all error codes and their semantic with respect to this call.
2010-02-10 00:34:09 +00:00
Benjamin Dauvergne f2b5731eb5 Update code example for LassoLogin
* lasso/id-ff/login.c:
   add code for intializaing request for SAML 2.0, shows how to handler errors codes.
2010-02-10 00:34:04 +00:00
Benjamin Dauvergne f520348197 Core: use lasso_node_new_from_dump to implement _new_from_dump methods
* provider.c:
   add annotation for nullable arguments (necessary for bindings of
   new_from_buffer).
 * server.c: add annotations, allow to set encryption_private_key from
   buffers
2010-02-04 00:02:12 +00:00
Benjamin Dauvergne a45b383cd0 Core: document return values of lasso_login_validate_request_msg 2010-02-01 19:50:03 +00:00
Benjamin Dauvergne 92efc271a4 SAML 2.0: fix annotations, documentation and signatures 2010-01-29 00:43:50 +00:00
Benjamin Dauvergne d42c16e239 Core Node: add args to lasso_node_encrypt to set recipient of an encrypted element 2010-01-12 15:39:57 +00:00
Benjamin Dauvergne 2ff13e5414 SAML 2.0: overhaul for ubuquitous binding support, still need work for HTTP-Artefact 2010-01-12 15:39:48 +00:00
Benjamin Dauvergne b6c9be9fa2 Core Login: in login.c, add assertion accessor
* docs/reference/lasso/lasso-sections.txt:
   declare new function
 * lasso/id-ff/login.c lasso/id-ff/login.h:
   add new function lasso_login_get_assertion.
 * lasso/saml-2.0/login.c:
   store created assertions
 * lasso/id-ff/login.h:
   make assertion field private for bindings.
2010-01-04 09:14:20 +00:00
Benjamin Dauvergne 012b7c3af5 Fix double g_object_unref
* lasso/id-ff/login.c:
   status is already freed by lasso_assign_gobject, do not free it first
   with lasso_node_destroy.
2009-11-30 22:58:57 +00:00
Benjamin Dauvergne 6921dd1d9b ID-FF1.2 and SAML2: remove direct access to profile->server->providers
* client of LassoServer should use lasso_server_get_provider.
 * LASSO_PROFILE_ERRROR_UNKNOWN_PROVIDER was a mistake, it is
   superfluous, use LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND.
2009-10-30 14:47:23 +00:00
Benjamin Dauvergne 17d6885dfc Change setting of default NameIDFormat for SAML 2.0 login
* saml-2.0/login.c:
   in lasso_saml20_login_init_authn_request,
   lasso_saml20_login_init_idp_initiated_authn_request, if the service
   provider provided a list of supported name id formats, use the first
   one as default for new AuthnRequest.
 * id-ff/login.c:
   modify documentation to report the new way of choosing a default.
2009-09-29 13:20:33 +00:00
Benjamin Dauvergne 1fb7750337 Complete documentation of lasso_login_init_authn_request concerning the NameIDFormat
* lasso/id-ff/login.c:
   in lasso_login_init_authn_request, add docbook formatting, add
   remarks about the different NameIDFormat for ID-FF 1.2 and SAML 2.0.
2009-09-29 13:12:37 +00:00
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 e3bdadf8f7 ID-FF 1.2: Fix leaks, reduce code
* id-ff/login.c:
 * id-ff/logout.c:
 * id-ff/profile.c:
 * id-ff/provider.c:
 * id-ff/server.c:
   fix leaks by using field setting macros which frees previous values,
   it also reduce code length sometimes.
2009-04-30 14:58:20 +00:00
Benjamin Dauvergne 83ce945c5f lasso_login_init_request(): change error code for invalid artifacts
* lasso/id-ff/login.c:
   if artifact is invalid return LASSO_PROFILE_ERROR_INVALID_ARTIFACT as
   in lasso_saml20_profile_init_artifact_resolve().
2009-04-27 08:19:22 +00:00
Benjamin Dauvergne aec28fdac6 Complete documentation of lasso_login_init_request
* lasso/id-ff/login.c:
   add precision on usage. add all possible return codes with meanings.
2009-04-27 08:19:20 +00:00
Benjamin Dauvergne c7ec6c1ed9 lasso_login_init_authn_request: complete doc
* lasso/id-ff/login.c:
   add all possible return codes and their meaning.
2009-04-27 08:19:18 +00:00
Benjamin Dauvergne 22e51935c7 lasso_login_init_authn_request: change error code for missing remote provider ID
* lasso/id-ff/login.c:
   change the return code for when no remote provider ID could be
   defined (because the argument is NULL and the server object contains
   no providers) so that we can distingish the case where the given
   provider is unknown or if there is no providers configured.
2009-04-27 08:19:17 +00:00
Benjamin Dauvergne a70c175015 Add a deprecated tag to lasso_login_destroy doc
* lasso/id-ff/login.c:
   all destroy functions are deprecated, g_object_unref() should be used
   instead.
2009-04-27 08:19:15 +00:00
Benjamin Dauvergne 0df4e13e7a Complete documentation of lasso_login_byuld_response_msg
* lasso/id-ff/login.c:
   add all possible return codes with meaning.
2009-04-27 08:19:13 +00:00
Benjamin Dauvergne 251dfa0d0b Complete documentation of lasso_login_build_request_msg
* lasso/id-ff/login.c:
   add all possible return codes with meaning.
2009-04-27 08:19:11 +00:00
Benjamin Dauvergne f12c2e7332 Complet documentation for lasso_login_build_authn_response_msg
* lasso/id-ff/login.c:
   add all possible return codes with meaning.
2009-04-27 08:19:09 +00:00
Benjamin Dauvergne 530e6ceac0 Complete documentation of lasso_login_build_authn_request
* lasso/id-ff/login.c:
   add all possible return codes with meaning.
2009-04-27 08:19:08 +00:00
Benjamin Dauvergne c56ba110ea Complete documentation for lasso_login_build_artifact_msg
* lasso/id-ff/login.c:
   add all possible return codes with meaning.
2009-04-27 08:19:06 +00:00
Benjamin Dauvergne 77495e50d3 Complet documentation of lasso_login_accept_sso
* lasso/id-ff/login.c:
   add all possible return codes.
2009-04-27 08:19:04 +00:00
Benjamin Dauvergne 6f79955dfb Complete doc for static function lasso_login_musk_ask_for_consent
* lasso/id-ff/login.c:
   precise return value meaning.
2009-04-27 08:19:02 +00:00
Benjamin Dauvergne df81b3438f Complete document of lasso_login_build_assertion
* lasso/id-ff/login.c:
   add possible return codes.
2009-04-27 08:19:00 +00:00
Benjamin Dauvergne 52e60ecb09 Rework cleanup handling
* lasso/utils.h:
   change 'goto exit' for 'goto cleanup'. rename all goto_exit macros to
   goto_cleanup_.  rename goto_cleanup_if_fail to
   goto_cleanup_if_fail_with_rc and add a
   goto_cleanup_if_fail for function which do not return an integer
   value. add documentation for goto_cleanup macro family.
 * lasso/id-ff/login.c:
 * lasso/id-ff/provider.c:
 * lasso/id-ff/server.c:
 * lasso/id-ff/session.c:
 * lasso/id-wsf/discovery.c:
 * lasso/id-wsf/wsf_profile.c:
 * lasso/saml-2.0/profile.c:
 * lasso/utils.h:
 * lasso/xml/lib_logout_request.c:
 * lasso/xml/tools.c:
 * lasso/xml/xml.c:
   update name of goto_exit_if_fail macros. rename 'exit' labels to
   'cleanup'.
2009-04-22 23:49:29 +00:00
Benjamin Dauvergne 50c9870fe2 ID-FF 1.2: Only verify InResponseTo if strict checking is on
* lasso/id-ff/login.c:
   add condition upon checking of the InResponseTo field: checks only if
   strict checking is activated as it could stop old code using Lasso
   from working.
2009-03-27 15:06:41 +00:00
Benjamin Dauvergne 5268ee2928 ID-FF 1.2 Login: Use allocation macros
* lasso/id-ff/login.c: (lasso_login_init_authn_request) again a passing by
  correction, use lasso_assign_string for copying information from
  the request to the profile object.
2009-03-27 15:06:17 +00:00
Benjamin Dauvergne fbc86db17f ID-FF 1.2: Handle RelayState inside LassoLogin
* lasso/id-ff/login.c:
   - (lasso_login_init_request) catch RelayState in the query_fields and
     copy it to msg_relayState
   - (lasso_login_process_authn_request_msg) copy RelayState from the
     request object to the profile object.
2009-03-27 15:06:15 +00:00
Benjamin Dauvergne 88ce5a5669 SAML 2.0: In login change includes for relative paths
* lasso/id-ff/login.c: changes headers for relatives paths
2009-03-27 15:05:55 +00:00
Benjamin Dauvergne 3b2f3fbced Core: add xmlDoc parameter to lasso_provider_verify_saml_signature
* lasso/id-ff/provider.c:
   add an xmlDoc parameter to lasso_provider_verify_saml_signature,
   reflecting change in lasso_verify_signature.
   fix memory leaks of an xmlSecKeysMngr.
   complete arguments checking.
 * lasso/id-ff/login.c:
   update use of lasso_provider_verify_signature in LassoLogin
2009-03-27 15:04:58 +00:00
Benjamin Dauvergne 5e125fda5e ID-FF 1.2: rework lasso_login_process_status_and_assertion
* lasso/id-ff/login.c:
   reword lasso_login_process_status_and_assertion,
   remove wrong NameID decryption code (it cannot work),
   adapt to new signature of lasso_provider_verify_saml_signature,
2009-03-27 15:04:55 +00:00