Commit Graph

66 Commits

Author SHA1 Message Date
Benjamin Dauvergne f55c927255 [saml2] fix handling of SingleSignOnServer in lasso_saml20_provider_get_first_http_method
When checking if a synchronous http method can be used for sending a
request to the SingleSignOnService we must check if the response can
received by the AssertionConsumerService with a synchronous binding not
the SingleSignOnService.
2012-03-17 15:21:23 +01:00
Benjamin Dauvergne 727f07b1ae Simplify useless complexity in include paths 2011-12-16 14:17:31 +01:00
Benjamin Dauvergne 26d6b35a49 [leakcheck] fix leaks seen by the unit tests
This commit also improved valgrind suppression file to hide static
allocations done by the GLib type system.
2011-11-22 17:45:52 +01:00
Benjamin Dauvergne b7a94f2db8 [saml-2.0] augment lasso_saml20_provider_get_first_http_method to verify presence of synchronous bindings 2011-10-10 16:31:04 +02:00
Benjamin Dauvergne 8df7a0022c [saml2] improve reporting of errors when loading a provider metadata file 2011-03-29 18:43:47 +02:00
Benjamin Dauvergne 2b90dcd503 [saml2] when parsing short numbers reinitialize errno 2011-01-04 16:37:34 +01:00
Benjamin Dauvergne cfd58003fa [saml2] fix errors in lasso)provider_get_first_http_method when a binding is unknown 2010-12-21 16:38:57 +01:00
Benjamin Dauvergne e401253f8d [saml2 provider] change critical messages to debug messages 2010-12-21 10:58:48 +01:00
Benjamin Dauvergne d8bff0dbb3 [saml2 profile] fix bug in binding_uri_to_http_method with the POST binding 2010-12-21 10:54:38 +01:00
Jérôme Schneider 270f1743f0 Add missing include <errno.h> 2010-10-08 14:10:02 +02:00
Benjamin Dauvergne 4bf2a6c0c0 [SAMLv2] fix bad double free bug in lasso_saml20_provider_get_assertion_consumer_service_url_by_binding 2010-10-07 18:39:06 +02:00
Benjamin Dauvergne 06c2ec9d61 [SAMLv2] fix ordering of endpoints
Ordering by binding is wrong, first order by isDefault (as stated in
saml-metadata-2.0.pdf) then by index.
2010-10-06 17:00:52 +02:00
Benjamin Dauvergne 462c9a1cd0 [Core] replace all use of g_strcmp0 by lasso_strisequal and lasso_strisnotequal
Too much human errors with strcmp kind of functions. Also change name os
lasso_is_empty_string to lasso_strisempty.
2010-10-01 15:29:38 +02:00
Benjamin Dauvergne 6cc9ae7e32 [SAMLv2] fix wrong order in use of macro lasso_foreach
The first argument must be the iterator, the second is the iterable.
Also add a non-regression test with Googleapps metadata and and a
typical authn request.
2010-09-27 16:17:07 +02:00
Benjamin Dauvergne 3f336a8e83 Merge branch 'develop' into hotfixes-2.3.1 2010-09-03 19:07:08 +02:00
Benjamin Dauvergne aaca9ce992 [ID-FFv1.2&SAMLv2] add more warning for failure to load metadata file
Report detailf of the failure through warning log.
2010-09-03 19:02:42 +02:00
Benjamin Dauvergne 908d4288a0 [SAMLv2] rebuild specialized LassoProvider methods upon new endpoints storage
The new way of storing endpoints allows to keep ordering between
endpoints with respect to the order of the index and isDefault field for
indexed endpoint type, and to the XML node orders for other endpoints.

It also simplifies the code.
2010-08-25 18:57:25 +02:00
Benjamin Dauvergne 6526985342 SAMLv2: make role checking inactive for LassoServer
* LassoServer have no role defined, so checking breaks loading of
   metadata for LassoServer.
2010-06-06 14:03:52 +00:00
Benjamin Dauvergne b7e2f36e67 SAML 2.0: add checks for proper loading of role descriptors
* remove warning for descriptors supporting non SAML 2.0 protocols
 * checks that at least one descriptor was loaded and that it was for
   our assigned role.
2010-06-04 09:32:50 +00:00
Benjamin Dauvergne 5fdf579a94 SAMLv2: remove HTTP-Redirect as right binding for AssertionConsumer 2010-05-31 07:13:52 +00:00
Benjamin Dauvergne 8b72703948 SAMLv2: fix bug giving UnuspportedProfile for SingleSignOn with HTTP-POST
* The string constant in lasso_saml20_provider_accept_http_method was
   HTTP-Post instead of HTTP-POST.
2010-05-31 07:13:50 +00:00
Benjamin Dauvergne a0fb1580ad SAMLv2: simplify lasso_saml20_provider_accept_http_method by only checking for remote provider support
* Whatever we do, with asyncrhonous bindings the remote provider can
   return the response with any asynchronous binding.
2010-05-31 07:13:43 +00:00
Benjamin Dauvergne 6e4d8b57d4 SAML 2.0: fix lasso_saml20_provider_get_first_http_method
* LassoServer object can have many roles, use the default role of the
   remote provider to decide on which to assume.
2010-04-27 22:55:25 +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 e9be17236d SAML 2.0: add internal method to retrieve the binding for an URL 2010-04-20 09:34:18 +00:00
Benjamin Dauvergne 05aad98ec3 Fix documentation problems 2010-04-19 11:30:35 +00:00
Benjamin Dauvergne 46044e2d9c SAML 2.0: fix default assertion consumer handling when isDefault is missing
* if no default_assertion_consumer value is set after traversing the
   list of endpoint, try to find the first one without isDefault="false"
   and finally take the first one.
2010-04-06 13:11:28 +00:00
Benjamin Dauvergne b90a0b2160 SAML 2.0: fix default assertion consumer handling
* the default one is the first with the attribute isDefault not the
   last.
2010-04-06 13:11:26 +00:00
Benjamin Dauvergne c07cd3898c SAML 2.0&ID-FF 1.2: simplify and complete metadata loading for multi-role support 2010-03-27 16:52:04 +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 b30498aec6 ID-FF&SAML2: if use is not defined on a key descriptor use the key for any use
* lasso/id-ff/provider.c lasso/saml-2.0/provider.c: if the "use"
   attribute is not set on a KeyDescriptor, use the key for signing and
   encryption.
2010-01-14 16:18:24 +00:00
Benjamin Dauvergne e06e9db029 SAML 2.0: in lasso_saml20_provider_accept_http_method, add HTTP-Artifact-POST case, better check for bad inputs, and handle special SingleSignOn case 2010-01-12 15:40:07 +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 56bd9e2405 Fix mitm attack using the AssertionConsumerURL property on requests
* lasso/saml-2.0/login.c: check that the URL is know before using it
 * lasso/saml-2.0/provider.c lasso/saml-2.0/providerprivate.h:
   add a function to check that an URL corresponds to a know
   AssertionConsumer of the given provider.
2010-01-12 15:39:31 +00:00
Benjamin Dauvergne 399ca193e3 SAML 2.0: in provider.c, add node encryption function and reference it in doc
* lasso/saml-2.0/Makefile.am:
   add new header provider.h
 * lasso/saml-2.0/provider.c lasso/saml-2.0/provider.h:
   add new function lasso_provider_saml2_node_encrypt to encrypt nodes
   and encapslutate the XML Enc datas in a LassoSaml2EncryptedElement
   node.
 * docs/reference/lasso/lasso-sections.txt:
   add function to saml2_utils section
2010-01-04 09:14:10 +00:00
Benjamin Dauvergne bdd1ad92a0 Core: add const modifier to return value of lasso_provider_get_metadata_list
- lasso/id-ff/provider.c lasso/id-ff/provider.h:
   change return type of lasso_provider_get_metadata_list from GList* to
   const GList*.
 - lasso/id-ff/logout.c lasso/saml-2.0/logout.c
   lasso/saml-2.0/provider.c:
   change consumers of the API
2009-09-29 13:20:40 +00:00
Benjamin Dauvergne 00ea5d7113 Core: Add const modifiers to LassoProvider methods
* lasso/id-ff/provider.c lasso/id-ff/provider.h
   lasso/saml-2.0/provider.c lasso/saml-2.0/provider.h:
   add const modifier where they could be added.
2009-09-29 13:20:38 +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 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 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 aff32ad997 Add log message in the metadata loading process
- lasso/id-ff/provider.c, lasso/saml-2.0/provider.c: add critical log
   message in each failed loading of metadatas branch cases.
2008-11-05 11:23:29 +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
Frédéric Péters 0419af4f0d proper casts of xmlChar* 2008-01-23 12:17:46 +00:00
Damien Laniel 38acc2883b added support for encrypting name identifiers with id-ff 1.2 2007-12-05 10:48:49 +00:00
Frédéric Péters 0a91e76505 added support for sending SAMLv2 AuthnResponse over HTTP-Redirect (which
shouldn't be used because the assertion within makes for a very big message)
2007-11-27 23:17:21 +00:00
Damien Laniel e8e38c374d coding style 2007-06-12 14:15:55 +00:00
Damien Laniel 4fc6657e0c updated Copyright dates in all files 2007-05-30 17:17:45 +00:00