Commit Graph

104 Commits

Author SHA1 Message Date
Benjamin Dauvergne a041a2ef81 Initialize all uninitialized rc variables 2010-04-30 09:23:01 +00:00
Benjamin Dauvergne f4de58cf3e Fix uninitialized local variable 2010-04-28 16:52:43 +00:00
Benjamin Dauvergne 2f5ef5fef0 Improve safety by replacing all g_list_free use by lasso_release_list 2010-04-22 00:44:57 +00:00
Benjamin Dauvergne 0a169eda51 Improve safety by replacing all g_free use by lasso_release 2010-04-22 00:44:45 +00:00
Benjamin Dauvergne 32794e6c89 Core: add an helper method to build a SOAP response in a LassoProfile object
* lasso/id-ff/profile.{c,h}:
   add lasso_profile_add_soap_fault_response(char* code, char *string,
   GList *details).
 * lasso/id-wsf-2.0/profile.{c,h}:
   change signature of lasso_idwsf2_profile_init_soap_fault_response.
 * lasso/id-wsf-2.0/data_service.c:
   use new function instead of manually intializing soap faults
 * lasso/id-wsf-2.0/discovery.c:
   init a soap fault when parsed request is of an unknown type, return
   proper error.
2010-03-02 11:57:53 +00:00
Benjamin Dauvergne 4ee7be9d5d ID-WSF 2.0: fix MDAssociationQueryResponse handling
* lasso/id-wsf-2.0/discovery.c:
    - in lasso_idwsf2_discovery_validate_request, use svcmdids to
      intialize response to MSAssociationQuery requests.
    - in lasso_idwsf2_discovery_process_response_msg, extract received
      svcmdids; use lasso_check_good_rc when needed.
2010-03-02 11:57:40 +00:00
Benjamin Dauvergne e40b9f73ce ID-WSF 2.0: change signature of lasso_idwsf2_discovery_add_identity_to_epr
* lasso/id-wsf-2.0/discovery.c:
   - in lasso_idwsf2_discovery_add_identity_to_epr, receive an Epr
     instead of an EprMetadata node, and use
     lasso_wsa_endpoint_reference_add_security_token to add the
     assertion token instead of duplicating this logic.
   - in lasso_idwsf2_discovery_build_epr change the call site.
2010-03-02 11:57:38 +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 50063c1e9b ID-WSF 2.0: fix loading of LassoIdWsf2Discovery dumps 2010-02-17 10:15:16 +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 f8558c090c ID-WSF 2.0: add serialization code for private properties of LassoIdWsf2Profile 2010-02-17 10:14:36 +00:00
Benjamin Dauvergne 953eed0009 ID-WSF 2.0: fix missing initialization of request field in lasso_idwsf2_discovery_validate_md_register 2010-02-17 10:14:35 +00:00
Benjamin Dauvergne 7e43a5b53c ID-WSF 2.0: fix lasso_idwsf2_discovery_add_simple_service_metadata
* lasso/id-wsf-2.0/discovery.c:
   options is a string list, and security_mech_ids too, so employ the
   corresponding macros.
2010-02-17 10:14:32 +00:00
Benjamin Dauvergne cef121fa5f ID-WSF 2.0: in lasso_idwsf2_discovery_status2rc, check second level status code too 2010-02-17 10:14:30 +00:00
Benjamin Dauvergne 19e14481e7 Add signature on EPR secur token 2010-02-15 10:37:49 +00:00
Benjamin Dauvergne be8312b083 ID-WSF 2.0: add signature to Disco produced EPR SAML 2.0 security tokens 2010-02-15 10:37:46 +00:00
Benjamin Dauvergne bf323d0011 ID-WSF 2.0: fix bad conditionnal in lasso_idwsf2_discovery_process_metadata_register_response_msg
* lasso/id-wsf-2.0/discovery.c:
   fix check in
   lasso_idwsf2_discovery_process_metadata_register_response_msg
   fix duplication of service metadatas inside private list of service
   metadatas.
2010-02-15 10:37:38 +00:00
Benjamin Dauvergne fa9566aa59 Core: fix gtk-doc annotations 2010-01-28 15:31:43 +00:00
Benjamin Dauvergne 42c81da4f4 XML: move SOAP API to its own sub directory 2010-01-04 09:15:42 +00:00
Benjamin Dauvergne bfb8483823 ID-WSF 2.0: in profile.{c,h}, discovery.{c,h}, data_service.{c,h}, overhaul all profiles.
* lasso/id-wsf-2.0/profile.c lasso/id-wsf-2.0/profile.h:
   - lasso_idwsf2_profile_get_name_identifier returns the NameID found
     in an assertion used as a WS-Security token when security mechanism
     Bearer or SAML are used.
   - complete the function lasso_id_wsf2_profile_build_soap_envelope
     with construction of the Sender element which is used to transmit
     the providerID of the message sender by the SOAP binding ID-WSF 2.0
     specification.
   - remove useless instance_init function in profile object
   - reset some profile fields in process_soap_request_msg (response,
     body, nameIdentifier).  use
     lasso_saml20_profile_name_identifier_decryption for handling NameID
     from WS-Security mechanism assertion.
   - add private_data
   - change signature of lasso_idwsf2_profile_init_soap_request to use
     and EPR and a security mechanism specifier when building the SOAP
     request.
   - change signature of lasso_idwsf2_profile_process_soap_request to
     verify security_mech_id of received messages.
 * docs/reference/lasso/lasso-sections.txt:
   add the function to the documentation.

 * lasso/id-wsf-2.0/discovery.{c,h}:
   - use utils.h macros instead of g_return_val_if_fail because it
     removes useless warning, since it returns an error code.  release
     acquired resources.
   - in lasso_idwsf2_discovery_metadata_register_self, return error code
     instead of identifier string for the new service, use an out
     parmeter to return the identifier, use utils.h macros.
   - in lasso_idwsf2_discovery_init_metadata_register, use utils.h
     macros, check return code of lasso_idwsf2_profile_init_soap_request.
   - change signature of lasso_idwsf2_discovery_init_metadata_register
     to support security_mech_id, try to get URL from an existing
     Discovery service EPR (from Session object).
   - change signature of
       lasso_idwsf2_discovery_process_metadata_register_msg,
       lasso_idwsf2_discovery_init_metadata_association_add,
       lasso_idwsf2_discovery_process_metadata_association_add_msg,
       lasso_idwsf2_discovery_init_query,
       lasso_idwsf2_discovery_process_query_msg, to support security
       mechanism.
   - improve lasso_idwsf2_discovery_build_query_response_eprs.
   - add lasso_idwsf2_discovery_get_nth_data_service to acces returned
     services.
 * lasso/id-wsf-2.0/data_service.{c,h}:
   - redo all the API
2010-01-04 09:15:24 +00:00
Benjamin Dauvergne 7231771856 All: Rework include files handling, separated ID-WSF code from SAML2/ID-FF code
* nearly all C files: change includes for relative paths.
 * lasso/id-wsf/id_wsf.h, lasso/id-wsf-2.0/id_wsf_2.h: add top level
   public include files for ID-WSF 1.0 and ID-WSF 2.0.
 * lasso/id-ff/server.*, lasso/id-ff/session.*, lasso/id-ff/identity.*:
   remove most of the code related to ID-WSF and push into
   lasso/id-wsf/id_ff_extensions.* and lasso/id-wsf-2.0/identity.c,
   lasso/id-wsf-2.0/server.c, lasso/id-wsf-2.0/session.c.
 * lasso/id-wsf-2.0/saml2_login.c,
   lasso/id-wsf-2.0/saml2_login_private.h: same change but for ID-WSF
   2.0 support in SAML2 SSO profile.
2009-08-26 15:14:32 +00:00
Benjamin Dauvergne a3c4a339f2 ID-WSF 2.0: remove unused variable
- lasso/id-wsf-2.0/discovery.c: remove unused variable in discovery.c
2009-08-26 15:13:51 +00:00
Benjamin Dauvergne 562be4b08a ID-WSF 2.0: review lasso_idwsf2_discovery_process_metadata_register_response_msg
* lasso/id-wsf-2.0/discovery.c
   (lasso_idwsf2_discovery_process_metadata_register_response_msg):
   change return code variable to rc, move argument casting after argument
   type check, copy all the service metadata ids,
2009-08-26 15:13:13 +00:00
Benjamin Dauvergne be6342b39a ID-WSF 2.0: review lasso_idwsf2_discovery_process_metadata_register_msg
* lasso/id-wsf-2.0/discovery.c
   (lasso_idwsf2_discovery_init_metadata_register):
   add documentation comment, move argument casting after type checking,
   change return code name to rc to comply with standardisation,
   use lasso_build_unique_id instead of duplicating the code,
   add iteration over all the registered service, add iteration
   to return all the generated service metadata ids, use new assignment
   macros.
 * lasso/id-wsf-2.0/discovery.h (struct _LassoIdWsf2Discovery):
   change field LassoIdWsf2DiscoSvcMetadata metadata to GList* metadatas
   and gchar *svcMDID to GList *svcMDIDs in order to support multiple
   services in requests.
2009-08-26 15:13:11 +00:00
Benjamin Dauvergne 714248160f ID-WSF 2.0: review lasso_idwsf2_discovery_metadata_register_self
* lasso/id-wsf-2.0/discovery.c
   (lasso_idwsf2_discovery_metadata_register_self):
   Add documentation, add code for getting the service URL.
2009-08-26 15:13:07 +00:00
Benjamin Dauvergne ecac419fa2 ID-WSF 2.0: add documentation to lasso_idwsf2_discovery_register_self
* lasso/id-wsf-2.0/discovery.c (lasso_idwsf2_discovery_register_self)
   move casting after argument type check, simplify code by using
   lasso_build_unique_id, remove useless comments
2009-08-26 15:13:05 +00:00
Benjamin Dauvergne 601d6da24d ID-WSF 2.0: simplify gobject boilerplate
* lasso/id-wsf-2.0/discovery.c: (get_xmlNode, instance_init, class_init)
   remove useless method get_xmlNode, remove useless NULLing or
   instance fields.
2009-08-26 15:13:02 +00:00
Benjamin Dauvergne dfb0b91ed6 ID-WSF 2.0: make it work with --enabe-debugging
* lasso/id-wsf-2.0/data_service.c:
 * lasso/id-wsf-2.0/discovery.c:
 * lasso/id-wsf-2.0/profile.c:
 * lasso/id-wsf/data_service.c:
 * lasso/id-wsf/discovery.c:
 * lasso/id-wsf/wsf_profile.c:
   when --enable-debugging is activated much more type checking is done
   by internal macros, and code do not pass compile anymore.
 * bindings/python/tests/idwsf2_tests.py: nameIdentifier packing in SOAP
   ID-WSF calls headers is no longer supported, do not test it.
2009-03-27 15:05:04 +00:00
Benjamin Dauvergne b09ef2e015 Core: do not mix public and private headers
* lots of files:
   explicitely load the internal header xml/private.h where needed.
2009-03-27 15:04:26 +00:00
Damien Laniel fad3fa581b added documentation for id-wsf 2.0 functions 2009-01-26 16:10:24 +00:00
Benjamin Dauvergne 33bbf7a7de All: Fix missing field initializer problems
* lots of files: Explicitely set all field of initialized structures,
  in order to remove -Wno-missing-field-initilizers from needed
  compiler options when using -Wall -Wextra.
2009-01-24 09:33:40 +00:00
Damien Laniel 07fc694e10 removed unused destroy functions (only defined in .c or .h files) 2009-01-22 14:46:52 +00:00
Benjamin Dauvergne 47641f88bf Use assignment macros in id-wsf 2.0 module
* lasso/id-wsf-2.0/data_service.c, lasso/id-wsf-2.0/discovery.c,
   lasso/id-wsf-2.0/profile.c: use assignment macros to maintain proper
   reference counting and ownership of object field values.
2008-12-01 17:30:35 +00:00
Benjamin Dauvergne 9ed0670e48 * Remove ending blanks 2008-09-12 15:06:58 +00:00
Benjamin Dauvergne ae1f6a297c * Remove warnings:
- remove unused parameter from private function signatures
 - remove unused variable
 - initialize variable potentially accessed uninitialized
 - add G_GNUC_UNUSED if function is public or adhering to an interface, and a
   parameter is unused.
 - if ID-WSF is not compiled in, define stubs with G_GNUC_UNUSED on parameters.
 The goal is to compile with -Werror.
2008-09-12 13:57:22 +00:00
Benjamin Dauvergne 207891ff29 * Fix blanks mismatch (space in *.c and *h files or tabs in *.py files) and formatting 2008-08-05 14:53:29 +00:00
Damien Laniel e741a80a7f added some more missing unreference 2008-05-22 08:06:13 +00:00
Damien Laniel d83cd8381e added some more missing unreference 2008-05-21 23:29:28 +00:00
Damien Laniel 7e9dec9400 some comments 2008-05-21 10:10:46 +00:00
Damien Laniel eb2fbc8fc0 fixed some reference counting and memory management 2008-05-20 18:34:09 +00:00
Damien Laniel c9a8f041ab avoir function calls in parameter checks 2008-05-20 13:24:05 +00:00
Damien Laniel 975cff404d stronger check on empty string parameters 2008-05-20 10:38:12 +00:00
Frédéric Péters bc56d07345 removed direct usage of g_object_unref from lasso_*_destroy methods 2007-11-22 12:42:47 +00:00
Frédéric Péters 3fc428016f added a wrapper around xmlParseMemory to avoid network and DTD 2007-08-12 22:19:32 +00:00
Frédéric Péters 6204c8be9c adds all classes from ID-WSF 2 required schemas; with appropriate changes to
other files.
2007-07-10 08:50:56 +00:00
Damien Laniel 68583058a5 changed metadata_list attribute to SvcMD 2007-07-09 09:15:48 +00:00
Frédéric Péters d816d74c1a fixed class hierarchy, with ID-WSF 2 specific stuffs going into
LassoIdWsf2Profile (which now inherits from LassoProfile).
2007-06-19 11:16:17 +00:00
Damien Laniel eefdf3b586 moved soap_envelope_request and soap_envelope_response to ProfilePrivate to avoid ABI breackage 2007-06-18 09:43:47 +00:00
Damien Laniel 82d2325934 removed IdWsf2Profile and use LassoProfile instead 2007-06-13 14:14:57 +00:00
Damien Laniel 86da20c741 renamed Wsf2Profile to IdWsf2Profile 2007-06-13 12:59:27 +00:00