Commit Graph

5731 Commits

Author SHA1 Message Date
John Dennis 41d771c628 Add ECP and PAOS to prefix_from_href_and_nodename()
prefix_from_href_and_nodename() did not know about the ECP and PAOS
XML prefixes so add them.

Signed-off-by: John Dennis <jdennis@redhat.com>
License: MIT
2015-08-24 16:05:29 +02:00
John Dennis a7a54cabad Export LassonNode to SOAP with arbitrary SOAP headers
Add function lasso_node_export_to_soap_with_headers()

Utility function to build a full SOAP envelope message with arbitrary
headers. The LassoNode becomes the body of the SOAP envelope. The
headers are passed as a GList of LassoNode's and are added as header
elements to the SOAP envelope header. This is a flexible way to build
a SOAP envelope that contains headers without constraints on the
headers.

Signed-off-by: John Dennis <jdennis@redhat.com>
License: MIT
2015-08-24 16:05:29 +02:00
John Dennis ad3751f2b0 LassoSamlp2IDPList is not list capable
LassoSamlp2IDPList is supposed to handle a list of LassoSamlp2IDPEntry
but in fact it had no list support. Change the snippet flag
SNIPPET_NODE to SNIPPET_LIST_NODES and add the special list comment on
the struct member so that the binding generator knows what type of
GList it is.

Signed-off-by: John Dennis <jdennis@redhat.com>
License: MIT
2015-08-24 16:05:29 +02:00
John Dennis 9629925c1e Add LassoNode objects for ECP and PAOS
The SAMLv2 protocol defines 5 XML types which we need to map to
LassoNode objectes so thay can be serialized from XML and back into
XML.

ecp:RelayState
ecp:Request
ecp:Response
paos:Request
paso:Response

This patch addes these 5 new LassoNode's and updates the build
configuration to include them.

Signed-off-by: John Dennis <jdennis@redhat.com>
License: MIT
2015-08-24 16:05:29 +02:00
John Dennis 904e23d7ff Enhance process soap response to include processing soap headers
The existing lasso_saml20_profile_process_soap_response() assumed
there were no SOAP headers (prior to ECP none of the SOAP messages
contained headers). A new function
lasso_saml20_profile_process_soap_response_with_headers() was
implemented that serializes from the XML SOAP headers into a
LassoSoapHeader node and optionally will return the LassoSoapHeader
node.

The functionality in lasso_saml20_profile_process_soap_response() was
moved into the new
lasso_saml20_profile_process_soap_response_with_headers() and now
lasso_saml20_profile_process_soap_response() simply calls
lasso_saml20_profile_process_soap_response_with_headers() passing NULL
for the header return.

Signed-off-by: John Dennis <jdennis@redhat.com>
License: MIT
2015-08-24 16:05:29 +02:00
John Dennis a0909e732f Add new LassoSoapEnvelope constructor, lasso_soap_envelope_new_full()
The existing LassoSoapEnvelope constructors did not populate the node
with it's constituent members, namely a SOAP header (LassoSoapHeader)
and a SOAP body (LassoSoapBody). lasso_soap_envelope_new_full() allows
one to create a SOAP envelope and immediately begin to add header and
body elements.

Signed-off-by: John Dennis <jdennis@redhat.com>
License: MIT
2015-08-24 16:05:29 +02:00
John Dennis 27f98071e7 Fix LassoSoapHeader, was unable to serialize from XML.
The existing Lasso code never made use of SOAP headers because up
until now nothing used them. LassoSoapHeader was unable to serialize
from XML into a GList of LassoNode objects because it was missing one
of the necessary snippet flags. This corrects this omission and now
parsing a SOAP header will yield a sequence of LassoNode's.

Signed-off-by: John Dennis <jdennis@redhat.com>
License: MIT
2015-08-24 16:05:29 +02:00
John Dennis a3f01cd42c Add new error codes and their matching error descriptions
Signed-off-by: John Dennis <jdennis@redhat.com>
License: MIT
2015-08-24 16:05:29 +02:00
John Dennis a6014fc51b Add lasso_is_in_list_of_strings macro to utils.h
Add macro that tests to see if a string is a member in a list of
strings.

Signed-off-by: John Dennis <jdennis@redhat.com>
License: MIT
2015-08-24 16:05:29 +02:00
John Dennis f3849b2664 Fix build failure, remove inclusion of xml/private.h in utils.h
The public utils.h header includes the private xml/private.h file
which is not installed. Therefore anyone trying to build against lasso
and include utils.h will fail because xml/private.h cannot be
found. There doesn't seem to be any need to include this file.

Signed-off-by: John Dennis <jdennis@redhat.com>
License: MIT
2015-08-24 16:05:29 +02:00
John Dennis a7f6219f5a Eliminate _BSD_SOURCE and _SVID_SOURCE deprecation warning
Because all warnings are treated as errors and this warning is emitted:

warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"

the build fails.

The fix is to define _DEFAULT_SOURCE in lasso/xml/tools.c

The effect of defining the _DEFAULT_SOURCE macro is equivalent to
the effect of explicitly defining three macros in earlier glibc
versions: -D_BSD_SOURCE -D_SVID_SOURCE -D_POSIX_C_SOURCE=200809C

Signed-off-by: John Dennis <jdennis@redhat.com>
License: MIT
2015-08-24 16:05:29 +02:00
Benjamin Dauvergne eb6ed4f85a configure.ac: provide fallback for systems where libcheck is not installed with pkg-config 2015-08-24 16:05:14 +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 6e8326293d FAQ: add section about getting the issuer before parsing the received message (#4378) 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 67d0a0349d configure.ac: use pkg-config for libcheck 2015-08-24 10:24:29 +02:00
Benjamin Dauvergne 3946807122 saml-2.0/login.c: change default value of WantAuthnRequestSigned (fixes #8105)
Specification says it should default to FALSE. We comply.
2015-08-24 10:24:27 +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 34ee3446e8 Add 'debian-squeeze/' from commit '33d67ddd1352a2db97d252c7d18f7806ec91e616'
git-subtree-dir: debian-squeeze
git-subtree-mainline: 80a2e0ea47
git-subtree-split: 33d67ddd13
2015-04-03 10:01:56 +02:00
Benjamin Dauvergne 80a2e0ea47 Add 'debian-wheezy/' from commit '0001ab9af1e3a7e19000a65b75ebc3c42f76a739'
git-subtree-dir: debian-wheezy
git-subtree-mainline: 9f99176b3c
git-subtree-split: 0001ab9af1
2015-04-03 10:01:19 +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
John Dennis bbcee8a480 Fix build failures
Fix a mistake in the documentation markup that prevented the
doc from building, needed to reverse the order of two tags.

Remove the $(PYTHON) from TESTS_ENVIRONMENT, it was causing
python to be invoked passing /bin/sh to it as a script.

License: MIT
Signed-off-by: John Dennis <jdennis@redhat.com>
2015-03-23 14:28:48 +01:00
John Dennis ec73384ccf Add Destination attribute for SAML ECP Response
The Destination attribute on SAML Response element was not being set
when handling an ECP response. It is a requirement of SAML 2.0 that
signed values contain a Destination attribute on the root element
otherwise the client will reject the response. This is documented in
the SAML Bindings Specification, Section 3.4.5.2 "Security
Considerations":

    If the message is signed, the Destination XML attribute in the
    root SAML element of the protocol message MUST contain the URL to
    which the sender has instructed the user agent to deliver the
    message. The recipient MUST then verify that the value matches the
    location at which the message has been received.

Normally on login one calls
lasso_saml20_login_build_authn_response_msg() which then calls
lasso_saml20_profile_build_response_msg() which sets the Destination
attribute on the SAML Response. But when doing ECP you do not call
lasso_saml20_login_build_authn_response_msg(), instead you call call
lasso_saml20_login_build_response_msg() and if it's ECP it then calls
lasso_node_export_to_ecp_soap_response(). Thus the ECP
response never gets the Destination attribute set because of the
different code path, plus for ECP the destination is different, it's
the assertion consumer service.

FWIW this line of code was copied almost verbatim from
lasso_saml20_profile_build_response_msg which also sets the
Destination attribute.

License: MIT
Signed-off-by: John Dennis <jdennis@redhat.com>
2015-03-11 09:13:22 +01:00
Jérôme Schneider dc7374e9f4 php5-lasso.prerm: s/phpdismod/php5dismod/ 2015-02-26 10:29:53 +01:00
Jérôme Schneider e42b1dd7fc Merge with lasso in Jessie, re-activate java and gen-default-control.sh 2015-02-26 10:24:18 +01:00
Jérôme Schneider 2f8ed5a0b0 control: build depends on dh-python 2015-02-26 09:13:03 +01:00
Jérôme Schneider 0001ab9af1 python-lasso.install: just install python 2 files 2015-02-25 19:58:57 +01:00
Jérôme Schneider 5b21d1594d python-lasso.install: python-lasso is for python2 only 2015-02-25 19:48:39 +01:00
Jérôme Schneider e5fb1e97a7 liblasso-perl.install.in: fixes path 2015-02-25 19:27:59 +01:00
Jérôme Schneider 9e07e618fb rules: cleanning clean target 2015-02-25 19:13:23 +01:00
Jérôme Schneider 15fd447eab perl; fix build for Jessie 2015-02-25 19:11:38 +01:00
Jérôme Schneider 2f90b99650 remove java support 2015-02-25 18:17:28 +01:00
Jérôme Schneider c54dbab12b control: update build-dependencies for python3 2015-02-25 18:00:46 +01:00
Jérôme Schneider 28faf9b25e debian/control: like control.in, control must be updated 2015-02-25 17:57:47 +01:00
EO builder bot 945fb5b207 debian: add python3 support 2015-02-25 17:10:12 +01:00
Benjamin Dauvergne 2c5034d240 Re-add control for eobuilder 2015-02-13 14:37:57 +01:00
Benjamin Dauvergne f817e39e3e Remove control and add python-six to control.in 2015-02-13 14:11:09 +01:00
Benjamin Dauvergne 5dd34825c3 Revert "Remove control.in"
This reverts commit 176e0716f8f8593860e0603697db5dec5675f5b3.
2015-02-13 10:29:38 +01:00
Benjamin Dauvergne 47fa21b757 Remove control.in 2015-02-12 23:04:01 +01:00
Benjamin Dauvergne ae55fc9a98 Add dependency on python-six 2015-02-12 22:37:52 +01:00
Benjamin Dauvergne 236410bf91 Update AUHTORS file 2015-02-12 19:21:13 +01:00
Benjamin Dauvergne 5730f2aa65 Port Java binding generator to Python 3 2015-02-12 19:21:13 +01:00
Benjamin Dauvergne cf9ae3872d Port Perl binding generator to Python 3 2015-02-12 19:21:13 +01:00
Benjamin Dauvergne b73f8f3ce5 Port PHP5 binding generator to Python 3 2015-02-12 19:21:13 +01:00
Benjamin Dauvergne a231eaff33 Make python generator scripts and tests run with python >= 3.2 2015-02-12 19:21:13 +01:00
Houzéfa Abbasbhay 8938f87220 Python 3: Fix the pygobject init macro and restore it 2015-02-12 19:21:13 +01:00
Houzéfa Abbasbhay efc5429cfc Python 3: Fix a string conversion helper 2015-02-12 19:21:12 +01:00
Houzéfa Abbasbhay e325164c8a Python 3: Oops (see rev 279959f) 2015-02-12 19:21:12 +01:00
Houzéfa Abbasbhay 4c79280ed8 Python 3: Fix Python 2 support (use six.print_) 2015-02-12 19:21:12 +01:00