2008-09-12 17:06:58 +02:00
|
|
|
/* $Id$
|
2004-12-31 12:51:11 +01:00
|
|
|
*
|
|
|
|
* Lasso - A free implementation of the Liberty Alliance specifications.
|
|
|
|
*
|
2007-05-30 19:17:45 +02:00
|
|
|
* Copyright (C) 2004-2007 Entr'ouvert
|
2004-12-31 12:51:11 +01:00
|
|
|
* http://lasso.entrouvert.org
|
2008-09-12 17:06:58 +02:00
|
|
|
*
|
2005-01-22 16:57:56 +01:00
|
|
|
* Authors: See AUTHORS file in top-level directory.
|
2004-12-31 12:51:11 +01:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
2008-09-12 17:06:58 +02:00
|
|
|
*
|
2004-12-31 12:51:11 +01:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2008-09-12 17:06:58 +02:00
|
|
|
*
|
2004-12-31 12:51:11 +01:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __LASSO_PROVIDER_PRIVATE_H__
|
|
|
|
#define __LASSO_PROVIDER_PRIVATE_H__
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
2008-09-12 17:06:58 +02:00
|
|
|
#endif /* __cplusplus */
|
2004-12-31 12:51:11 +01:00
|
|
|
|
2006-11-08 18:45:45 +01:00
|
|
|
/**
|
|
|
|
* LassoPublicKeyType:
|
2009-08-26 17:15:07 +02:00
|
|
|
* @LASSO_PUBLIC_KEY_SIGNING: Signing public key
|
|
|
|
* @LASSO_PUBLIC_KEY_ENCRYPTION: Encryption public key
|
2006-11-08 18:45:45 +01:00
|
|
|
*
|
|
|
|
* Public key type.
|
2009-08-26 17:15:07 +02:00
|
|
|
*/
|
2006-11-08 18:45:45 +01:00
|
|
|
typedef enum {
|
2006-11-08 20:23:45 +01:00
|
|
|
LASSO_PUBLIC_KEY_SIGNING,
|
2009-01-24 10:33:40 +01:00
|
|
|
LASSO_PUBLIC_KEY_ENCRYPTION
|
2006-11-08 18:45:45 +01:00
|
|
|
} LassoPublicKeyType;
|
|
|
|
|
|
|
|
|
2005-11-20 16:38:19 +01:00
|
|
|
struct _LassoProviderPrivate
|
|
|
|
{
|
|
|
|
gboolean dispose_has_run;
|
2006-11-19 21:07:46 +01:00
|
|
|
|
2010-03-27 17:52:04 +01:00
|
|
|
LassoProviderRole roles;
|
2005-11-20 16:38:19 +01:00
|
|
|
LassoProtocolConformance conformance;
|
SAML 2.0: add support for attribute, authentication and authorization authorities metadata
* server.c,serverprivate.h: add new private method
lasso_server_get_firs_providerID_by_role(server, role)w
* defederation.c: use new private method
lasso_server_get_first_providerID_by_role for find providerID
when the argument remote_providerID is null in
lasso_defederation_init_notification.
* lasso/id-ff/login.c (lasso_login_init_authn_request): use new private
method lasso_server_get_first_providerID_by_role.
* provider.h: add thre new provider role (authn,pdp,attribute) and
four new services (authn,assertionid,attribute,authz) and also
a ROLE_ANY value (-1) for catchall purpose and a ROLE_LAST for
array sizing.
* provider.h: add a LAST member to LassoMdProtocolType enum.
* providerprivate.h,provider.c:
- removes separate hashtable for descriptors depending on provider role,
use only one table named Descriptors.
- use the LAST members of enumerations to dimention static string arrays.
* provider.h: add a LAST member to the e
2010-03-27 17:51:43 +01:00
|
|
|
GHashTable *Descriptors;
|
|
|
|
GList *attributes; /* of LassoSaml2Attribute */
|
2005-11-20 16:38:19 +01:00
|
|
|
char *default_assertion_consumer;
|
|
|
|
xmlNode *organization;
|
2006-11-19 21:07:46 +01:00
|
|
|
|
|
|
|
char *affiliation_owner_id;
|
2006-12-01 19:45:10 +01:00
|
|
|
char *affiliation_id;
|
2006-11-19 21:07:46 +01:00
|
|
|
|
2005-11-20 16:38:19 +01:00
|
|
|
xmlSecKey *public_key;
|
|
|
|
xmlNode *signing_key_descriptor;
|
2006-11-30 19:11:59 +01:00
|
|
|
xmlNode *encryption_key_descriptor;
|
2006-11-29 16:06:49 +01:00
|
|
|
char *encryption_public_key_str;
|
2006-11-08 18:16:31 +01:00
|
|
|
xmlSecKey *encryption_public_key;
|
2006-11-22 13:45:38 +01:00
|
|
|
LassoEncryptionMode encryption_mode;
|
2006-12-20 10:03:41 +01:00
|
|
|
LassoEncryptionSymKeyType encryption_sym_key_type;
|
2010-03-27 17:52:04 +01:00
|
|
|
char *valid_until;
|
|
|
|
char *cache_duration;
|
2005-11-20 16:38:19 +01:00
|
|
|
};
|
|
|
|
|
2005-01-28 14:29:14 +01:00
|
|
|
|
2004-12-31 12:51:11 +01:00
|
|
|
gboolean lasso_provider_load_metadata(LassoProvider *provider, const gchar *metadata);
|
2008-11-02 12:49:55 +01:00
|
|
|
gboolean lasso_provider_load_metadata_from_buffer(LassoProvider *provider, const gchar *metadata);
|
2004-12-31 12:51:11 +01:00
|
|
|
int lasso_provider_verify_signature(LassoProvider *provider,
|
|
|
|
const char *message, const char *id_attr_name, LassoMessageFormat format);
|
2006-11-08 18:16:31 +01:00
|
|
|
gboolean lasso_provider_load_public_key(LassoProvider *provider,
|
2006-11-08 19:14:17 +01:00
|
|
|
LassoPublicKeyType public_key_type);
|
2010-01-04 10:14:01 +01:00
|
|
|
xmlSecKey* lasso_provider_get_public_key(const LassoProvider *provider);
|
|
|
|
xmlSecKey* lasso_provider_get_encryption_public_key(const LassoProvider *provider);
|
|
|
|
LassoEncryptionSymKeyType lasso_provider_get_encryption_sym_key_type(const LassoProvider* provider);
|
2009-03-27 16:04:58 +01:00
|
|
|
int lasso_provider_verify_saml_signature(LassoProvider *provider, xmlNode *signed_node, xmlDoc *doc);
|
2009-03-27 16:05:00 +01:00
|
|
|
int lasso_provider_verify_query_signature(LassoProvider *provider, const char *message);
|
2010-03-27 17:52:04 +01:00
|
|
|
void _lasso_provider_load_key_descriptor(LassoProvider *provider, xmlNode *key_descriptor);
|
|
|
|
void _lasso_provider_add_metadata_value_for_role(LassoProvider *provider,
|
|
|
|
LassoProviderRole role, const char *name, const char *value);
|
2005-04-25 12:43:48 +02:00
|
|
|
|
2004-12-31 12:51:11 +01:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
#endif /* __LASSO_PROVIDER_PRIVATE_H__ */
|