org.jboss.seam.security.external.saml.api
Interface SamlEntityConfigurationApi

All Superinterfaces:
EntityConfigurationApi
All Known Subinterfaces:
SamlIdentityProviderConfigurationApi, SamlServiceProviderConfigurationApi
All Known Implementing Classes:
SamlEntityBean, SamlIdpBean, SamlSpBean

public interface SamlEntityConfigurationApi
extends EntityConfigurationApi

API for the configuration of a SAML entity (i.e. a SAML Identity Provider or SAML Service Provider)

Author:
Marcel Kolsteren

Method Summary
 SamlExternalEntity addExternalSamlEntity(Reader reader)
          This method can be used to add an external SAML entity that is trusted by the entity that is being configured.
 String getEntityId()
          The unique identification of this SAML Entity.
 List<SamlExternalEntity> getExternalSamlEntities()
          Gets a list of all external entities that have been added previously by calling addExternalSamlEntity(java.io.Reader).
 SamlExternalEntity getExternalSamlEntityByEntityId(String entityId)
          Gets the detailed of a trusted external entity, that has been added previously by calling addExternalSamlEntity(java.io.Reader).
 String getMetaDataURL()
          Gets the URL where the meta data of this entity is served.
 SamlBinding getPreferredBinding()
          The preferred SAML protocol binding.
 void setEntityId(String entityId)
          
 void setPreferredBinding(SamlBinding preferredBinding)
          See getPreferredBinding()
 void setSigningKey(String keyStoreUrl, String keyStorePass, String signingKeyAlias, String signingKeyPass)
          Sets the key that is used to sign outgoing messages.
 
Methods inherited from interface org.jboss.seam.security.external.api.EntityConfigurationApi
getHostName, getPort, getProtocol, setHostName, setPort, setProtocol
 

Method Detail

getEntityId

String getEntityId()
The unique identification of this SAML Entity. Typically, this is "https://www.your-domain.com".

Returns:
the entity ID

setEntityId

void setEntityId(String entityId)

Parameters:
entityId -

getPreferredBinding

SamlBinding getPreferredBinding()
The preferred SAML protocol binding. By default, it is SamlBinding.HTTP_Post

Returns:
the preferred binding

setPreferredBinding

void setPreferredBinding(SamlBinding preferredBinding)
See getPreferredBinding()

Parameters:
preferredBinding -

setSigningKey

void setSigningKey(String keyStoreUrl,
                   String keyStorePass,
                   String signingKeyAlias,
                   String signingKeyPass)
Sets the key that is used to sign outgoing messages. Remark that in production deployments, the key store and the passwords giving access to it need to be well secured.

Parameters:
keyStoreUrl - URL of the key store, which must have Java Key Store (JKS) format; if it starts with "classpath://", the keystore will be read from the given location within the classpath
keyStorePass - the password giving access to the key store
signingKeyAlias - the alias under which the private key is stored that needs to be used for signing; the private key must be either a DSA or an RSA key
signingKeyPass - the password that gives access to the private key

addExternalSamlEntity

SamlExternalEntity addExternalSamlEntity(Reader reader)
This method can be used to add an external SAML entity that is trusted by the entity that is being configured. If the entity that is being configured is an identity provider, this method can be used for adding trusted service providers, and vice versa. The reader must contain a UTF-8 encoded XML-file with the meta information of the entity that needs to be added. When this method returns, the configured entity trusts the added entity (has been added to the "circle of trust"). Remark that the meta data of the configured entity also needs to be loaded in the external entity. How this is done is out of scope for this API, but the needed meta information is served at the URL provided by getMetaDataURL().

Parameters:
reader - reader that reads the meta information of the entry that needs to be added
Returns:
the contents of the external entity (extracted from the meta information)

getExternalSamlEntityByEntityId

SamlExternalEntity getExternalSamlEntityByEntityId(String entityId)
Gets the detailed of a trusted external entity, that has been added previously by calling addExternalSamlEntity(java.io.Reader).

Parameters:
entityId - the id of the entity
Returns:
an object containing the properties of the entity

getExternalSamlEntities

List<SamlExternalEntity> getExternalSamlEntities()
Gets a list of all external entities that have been added previously by calling addExternalSamlEntity(java.io.Reader).

Returns:
the list

getMetaDataURL

String getMetaDataURL()
Gets the URL where the meta data of this entity is served. Call this function only after configuration is complete (after you called other methods on this API that change the configuration).

Returns:
the URL


Copyright © 2011 Seam Framework. All Rights Reserved.