summaryrefslogtreecommitdiffstats
path: root/lasso
Commit message (Collapse)AuthorAgeFilesLines
...
| * [core] do not emit a warning for expected decryption errorsBenjamin Dauvergne2011-11-222-4/+10
| | | | | | | | | | | | | | | | | | | | The only expected decryption error is on decryption of the symetric key used to crypt the data. All other errors are critical and must be logged. Client of lasso_node_decrypt_xmlnode can then log the decryption failure of the symetric if they tried with all possible keys (key rollover case).
| * [core] add a new class of errors for xml encryption errorsBenjamin Dauvergne2011-11-222-0/+9
| | | | | | | | | | add LASSO_XMLENC_ERROR_INVALID_ENCRYPTED_DATA for generic unrecoverable xml decryption errors.
| * [leakcheck] fix leaks seen by the unit testsBenjamin Dauvergne2011-11-225-5/+7
| | | | | | | | | | This commit also improved valgrind suppression file to hide static allocations done by the GLib type system.
| * [core] multiple decryption keys supportBenjamin Dauvergne2011-11-217-58/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit complements the support for multiple signing certificate support in the metadata files. The use-case is still key roll-over. The structure LassoServerPrivateData was changed to accomodate multiple decryption keys, and so: xmlSecKey *encryption_private_key became: GList *encryption_private_keys All uses of this key were replaced by a loop over this list, terminating with the first key to be able to decrypt the content. The private key passed to lasso_server_new() or lasso_server_new_from_buffers() is first added to the list of decryption keys. Any other call to lasso_server_set_encryption_private_key_with_password() or lasso_server_set_encryption_private_key() will add a new key to the list.
* | Merge branch 'excl-c14n-fix'Benjamin Dauvergne2011-11-291-0/+26
|\ \ | |/ |/|
| * [core] fix wrong XML canonicalization when assertion is extracted without ↵Benjamin Dauvergne2011-11-221-0/+26
| | | | | | | | its namespace context
| * [misc] apply changes to remove warning blocking compilation with gcc 4.5.2 ↵Benjamin Dauvergne2011-11-211-1/+1
| | | | | | | | | | | | | | | | | | and php 5.3.5 - gcc now warns when you compate a typedef to the anonymous enum which define it. - some inline function in the zend.h header do compare between signed and unsigned char.
* | [saml2] add missing extension point for LassoSaml2SubjectConfirmationDataBenjamin Dauvergne2011-11-181-0/+10
| | | | | | | | | | - it can support any content and any attribute without validation xs:any with processContents="lax"
* | [xml] allow to store XSchema data into a private stuctureBenjamin Dauvergne2011-11-182-65/+117
| | | | | | | | | | | | | | | | | | | | - added new macros SNIPPET_STRUCT_MEMBER and SNIPPET_STRUCT_MEMBER_P replaces use of G_STRUCT_MEMBER/_P macros. - we use the GType of the class containing a given XmlSnippet to find the proper private structure. - added flag SNIPPET_PRIVATE to state XmlSnippet whose value should be extracted from the private structure and not the public one.
* | [core] add missing break to switch/caseBenjamin Dauvergne2011-11-181-0/+1
| |
* | [misc] apply changes to remove warning blocking compilation with gcc 4.5.2 ↵Benjamin Dauvergne2011-10-181-1/+1
| | | | | | | | | | | | | | | | | | and php 5.3.5 - gcc now warns when you compate a typedef to the anonymous enum which define it. - some inline function in the zend.h header do compare between signed and unsigned char.
* | [xml saml-2.0] add missing annotation for binding generation to header for ↵Benjamin Dauvergne2011-10-181-1/+1
| | | | | | | | LassoKeyInformationDataType
* | [xml saml-2.0] add a class to handle the KeyInfoConfirmationData typeBenjamin Dauvergne2011-10-134-0/+254
| | | | | | | | | | | | * 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.
* | [xml] allow node classes to not defined their nodename, useful for simple TypeBenjamin Dauvergne2011-10-131-2/+7
| |
* | [id-wsf2 profile] check provider->private_data->roles instead of provider->roleBenjamin Dauvergne2011-10-101-1/+8
| | | | | | | | Fixes #140.
* | [id-wsf discovery] provider can now contain multiple public keys, only ↵Benjamin Dauvergne2011-10-101-2/+7
| | | | | | | | | | | | | | 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...
* | [saml-2.0] augment lasso_saml20_provider_get_first_http_method to verify ↵Benjamin Dauvergne2011-10-101-1/+52
| | | | | | | | presence of synchronous bindings
* | [xml] if a SNIPPET_LIST_NODES as the SNIPPET_ANY flag, allows really any ↵Benjamin Dauvergne2011-10-101-6/+3
| | | | | | | | kind of node through LassoMiscTextNode
* | [xml] allows LassoMiscText.init_from_xml to parse any xmlNodeBenjamin Dauvergne2011-10-101-7/+13
| | | | | | | | | | | | 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.
* | [xml] only try to map an xmlNode to a class ame if the node has a namespaceBenjamin Dauvergne2011-10-101-1/+1
| |
* | [xml saml-2.0] change AttributeValue snippets to accept any childrenBenjamin Dauvergne2011-10-101-1/+1
| | | | | | | | An AttributeValue has an XSchema type of xs:any.
* | [xml] create a static version of lasso_node_new_from_xmlNode_with_type ↵Benjamin Dauvergne2011-10-071-9/+21
| | | | | | | | | | | | | | | | | | 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.
* | [core] finish transition from single encryption key to multiple onesBenjamin Dauvergne2011-05-302-10/+9
| | | | | | | | | | Some code still reference provider->private->encryption_public_key, this commit make them use lasso_provider_get_encryption_public_key().
* | [core] start of support multiple keys for encryptionBenjamin Dauvergne2011-05-191-1/+1
| |
* | [core] first try at multiple signing keys supportBenjamin Dauvergne2011-05-192-116/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | [utils] add macros to append to and release a list of xmlSecKey*Benjamin Dauvergne2011-05-192-19/+10
| | | | | | | | [core] make lasso_provider_verify_query_signature use lasso_provider_verify_signature
* | [xml] use g_strndup instead of strndup, as it is more portableBenjamin Dauvergne2011-05-181-3/+1
| |
* | [saml2] add proper error code for partial logout status codeBenjamin Dauvergne2011-05-083-0/+12
| |
* | [saml2] fix build_request_msg for AuthzDecision assertion queriesBenjamin Dauvergne2011-05-081-5/+7
| | | | | | | | | | The servicepoints and roles arrays did not match the provider role enumerations.
* | [saml2] if Status is not Success pass continue processing the responseBenjamin Dauvergne2011-04-211-1/+2
| | | | | | | | | | | | | | 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.
* | [saml2] for any RequestDenied SAML2 response return ↵Benjamin Dauvergne2011-04-211-0/+3
| | | | | | | | LASSO_PROFILE_ERROR_REQUEST_DENIED as error
* | [core] add a generic LASSO_PROFILE_ERROR_REQUEST_DENIEDBenjamin Dauvergne2011-04-212-1/+9
| |
* | [core] make LassoServerLoadMetadataFlag enum a typedefBenjamin Dauvergne2011-04-204-10/+10
| |
* | [tools] redirect xmlsec errors to lasso error handlerBenjamin Dauvergne2011-04-141-0/+12
| |
* | [tools] use LASSO_LOG_DOMAIN instead of magic constantBenjamin Dauvergne2011-04-141-3/+4
| |
* | [Makefile] move lasso/xml/tools.h to public headersBenjamin Dauvergne2011-04-141-2/+2
| |
* | [core] add flags parameter to lasso_server_load_metadata to tune signature ↵Benjamin Dauvergne2011-04-144-28/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | [core] update documentation of lasso_server_load_metadataBenjamin Dauvergne2011-04-041-7/+8
| |
* | [core] make lasso_server_load_metadata load any metadata fileBenjamin Dauvergne2011-04-045-36/+110
| | | | | | | | | | | | | | The new code can load metadata file with a EntityDescriptor root node, and with nested EntitiesDescriptor. Idea and prototype by Olav Morken.
* | [server] in lasso_server_load_metadata do not duplicate checks already made ↵Benjamin Dauvergne2011-04-041-7/+1
| | | | | | | | | | | | | | | | 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.
* | [xml] if signature reference is empty check that signed node is the document ↵Benjamin Dauvergne2011-04-041-2/+3
| | | | | | | | | | | | | | | | 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.
* | [core] rename lasso_server_load_federation to lasso_server_load_metadataBenjamin Dauvergne2011-04-042-8/+5
| | | | | | | | | | | | | | 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.
* | [core] add a loaded_entity_ids output parameter to lasso_server_load_federationBenjamin Dauvergne2011-03-304-5/+17
| | | | | | | | | | It allows to know which entity has been loaded from the metadata file. It must be freed by the caller.
* | [core] add a blacklisted_entity_ids parameter to lasso_server_load_federationBenjamin Dauvergne2011-03-304-6/+15
| | | | | | | | The goal is to prevent loading of provider known to have problems.
* | [core] add a lasso_server_load_federation methodBenjamin Dauvergne2011-03-292-0/+74
| | | | | | | | | | | | | | | | | | | | | | 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).
* | [core] add a private constructor to build LassoProvider object from an xmlNodeBenjamin Dauvergne2011-03-293-17/+41
| | | | | | | | | | | | | | | | 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.
* | [saml2] add and internal method to load a federation metadata fileBenjamin Dauvergne2011-03-292-0/+52
| | | | | | | | | | | | | | 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.
* | [saml2] improve reporting of errors when loading a provider metadata fileBenjamin Dauvergne2011-03-291-2/+7
| |
* | [xml] allow empty reference in XML signature (document signature)Benjamin Dauvergne2011-03-292-7/+20
| |
* | [xml] make id_attr_name parameter optional for lasso_verify_signatureBenjamin Dauvergne2011-03-291-4/+6
| |