Commit Graph

5157 Commits

Author SHA1 Message Date
Benjamin Dauvergne 94a9fe4f02 [xml saml-2.0] add a class to handle the KeyInfoConfirmationData type
* use a direct mapping to map this class to SubjectConfirmationData
   node having the xsi:type attribute.
 * overload get_xmlNode method to add the xsi:type attribute on output.
2011-10-13 01:12:04 +02:00
Benjamin Dauvergne f69b561c47 [xml] allow node classes to not defined their nodename, useful for simple Type 2011-10-13 01:09:29 +02:00
Benjamin Dauvergne c6d4076599 [id-wsf2 profile] check provider->private_data->roles instead of provider->role
Fixes #140.
2011-10-10 17:38:03 +02:00
Benjamin Dauvergne 984759ea67 [id-wsf discovery] provider can now contain multiple public keys, only consider the first key for id-wsf token generation
ID-WSF never contemplated the fact that sometimes key roll-over happend
(SubjectConfirmation can only containg on ds:KeyInfo), whatever...
2011-10-10 17:26:09 +02: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 aa7fae5fc1 [xml] if a SNIPPET_LIST_NODES as the SNIPPET_ANY flag, allows really any kind of node through LassoMiscTextNode 2011-10-10 16:31:03 +02:00
Benjamin Dauvergne 7b1aa28c2c [xml] allows LassoMiscText.init_from_xml to parse any xmlNode
If the node has no attributes and has a simple string content, we use the
classic embedding by setting, name, ns_href, ns_prefix. Otherwise the complete
xmlNode is copied.
2011-10-10 16:31:03 +02:00
Benjamin Dauvergne 627294f52c [tests] add non-regression tests concerning the parsing of any xmlNode tree by LassoMiscTextNode when SNIPPET_ANY is used by a LassoNode 2011-10-10 16:31:00 +02:00
Benjamin Dauvergne 94136d639b [xml] only try to map an xmlNode to a class ame if the node has a namespace 2011-10-10 16:17:28 +02:00
Benjamin Dauvergne f638f379e7 [xml saml-2.0] change AttributeValue snippets to accept any children
An AttributeValue has an XSchema type of xs:any.
2011-10-10 16:14:50 +02:00
Benjamin Dauvergne a7be1fa114 [xml] create a static version of lasso_node_new_from_xmlNode_with_type without error logging
When used inside lasso_node_impl_init_from_xml the error logging is
prematurely sent as there is a backup procedure for parsing unknown
nodes inside a SNIPPET_LIST_NODES by creating a LassoMiscTextNode
containing a copy of the parsed xmlNode child.
2011-10-07 13:08:49 +02:00
Benjamin Dauvergne 9430491963 [configure.ac] default AM_MAINTAINER_MODE to enable 2011-09-09 15:39:43 +02:00
Benjamin Dauvergne da5260de18 [configure.ac] remove useless semi-colons 2011-07-08 21:17:01 +02:00
Benjamin Dauvergne b1183fe341 Fix wrong version exported in the PHP binding 2011-07-08 21:15:20 +02:00
Benjamin Dauvergne 14b5c395cc Change the glob expression to match darwin $host_os
Also use the $DARWIN flag to control the setting of JNI_EXTRA_LDFLAGS.
2011-06-03 11:24:02 +02:00
Benjamin Dauvergne 8aadadef4d [java] try to make test works under Mac Os X 2011-05-30 22:24:39 +02:00
Benjamin Dauvergne 9cedec628e [core] finish transition from single encryption key to multiple ones
Some code still reference provider->private->encryption_public_key, this
commit make them use lasso_provider_get_encryption_public_key().
2011-05-30 22:24:37 +02:00
Benjamin Dauvergne 24a29f954a [bindings perl] remove --as-needed from linker flags, it is not supported evrywhere
It can come back if we add proper checking of the support on the
platform, maybe we can leverage tests made by autoconf.
2011-05-27 16:02:30 +02:00
Benjamin Dauvergne ed44ea81a8 Disable metadata loading test with the UK federation files 2011-05-27 16:01:44 +02:00
Benjamin Dauvergne 8036813115 Merge branch 'multi-certificates' 2011-05-23 10:53:50 +02:00
Benjamin Dauvergne bd7e649272 [bindings perl] in Makefile.am, gives a default template to mktemp
Thanks to Nathan Sowatskey for the bug report and the fix.
2011-05-19 17:55:12 +02:00
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