Commit Graph

254 Commits

Author SHA1 Message Date
John Dennis 964530aaca add ECP unit test
Test ECP.
3 different variations of the SP provided IDP List are exercised.

Signed-off-by: John Dennis <jdennis@redhat.com>
License: MIT
2015-08-24 16:05:29 +02:00
Benjamin Dauvergne 9e5c4389a8 Add checks for failure of an allocation function from libxml (#8070)
g_malloc always trap on allocation errors but not xmlMalloc.
2015-08-24 10:25:03 +02:00
Benjamin Dauvergne 9854cd50f3 xml: handle failure of xmlSecBase64Decode() (fixes #8070)
Thanks to fpeters for the patch.
2015-08-24 10:25:03 +02:00
Benjamin Dauvergne 65bc705235 profile: add two new class methods, lasso_profile_get_issuer and lasso_profile_get_in_response_to (#4378)
The goal of those two methods is to allow IdP and SP to load metadata
dynamically without processing completely the incoming. Currently it's
impossible as message parsing and signature checking is done in the same
function.
2015-08-24 10:25:03 +02:00
Benjamin Dauvergne c5ec98a018 Makefile.am: fix automake warning
It fixes this warning:

	warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')

it seems INCLUDES is not to be used anymore.
2015-08-24 10:18:52 +02:00
Benjamin Dauvergne 9f99176b3c SAML-2.0: rework on commit 05fe802b8d, improve handling of ProtocolBinding and AssertionConsumerServiceURL
When the same URL was used for many bindings, the current code did not
work. Now we use
lasso_saml20_provider_check_assertion_consumer_service_url() to validate
url and binding are matching, if no binding is suggested we take the
first one defined for this URL.

Using AssertionConsumerServiceIndex and any of the other assertion
consumer designator attributes is still forbidden.
2015-03-26 19:36:44 +01:00
Benjamin Dauvergne 05fe802b8d SAML-2.0: Rework protocol profile selection when parsing AuthnRequest messages
This commit also add tests around authn request parsing.
2015-02-12 16:40:12 +01:00
Benjamin Dauvergne cabe31f5fc tests: add target to Makefile to produce valgrind suppression entries 2014-06-08 12:32:10 +02:00
Benjamin Dauvergne d6ec627844 tests/valgrind: add suppression of all leaks related to initialisation of the GLib type system 2014-06-08 12:32:10 +02:00
Benjamin Dauvergne a90d3ad1c8 tests: fix leaks 2014-06-08 12:32:10 +02:00
Benjamin Dauvergne b6282eda59 tests: fix leak in log message checker 2014-06-07 14:11:14 +02:00
Benjamin Dauvergne 880b833c6e tests: do not reuse tc_response_new_from_xmlNode test case 2014-06-07 14:11:13 +02:00
Benjamin Dauvergne 59b0569341 tests: pass automake CFLAGS when compiling tests2 2014-04-24 12:32:43 +02:00
Simo Sorce 3a6b2fdee7 Fix license boilerplates
Instad of referring to an old FSF address, point the reader to the FSF
website where the latest licenses and addresses are published.

Signed-off-by: Simo Sorce <simo@redhat.com>
2013-12-03 21:55:06 +01:00
Benjamin Dauvergne 16beadaff9 tests/data/Makefile: regenerate list of files and directories to distribute 2013-09-26 15:51:24 +02:00
Benjamin Dauvergne bb84a8d188 tests: add non-regression test to check that we correctly provide the ArtifactResolutionService index in artifacts 2013-09-08 21:34:12 +02:00
Benjamin Dauvergne 53f6f5c5ef tests: in check_equals() and check_not_equals() macros use long long int as a catchall type for printing compared values 2013-09-08 21:34:12 +02:00
Benjamin Dauvergne 05a01a8247 fix compilation errors on 64bits architectures
* sizeof(unsigned int) != sizeof(size_t)
 * INT_MAX != LONG_MAX
2013-09-08 21:33:58 +02:00
Benjamin Dauvergne b6faccae0f fix warnings about unused but set variables 2013-09-08 21:31:52 +02:00
Benjamin Dauvergne d06f6c698a tests: comment out dump/restore checks against complex nodes 2013-03-20 20:07:49 +01:00
Benjamin Dauvergne 8e98e432ff xml: really enforce elements cardinality when parsing messages
- add a new SNIPPET_MANDATORY:
	 we could only indicate 0-1 and 0-* cardinalities, now we can also
	 indicate 1-1 and 1-* cardinalities.
 - repect cadinalities when parsing an xmlNode tree into a LassoNode
	 tree.
2013-01-25 18:30:55 +01:00
Benjamin Dauvergne 050afd2246 tests: add a SSO test with DSA keys to python bindings tests 2012-07-11 10:57:40 +02:00
Benjamin Dauvergne 466b6f3746 [tests] add test cases for the LassoKey class 2012-03-17 15:26:57 +01:00
Benjamin Dauvergne af4c8de947 [tests] remove work-around for letting ID-FF 1.2 tests work with the thin-sessions flag activated
But when thin-sessions is activated we use the new way of passing artifact
message content around.
2011-12-23 11:09:47 +01:00
Benjamin Dauvergne 56d584ca69 [tests] protect the ID-FF 1.2 test cases from effect of the thin-sessions flag until it is migrated to work also with thin sessions 2011-12-22 18:22:12 +01:00
Benjamin Dauvergne 727f07b1ae Simplify useless complexity in include paths 2011-12-16 14:17:31 +01:00
Benjamin Dauvergne e2c6b92f3f [tests] fix tests to comply with new implementation of parsing
The test around parsing of EncryptedAssertion was wrong since it was
missing the XMLEnc namespace declaration.
2011-12-16 11:39:24 +01:00
Benjamin Dauvergne 65b94cc1f5 [tests] improve checking for log output
- now any non expected log output is considered an error, by setting a
  g_log default   handler.
- block_lasso_logs()/unblock_lasso_logs() will block logging output at
  the DEBUG level
- begin_check_do_log(level, message, endswith)/end_check_do_log() with
  check that the only message emitted between the two macros is one
  equals to "message" at the level "level", or ending (to work around
  variable parts in a log message) with "message" if "endswith" is True.
2011-12-16 11:39:18 +01:00
Benjamin Dauvergne c3467ed48c [tests] rename login test suite, with mentions of ID-FF 1.2 and SAML 2.0 2011-12-16 11:39:18 +01:00
Benjamin Dauvergne f4fc26bb39 [core] move XMLDsig related nodes in their own sub-library, add X509Data node implementation
The goal is to use the KeyInfo structure as a transport format for our cryptographic keys
2011-12-16 11:39:18 +01:00
Benjamin Dauvergne c0d1dbbd95 remove debugging printf statement 2011-12-09 22:04:23 +01:00
Benjamin Dauvergne 5e5c38b451 [core] rename lasso_provider_set_specific_signing_key to lasso_provider_set_server_signing_key 2011-12-05 14:25:34 +01:00
Benjamin Dauvergne a571c7517f [perfs] add command line options, add option to use shared secret key cryptography
Performance with HMAC-SHA1 is 100x the one with 2048 bits RSA.
2011-12-05 13:11:53 +01:00
Benjamin Dauvergne 5ba292521b [core] add the HMAC-SHA1 shared secret signature method 2011-12-05 13:11:53 +01:00
Benjamin Dauvergne 42ca33315d [tests] use helper macros in id-ff test case 2011-12-05 12:03:31 +01:00
Benjamin Dauvergne 9836f4a40b [core] add a new class LassoKey
LassoKey currenly store a LassoSignatureContext inside a
reference-counted and bindable object. It will be used to export API
around key management to bindings.
2011-12-05 12:03:14 +01:00
Benjamin Dauvergne cd017964d0 [core] introduce the LassoSignatureContext context, to pass around signature parameters
This structure is used to pass around the signature algorithm
and the signature key.
2011-12-05 12:03:13 +01:00
Benjamin Dauvergne b785881e53 [integration tests] does not use full leak report 2011-11-22 18:51:49 +01:00
Benjamin Dauvergne d72cc31347 [integration tests] show more callers when using valgrind memcheck looking for leaks in authentic and lcs 2011-11-22 18:51:49 +01:00
Benjamin Dauvergne 95137b1ad1 [tests] add test for rollover on the SP side, i.e. rollover of encryption keys
This test case is the first to abstract the workflow between two
LassoLogin object (for the idp and sp side). This part of the code could
be used to simplify the code of other tests in the future.
2011-11-22 18:51:49 +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 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 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 ed44ea81a8 Disable metadata loading test with the UK federation files 2011-05-27 16:01:44 +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 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 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 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