Commit Graph

4666 Commits

Author SHA1 Message Date
Benjamin Dauvergne 8598c1327a Core: add a level argument to lasso_xmlnode_to_string and _lasso_node_export_to_xml 2010-03-02 11:57:29 +00:00
Benjamin Dauvergne 4c72a3662e Binding perl: add support for out parameters
* bindings/perl/lang.py:
   support GObject out parameters.
2010-02-22 15:18:29 +00:00
Benjamin Dauvergne a45c5844dd SAML 2.0: LassoSaml2ConditionAbstract does not match its element name anymore, add a registry mapping
* lasso/xml/saml-2.0/saml2_condition_abstract.c:
   last commit to this file changed the element name from
   ConditionAbstract to Condition so the XML parser cannot find the
   corresponding GObject class anymore.
2010-02-22 15:18:28 +00:00
Benjamin Dauvergne 887da70933 SAML 2.0: add more accessors for Conditions
* lasso/saml-2.0/saml2_helper.{c,h}:
   distribute code from lasso_saml2_assertion_validate_conditions to
   lasso_saml2_assertion_validate_time_checks and
   lasso_saml2_assertion_validate_audience.
   add lasso_saml2_assertion_allows_proxying and
   lasso_saml2_assertion_allows_proxying_to, to respectively check for
   proxying of the current assertion, and for proxying to a specific
   provider (you must call both of them to test completely the proxying
   status of an assertion).
 * docs/reference/lasso/lasso-sections.txt:
   reference new functions into documentation.
2010-02-22 13:30:48 +00:00
Benjamin Dauvergne 333aee05e4 Bindings python: use more accessors from utils.py
* binings/python/lang.py: remove direct access to type tuples in favor
   of using accesors from utils.py.
2010-02-22 13:30:46 +00:00
Benjamin Dauvergne 008b815194 Bindings: make is_int more robust, and fix remove_modifiers 2010-02-22 13:30:45 +00:00
Benjamin Dauvergne ad2a507468 Bindings php5: use accessort from bindings/utils.py
* bindings/php5/wrapper_source.py:
   do not handle 'type/variable' tuple directly, use accessors.
2010-02-22 13:30:43 +00:00
Benjamin Dauvergne 24c7a4f8a7 Binding python: add pickling support to LassoNode
* bindings/python/lang.py:
   support pickling protocol methods __getstate__ and __setstate__
   leveraging the lasso_node_dump and lasso_node_new_from_dump methods
   from Lasso.
2010-02-22 13:30:42 +00:00
Benjamin Dauvergne 46a823ff85 Add lasso_string_to_xsd_integer, to parse xsd:integer values 2010-02-22 13:30:41 +00:00
Benjamin Dauvergne fd63f46fc4 SAML 2.0: fix bad name of Condition element, keep xmlNode as it is abstract
* lasso/xml/saml-2.0/saml2_condition_abstract.c:
   saml2:Condition is an element whose type is abstract, it must be used
   as an extension point helped by the xsi:type field. As the content is
   unknown before hand we must keep the original xmlNode for later
   analysis.
2010-02-22 13:30:39 +00:00
Benjamin Dauvergne e688e96931 Bindings python tests: update idwsf2_tests.py 2010-02-22 13:30:37 +00:00
Benjamin Dauvergne 009b39dbaf Bindings: in utils.py, make clean_type handle None value 2010-02-22 13:30:35 +00:00
Benjamin Dauvergne 1ee8f53663 ID-WSF 2.0: reorganize EPR minting, add a process_request method to disco service
* data_service.c:
   remove dependency on discovery.h
 * discovery.{c,h}:
   - add a lasso_idwsf2_discovery_process_request_msg to extract request
     data before validate request (SvcMDID, SvcMD or RequestService).
   - store SvcMDID in a private field, add a setter for it.
   - SvcMDID is now used for building response to MDAssociationQuery and
     parsing request for MDQuery, MDDelete, MDAssociationAdd and
     MDAssociationDelete.
 * idwsf2_helper.{c,h}:
   - change security mechanism argument of
     lasso_wsa_endpoint_reference_add_security_token from a NULL
     terminated string array to a GList.
 * saml2_login.{c,h}:
   - add a lasso_server_create_assertion_as_idwsf2_security_token for
     minting assertion for ID-WSF 2.0 security, to be used in Discovery
     bootstap EPR creation and EPR minting for Discovery service Query
     responses.
   - add a lasso_saml2_assertion_get_discovery_bootstrap_epr, and
     rewirte lasso_login_idwsf2_get_discovery_bootstrap_epr to use it.
   - make lasso_login_idwsf2_add_discovery_bootstrap_epr accept a list
     of security mechanisms, not just one.
 * tests/idwsf2_tests.c:
   - adapt to new argument type of
     lasso_login_idwsf2_add_discovery_bootstrap_epr.
2010-02-22 13:30:33 +00:00
Benjamin Dauvergne 432b54a79d Core: add new example to LassoLogout for asynchronous response handling 2010-02-22 13:30:32 +00:00
Benjamin Dauvergne 2b157bfa3b Support multiline error messages in build_strerror.py 2010-02-22 13:30:30 +00:00
Benjamin Dauvergne 597eaf5cdc SAML 2.0: add lasso_saml2_encrypted_element_server_decrypt and lasso_saml2_assertion_decrypt_subject 2010-02-22 13:30:29 +00:00
Benjamin Dauvergne 09a546e9cb Fix idp5-saml2 metadatas
* tests/data/idp5-saml2/metadata.xml:
   we do not have the private key for the encryption public key, so I
   copied the signing public key.
2010-02-22 13:30:28 +00:00
Benjamin Dauvergne 3c8855eb66 Fix lasso_extract_gobject_from_list 2010-02-22 13:30:23 +00:00
Mikael Ates f505a60a8a 2010-02-21 12:47:42 +00:00
Benjamin Dauvergne c51e61a5ed Documentation: add example to LassoLogout, fix bad markup in id-wsf-2.0/profile.c 2010-02-17 16:08:35 +00:00
Benjamin Dauvergne 60a0ab874a ID-WSF 2.0: also check sender match assertion in lasso_idwsf2_profile_check_security_mechanism
* lasso/id-wsf-2.0/profile.c:
   for BEARER mechanism, also check that the SPNameQualifier of the
   Subject match the Sender of the request.
2010-02-17 16:08:33 +00:00
Benjamin Dauvergne 87ecc1c682 ID-WSF 2.0: add lasso_idwsf2_discovery_get_svcmdids to public API 2010-02-17 16:08:32 +00:00
Benjamin Dauvergne d222d52563 Tests integration: force C locale
* tests/integration/saml2/__init__.py:
   authentic now use 'system locale' by default, so force C locale to
   get english IHM string to make twill happy.
2010-02-17 10:15:35 +00:00
Benjamin Dauvergne 53f2a89851 SAML 2.0: if assertion possess a signed original_xmlnode return it instead of using get_xmlNode
* lasso/xml/saml-2.0/saml2_assertion.c:
   assertion in lasso when read are not usable anymore because the
   signature is lost, this commit allows to keep assertion unaltered
   after reading them if they contained a top level signature (a
   signature contained in the Assertion node).
   This is useful for reusing assertion kept in a LassoSession object
   and for using assertion as security token for ID-WSF.
2010-02-17 10:15:33 +00:00
Benjamin Dauvergne 192777bac1 Core: use lasso_xmlnode_to_string in LassoNode export functions
* lasso/xml/xml.c:
   remove duplicate codes and use lasso_xmlnode_to_string instead.
2010-02-17 10:15:31 +00:00
Benjamin Dauvergne 4a76638aac Current state of ID-WSF 2.0 python test 2010-02-17 10:15:28 +00:00
Benjamin Dauvergne 9e683496c6 Binding php5: fix generation of list freeing
* bindings/php5/wrapper_source.py:
   free_glist wants a GList** as first argument.
2010-02-17 10:15:26 +00:00
Benjamin Dauvergne 5d9e6f550a Core: add a lasso_xmlnode_to_string function
* lasso/xml/tools.c lasso/xml/private.h:
   lots of functions duplicate this code, so we factorized it there.
   It has two parameters, the xmlnode and boolean deciding whether to
   format the resulting content (good for reading but bad for
   signatures).
2010-02-17 10:15:24 +00:00
Benjamin Dauvergne d393251585 SAML 2.0: in lasso_saml20_profile_set_session_from_dump_decrypt, really decrypt
* lasso/saml-2.0/profile.c:
   dump for already signed assertion containing an EncryptedID as
   Subject does not work as before, the decrypted NameID is no more
   included in it, so instead of trying to plug it in the NameID field
   we resort to really deciphering the EncryptedID.
   That could be a performance problem if the session object is stuffed
   with a lot of assertions.
2010-02-17 10:15:21 +00:00
Benjamin Dauvergne bdac600b56 Current state of idwsf2 tests 2010-02-17 10:15:19 +00:00
Benjamin Dauvergne 50063c1e9b ID-WSF 2.0: fix loading of LassoIdWsf2Discovery dumps 2010-02-17 10:15:16 +00:00
Benjamin Dauvergne 62ac1616e4 Core: add error exit to lasso_node_new_from_xmlNode
* lasso/xml/xml.c:
   if building of the node fails, we must keep the initialization of
   custom nodename and namespace.
2010-02-17 10:15:14 +00:00
Benjamin Dauvergne a803cc710b Binding python: simplify special constructor, use cptrToPy 2010-02-17 10:15:11 +00:00
Benjamin Dauvergne 7c1bd8f0ba ID-WSF 2.0: make lasso_idwsf2_profile_redirect_user_for_interaction add the transactionID to the URL
* lasso/id-wsf-2.0/profile.c:
   simplify use of lasso_idwsf2_profile_redirect_user_for_interaction by
   directly adding the ID of the SOAP response message to the URL.
   Report an error if no MessageID can be found.
2010-02-17 10:15:09 +00:00
Benjamin Dauvergne e64334c4a4 ID-WSF 2.0: rewrite and document lasso_soap_envelope_sb2_get_redirect_request_url
* lasso/id-wsf-2.0/soap_binding.{c,h}:
   fix error in conception of
   lasso_soap_envelope_sb2_get_redirect_request_url, RedirectRequest is
   part of a SOAP fault not the headers.
   Explain in the documentation how to use the RedirectRequest URL.
   Change the return type to a const string.
2010-02-17 10:15:07 +00:00
Benjamin Dauvergne 38f6a63396 ID-WSF 2.0: add a method to retrieve/create a SOAP Fault to SOAP binding module
* lasso/id-wsf-2.0/soap_binding.{c,h}:
   add method lasso_soap_envelope_get_soap_fault which returns/create
   the first SOAP fault inside the body of the SOAP envelope.
2010-02-17 10:15:05 +00:00
Benjamin Dauvergne 1c8fb8a3ed Binding python tests: adapt test to use TOP_SRCDIR env var 2010-02-17 10:15:03 +00:00
Benjamin Dauvergne 9709ec4342 Binding python: factorize value freeing generation code
* lasso/python/lang.py:
   extract value freeing generation code to method free_value,
   add proper liberation of values at exit of wrapper functions, remove
   g_free call from return_value generated code.
2010-02-17 10:15:01 +00:00
Benjamin Dauvergne 95f5d99be6 Core: add missing return value owner semantic annotations to getters
* lasso/id-ff/provider.c:
   fix lasso_provider_get_base64_succinct_id, it returned a libxml
   string, copy it with g_strdup before releasing it to stay with GLib
   allocated string in return values.
2010-02-17 10:14:59 +00:00
Benjamin Dauvergne 58fa7178e4 Core: add annotation to getter function about return value owner semantic
* lasso/id-ff/identity.c lasso/id-ff/profile.c:
   precise owner semantic of lasso_profile_get_identity,
   lasso_profile_get_session, lasso_profile_get_server
 * lasso/id-wsf-2.0/saml2_login.c tests/login_tests_saml2.c:
   in the same vein add missing release of assertion returned by
   lasso_login_get_assertion which return a caller owned object.
2010-02-17 10:14:56 +00:00
Benjamin Dauvergne 6ca10e383d ID-WSF 2.0: make lasso_idwsf2_profile_redirect_user_for_interaction choke on missing redirect property on UserInteraction header
* lasso/id-wsf-2.0/profile.c:
   if redirect boolean property is false, refuse to return a redirect
   request.
   automatically create a SOAP fault to signal to the requester that it
   needs to support interaction via redirect.
2010-02-17 10:14:55 +00:00
Benjamin Dauvergne 00125b59a2 ID-WSF 2.0: add error code signaling that the requester does not support redirect request
* lasso/errors.c lasso/errors.h:
   add
   LASSO_WSF_PROFILE_ERROR_REDIRECT_REQUEST_UNSUPPORTED_BY_REQUESTER.
2010-02-17 10:14:53 +00:00
Benjamin Dauvergne d492606a0f ID-WSF 2.0: add a create arg to lasso_soap_envelope_get_sb2_user_interaction_header, add it to public API 2010-02-17 10:14:51 +00:00
Benjamin Dauvergne a1d6577934 ID-WSF 2.0: fix lots of bad usage of g_strcmp0
* lasso/id-wsf-2.0/idwsf2_helper.c lasso/id-wsf-2.0/soap_binding.c
   lasso/id-wsf/data_service.:
   add missing check for the return value of strcmp, maybe we need a
   macro like lasso_strequal.
2010-02-17 10:14:50 +00:00
Benjamin Dauvergne 174856fade Tests: in login_tests_saml2.c, add test for lasso_saml2_assertion_validate_conditions 2010-02-17 10:14:48 +00:00
Benjamin Dauvergne b0a3c22d39 in idwsf2_tests.py, merge test case for metadata registering, add test case for failure 2010-02-17 10:14:47 +00:00
Benjamin Dauvergne 0ff8c53f44 Bindings: parse defines refering to other defines
* bindings/bindings.py:
   Allow to build constants using other constants (prefix string), the
   constant type is retrieved from the prefix existing record.
2010-02-17 10:14:45 +00:00
Benjamin Dauvergne 39d4444475 in tools.c, add defines to permit import of timegm 2010-02-17 10:14:44 +00:00
Benjamin Dauvergne 017ebd33f9 SAML 2.0: make lasso_saml2_assertion_validate_conditions really work 2010-02-17 10:14:43 +00:00
Benjamin Dauvergne b13ddc086b Core: fix lasso_iso_8601_gmt_to_time_t, use timegm instead of mktime
* lasso/xml/tools.c:
   mktime convert works on local time, we need timegm to work with GMT
   time.
2010-02-17 10:14:41 +00:00