Commit Graph

5236 Commits

Author SHA1 Message Date
Benjamin Dauvergne 8191837436 [core] start of support multiple keys for encryption 2011-05-19 17:54:16 +02:00
Benjamin Dauvergne 187cc7a528 [tests] add unit test for the provider with multiple key feature 2011-05-19 17:54:16 +02:00
Benjamin Dauvergne 94a890ddda [tests] add sample metadata for testing metadata with multiple key descriptors 2011-05-19 17:54:16 +02:00
Benjamin Dauvergne e67f2bb658 [core] first try at multiple signing keys support
The idea was to replace every use of an xmlSecKey* by a loop over a
GList* of xmlSecKey*.

 - In the structure LassoProviderPrivate changed
    xmlSecKey*public_key            ->   GList* signing_public_keys
    xmlNode*signing_key_descriptor  ->   GList* signing_key_descriptors.
 - Renamed lasso_provider_try_loading_public_key to
   lasso_provider_try_loading_public_keys and chaned its signature
   accordingly
 - Renamed lasso_provider_get_public_key to
   lasso_provider_get_public_keys and changed the signature accordingly.
 - Changed lasso_provider_get_encryption_public_key to return the first
   signing key from the list as a temporary work around. Multiple
   encryption keys will be supported later.
 - Changed lasso_provider_load_public_key to load keys from the passed
   file on the LassoProvider constructor, from every key descriptors
   found for signing and eventually from the key descriptor marked for
   encryption.
 - Every failure to load from a file or an XML KeyInfo descriptor are
   noew reported as warning.
 - Query signature checking was completely moved to
   lasso_provider_verify_query_signature and
   lasso_provider_verify_signature now calls it.
 - lasso_provider_verify_signature is now using lasso_verify_signature
   from the xml/tools.o module.
 - lasso_provider_verify_single_signature was modified to support
   multiple signing keys.
2011-05-19 17:54:16 +02:00
Benjamin Dauvergne e14652e7a4 [utils] add macros to append to and release a list of xmlSecKey*
[core] make lasso_provider_verify_query_signature use lasso_provider_verify_signature
2011-05-19 17:54:16 +02:00
Benjamin Dauvergne 298e6a50e2 [bindings perl] in Makefile.am, gives a default template to mktemp 2011-05-19 17:53:58 +02:00
Benjamin Dauvergne b7cbdd0d77 [xml] use g_strndup instead of strndup, as it is more portable 2011-05-18 23:44:10 +02:00
Benjamin Dauvergne f455be4387 [tests] fix broken renater metadata file
A modification was introduced which broke the signature, updating to the
last version.
2011-05-17 14:48:27 +02:00
Benjamin Dauvergne ce93f37992 [tests] move renater metadata files into the metadata/ subdirectory 2011-05-16 09:37:04 +02:00
Benjamin Dauvergne 2a3a56f8e1 [saml2] add proper error code for partial logout status code 2011-05-08 00:04:40 +02:00
Benjamin Dauvergne cbeecfe280 [saml2] fix build_request_msg for AuthzDecision assertion queries
The servicepoints and roles arrays did not match the provider role
enumerations.
2011-05-08 00:03:02 +02:00
Benjamin Dauvergne 481aeef4e0 [saml2] if Status is not Success pass continue processing the response
lasso_saml20_login_process_response_status_and_assertion does analyze
the response status code login specific error codes, if the generic
processing from lasso_saml20_profile_process_any_response returns a
status of response is not success, we must continue processing.
2011-04-21 11:23:10 +02:00
Benjamin Dauvergne 7016e7c453 [saml2] for any RequestDenied SAML2 response return LASSO_PROFILE_ERROR_REQUEST_DENIED as error 2011-04-21 11:23:06 +02:00
Benjamin Dauvergne ebd9266cb5 [core] add a generic LASSO_PROFILE_ERROR_REQUEST_DENIED 2011-04-21 11:01:36 +02:00
Benjamin Dauvergne 3c260bfe4a [core] make LassoServerLoadMetadataFlag enum a typedef 2011-04-20 14:53:24 +02:00
Benjamin Dauvergne 0ae13fe29c Merge branch 'load-federation' 2011-04-14 17:17:20 +02:00
Benjamin Dauvergne 8b216a4307 [tools] redirect xmlsec errors to lasso error handler 2011-04-14 17:15:42 +02:00
Benjamin Dauvergne 890d88c8c5 [tools] use LASSO_LOG_DOMAIN instead of magic constant 2011-04-14 17:15:31 +02:00
Benjamin Dauvergne 95f48822f4 [Makefile] move lasso/xml/tools.h to public headers 2011-04-14 17:12:29 +02:00
Benjamin Dauvergne 8be7b0414d [core] add flags parameter to lasso_server_load_metadata to tune signature checking on metadata files
The flags parameter allows to control the checking of digital signature
upon EntityDescriptor and EntitiesDescriptor nodes in SAML 2.0 metadata
files.

The default behaviour is to check all found signatures and to inherit
signature from EntitiesDescriptor to their children.

By only enabling checking of EntityDescrtiptor node signatures it's also
possible to only check signature at the EntityDescriptor level and so
only trust individual entities and not the aggregating provider.
2011-04-14 16:45:43 +02:00
Benjamin Dauvergne 1171ee2e8b [core] update documentation of lasso_server_load_metadata 2011-04-04 18:52:00 +02:00
Benjamin Dauvergne cad3d305a9 [core] make lasso_server_load_metadata load any metadata file
The new code can load metadata file with a EntityDescriptor root node,
and with nested EntitiesDescriptor.

Idea and prototype by Olav Morken.
2011-04-04 18:34:06 +02:00
Benjamin Dauvergne 31a623aeee [server] in lasso_server_load_metadata do not duplicate checks already made by lasso_verify_signature
lasso_verify_signature already checks that reference is to the given
signed node, be it referenced through an ID or through an empty
reference.
2011-04-04 15:57:55 +02:00
Benjamin Dauvergne 6477d6043c [xml] if signature reference is empty check that signed node is the document root
An empty reference means the complete document, so the signed node is
the root element of this document. We must check that the parameter
signe_node dmatches our assumption.
2011-04-04 15:57:54 +02:00
Benjamin Dauvergne 345c3b50f8 [core] rename lasso_server_load_federation to lasso_server_load_metadata
The aim of this function is now to load any metadata file, and to
replace completely the use of lasso_server_add_provider.
The metadata content argument is replaced by a metadata file path to
more closely match other APIs.
2011-04-04 15:57:07 +02:00
Benjamin Dauvergne 3521c642be [web] update download page 2011-04-04 11:52:29 +02:00
Benjamin Dauvergne a9f9b3d9a2 [core] add a loaded_entity_ids output parameter to lasso_server_load_federation
It allows to know which entity has been loaded from the metadata file.
It must be freed by the caller.
2011-03-30 14:20:45 +02:00
Benjamin Dauvergne a0aba29273 [core] add a blacklisted_entity_ids parameter to lasso_server_load_federation
The goal is to prevent loading of provider known to have problems.
2011-03-30 11:15:39 +02:00
Benjamin Dauvergne 70562db09a [tests] remove spurious output 2011-03-29 18:46:32 +02:00
Benjamin Dauvergne fbb3e962ad [tests] continue improving the lasso_server_load_federation test cases 2011-03-29 18:46:32 +02:00
Benjamin Dauvergne 77c6c49bad [tests] test lasso_server_load_federation
The test operates on the metadata file of the french university network
Renater.
2011-03-29 18:46:02 +02:00
Benjamin Dauvergne a77570b2db [tests] add renater federation metadata file for testing 2011-03-29 18:45:23 +02:00
Benjamin Dauvergne f289edb534 [core] add a lasso_server_load_federation method
This method allows to load providers in bulk from what is called a
federation file, i.e a SAML metadata file containing declarations for
more than one provider. Those file are usually signed to bind some trust
to its content, so lasso_server_load_federation can take an optional
file path to a certificate chain file used to check the signature on the
given XML content. Only same document signature is accepted (i.e. there
must be only one XML signature reference and it should be to the empty
string meaning the « current » document).
2011-03-29 18:43:48 +02:00
Benjamin Dauvergne f840037c6a [core] add a private constructor to build LassoProvider object from an xmlNode
I'm not sure of the need outside lasso so I will let this method private
for the moment. It's an helper method for the
lasso_server_load_federation method which traverses an
EntitiesDescriptor node to find all the EntityDescriptor contained
inside.
2011-03-29 18:43:48 +02:00
Benjamin Dauvergne dac3f345ad [saml2] add and internal method to load a federation metadata file
It only loads one kind of provider (idp or sp). It's currently
impossible for a provider to have the two roles at the same time toward
a given LassoServer object, i.e. the current service is a service
provider or an identity provider, it cannot be the two at the same time.
2011-03-29 18:43:47 +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 04dd5610b0 [xml] allow empty reference in XML signature (document signature) 2011-03-29 18:43:47 +02:00
Benjamin Dauvergne e84a1e8a8a [xml] make id_attr_name parameter optional for lasso_verify_signature 2011-03-29 18:14:35 +02:00
Benjamin Dauvergne 78c9a9382a [xml] fix lasso_node_get_xmlnode_for_any_type
xmlCopyPropList does not copy the property list into the target it just
copy it with respect to the target (mainly for namespace references).

This patch adds the real copy into the target node.
2011-03-07 16:25:17 +01:00
Benjamin Dauvergne 7ef67c8d7e [core] add missing namespace definitions to internal objects
Identity, Lecp, Login, Logout, NameIdentifierMapping, NameRegistration,
Session, AssertionQuery, Ecp and NameIdManagement objects were missing a
namespace association to their GObject class. It broke when you try to
dump a node created by lasso_node_new_from_dump.
2011-03-01 10:58:54 +01:00
Benjamin Dauvergne ff065bf750 [tests] add test case for multiple load and dump of the same object 2011-03-01 10:58:53 +01:00
Frédéric Péters e50d2d6206 [debian] adapt packaging to official section overrides 2011-02-08 11:15:19 +01:00
Frédéric Péters 862bcff904 [debian] sync packaging with official package 2011-02-08 11:14:28 +01:00
Benjamin Dauvergne 449b99532c Merge branch 'master' of git@dev.entrouvert.org:lasso 2011-01-25 15:38:21 +01:00
Jean-Marc Liger 2dcb20a925 [Fedora RPM] spec file update 2011-01-25 15:33:28 +01:00
Benjamin Dauvergne ea92dbe937 [tests] change perfs to accept a second parameter giving the data files to use
Also add metadata files to check performance with 512 and 1024 bit RSA
keys.
2011-01-24 14:49:35 +01:00
Frédéric Péters ce80031692 [php5] Comments starting with '#' are deprecated 2011-01-14 13:48:48 +01:00
Benjamin Dauvergne d502db18dd Remove right column with download, binary packages and source links
It is redundant with other columns.
2011-01-05 18:10:07 +01:00
Benjamin Dauvergne d3312e95f0 [web] fix date and version in news 19 2011-01-05 16:07:09 +01:00
Benjamin Dauvergne ccba7694ba [web] fix typo in news for release 2.3.5 2011-01-05 14:21:49 +01:00