Commit Graph

67 Commits

Author SHA1 Message Date
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
Benjamin Dauvergne a9f9b3d9a2 [core] add a loaded_entity_ids output parameter to lasso_server_load_federation
It allows to know which entity has been loaded from the metadata file.
It must be freed by the caller.
2011-03-30 14:20:45 +02:00
Benjamin Dauvergne a0aba29273 [core] add a blacklisted_entity_ids parameter to lasso_server_load_federation
The goal is to prevent loading of provider known to have problems.
2011-03-30 11:15:39 +02:00
Benjamin Dauvergne f289edb534 [core] add a lasso_server_load_federation method
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).
2011-03-29 18:43:48 +02:00
Benjamin Dauvergne 2468e0a421 [Core] change return type of all error returning methods
The new return type is lasso_error_t, it should allow to pinpoint easily
methods returning an error code in bindings.
2010-07-12 14:09:07 +00:00
Benjamin Dauvergne 0986fa439a Core: add method lasso_server_set_encryption_private_key_with_password
* fixes #91.
2010-06-10 13:38:02 +00:00
Benjamin Dauvergne b564a3b618 Core: in LassoServer constructors, test if private_key is loadable
* lasso/id-ff/server.c:
   mark private_key as not mandatory as regression tests expect it to
   not be mandatory.
   test if loading of private key to encryption_private_key private
   field worked, if not abort the constructor and return NULL.
 * lasso/id-ff/server.h:
   fix name of constructors argument to corresponds with comments
   (binding generator use this correspondance to apply annotation from
   comments to the model obtained by parsing the headers).
2010-02-08 09:34:11 +00:00
Benjamin Dauvergne a9bda7e11d ID-WSF 1.0: make LassoServer.services private with respect to the bindings 2010-01-28 15:32:07 +00:00
Benjamin Dauvergne c71822c7e0 Core: in server.c, change signature of lasso_server_get_provider, add anottations on return value
* lasso/id-ff/server.h lasso/id-ff/server.c:
   - constify first argument of lasso_server_get_provider
   - add annotation about caller owned return value
2010-01-04 09:14:05 +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 5f163bbffd Add new constructor lasso_server_new_from_buffers
* lasso/id-ff/server.c, lasso/id-ff/server.h: add new function to build
   a LassoServer object holding content of certificate and private key
   files intead of loading them everytime signing is needed. You must
   instead load them yourself the first time.
2008-11-02 11:49:56 +00:00
Benjamin Dauvergne 9ed0670e48 * Remove ending blanks 2008-09-12 15:06:58 +00:00
Benjamin Dauvergne 500480afbf Add public function lasso_server_add_provider_from_buffer, to add a provider
from an XML string of the metadatas (changed semantic of the second argument
compared to lasso_server_add_provider). To support this a new public
LassoProvider constructor was added: lasso_provider_new_from_buffer, where the
second argument is an XML string. It uses a new private function,
lasso_provider_load_metadata_from_buffer.
2008-08-26 12:48:58 +00:00
Damien Laniel a57dc25f85 added item types for GHashTable 2007-11-13 16:12:25 +00:00
Damien Laniel 4fc6657e0c updated Copyright dates in all files 2007-05-30 17:17:45 +00:00
Frédéric Péters dc0ebd749e new server.addServiceFromDump method, and extended addService to work for both
id-wsf 1 and 2; also necessary to add quick hack in new_from_xmlnode to map
SvcMD to SvcMetadata.
2007-04-25 12:51:55 +00:00
Frédéric Péters 4016a87eac added loading of affiliation metadata (not yet acted upon) 2006-11-19 20:07:46 +00:00
Frédéric Péters ef4f859812 const'ified some char* 2006-11-19 19:08:51 +00:00
Frédéric Péters 1729459a2f s/file_name/filename/ 2006-11-19 19:01:50 +00:00
Damien Laniel 59c70367cb changed prototype for lasso_server_set_encryption_private_key and added error handling 2006-11-09 13:49:49 +00:00
Damien Laniel 2183c855a6 load encryption private key 2006-11-09 10:09:58 +00:00
Frédéric Péters 32923fdf0e sync arg name in header file with real arg names 2005-08-24 14:54:55 +00:00
Frédéric Péters 3e3b1bee2f renamed secret_key to private_key_password since it was badly named and unused
(so no API breakage)
2005-04-25 09:03:59 +00:00
Frédéric Péters 5f205c0f2e added missing lasso_config.h include (necessary for LASSO_WSF_ENABLED
definition)
2005-03-18 21:49:42 +00:00
Frédéric Péters 5ef972b27e don't compile id-wsf files when wsf is disabled; this cuts down build
time by a nice margin.
2005-03-18 20:58:34 +00:00
Emmanuel Raviart 472aded71a Merged wsf-api-change-not-for-0-6 branch with trunk. 2005-01-27 23:41:05 +00:00
Frédéric Péters c4362af715 "hope you paid attention to API/ABI". 2005-01-25 12:27:21 +00:00
Emmanuel Raviart c76936b60f Removed service from ID-FF. It was obsolete and will be replaced with a new
API, once Lasso 0.6 is out.
2005-01-24 14:05:58 +00:00
Emmanuel Raviart 7a03e99b09 Updated Copyright and authors. 2005-01-22 15:57:56 +00:00
Frédéric Péters 31acb10081 created serverprivate.h for two private #LassoServer methods 2005-01-04 11:16:21 +00:00
Emmanuel Raviart 3f66b6f305 Updated LassoServer SWIG binding. 2004-12-31 22:35:28 +00:00
Frédéric Péters ac3e5574fc moved remaining lasso[A-Z].* enums to Lasso[A-Z].* 2004-12-31 18:33:23 +00:00
Frédéric Péters 23b4a410c6 documented #LassoServer 2004-12-22 11:44:13 +00:00
Valery Febvre 7cae9ab205 Added lasso_server_add_service() method 2004-12-10 17:44:30 +00:00
Frédéric Péters c556e1fdcc limit line length to 100 characters. 2004-11-25 22:25:51 +00:00
Frédéric Péters ae5ffe0468 renamed private struct member to private_data (gtk+ does it like that) 2004-11-22 16:10:41 +00:00
Frédéric Péters a31a08d228 renamed lasso/environs/ to lasso/id-ff/ 2004-11-15 10:40:37 +00:00
Frédéric Péters f13772d62d Done with the move to structures and the removal of protocols/ (lasso branched
on October 2nd; occasional merges since then).

- Compatible with current souk test suites.
- Missing memory management for everything in xml/
- Missing xmlsec support for SOAP messages.
2004-10-27 09:49:13 +00:00
Valery Febvre 4ab34ba6b2 Renamed 'ca_certificate' property of LassoProvider object to 'ca_cert_chain'
Added a new property 'secret_key' in LassoServer object

Changed prototype of lasso_server_new() method
BEFORE:
LassoServer *
lasso_server_new(gchar                *metadata,
                 gchar                *public_key,
                 gchar                *private_key,
                 gchar                *certificate,
                 lassoSignatureMethod  signature_method)
AFTER:
LassoServer *
lasso_server_new(const gchar *metadata,
                 const gchar *private_key,
                 const gchar *secret_key,
                 const gchar *certificate)
public_key param was removed because it was useless.
secret_key was added to decrypt private_key
signature_method was removed (default value is lassoSignatureMethodRsaSha1).
2 new methods was added to access 'signature_method' property of LassoServer:
lasso_server_get_signature_method() and lasso_server_set_signature_method()

Update Lasso.i
2004-09-27 14:29:54 +00:00
Valery Febvre b7950b5bc7 Added lasso_server_get_first_providerID() method 2004-09-20 11:58:40 +00:00
Valery Febvre 10c66866d3 Changed type of signature_method
guint -> lassoSignatureMethod
2004-08-19 12:35:12 +00:00
Valery Febvre f223b6a9b2 Added a param 'err' in 2 methods of LassoServer class:
lasso_server_get_provider,
	lasso_server_get_provider_ref
for errors reporting
2004-08-11 21:16:29 +00:00
Valery Febvre fa6f8ec152 In the dump of the server object,
rather than use the "Lasso" word in the name of nodes,
the namespace of the root elment is now set to the Lasso namespace (without prefix).

Relpaced the lasso_str_hash() call by lasso_sha1() in the
lasso_server_get_providerID_from_hash() method.
2004-08-08 12:34:10 +00:00
Valery Febvre 4bd67a7eb8 lasso_server_get_providerID_from_hash() method takes now
a hash base64 encoded as argument.
2004-08-05 16:09:54 +00:00
Valery Febvre 57af54c9d8 Renamed lasso_server_get_provider() into lasso_server_get_provider_ref()
Added lasso_server_get_provider(), this method returns a provider copy.
2004-08-04 16:58:33 +00:00
Valery Febvre 6bc0e66f64 Added lasso_server_copy() method 2004-07-28 16:17:07 +00:00
Valery Febvre df05fe2ac6 Finished to implement lasso_server_destroy() method 2004-07-25 16:27:49 +00:00
Emmanuel Raviart 255f09ed98 Added Nicolas to authors. 2004-07-22 06:59:03 +00:00
Valery Febvre f46a076daf Added "ProviderID" attribut in server object
A memory leak was removed in lasso_server_new
2004-07-22 00:53:54 +00:00