|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.internet2.middleware.shibboleth.wayf.IdPSiteSet
public class IdPSiteSet
Represents a collection of related sites as described by a single source of metadata. This is usually a federation. When the WAYF looks to see which IdP sites to show, it trims the list so as to not show IdP's which do not trust the SP. This class is opaque outside this file. The three static methods getSitesLists, searchForMatchingOrigins and lookupIdP provide mechanisms for accessing collections of IdPSiteSets.
| Field Summary | |
|---|---|
private String |
displayName
What name should we display for this set of entities? |
private String |
identifier
What does the configuration identify this as? |
private Set<String> |
idpNames
Is the named IdP in the current metadata set? |
private String |
location
Where does the metadata exist? |
private static Logger |
LOG
Handle for error output. |
private org.opensaml.saml2.metadata.provider.ObservableMetadataProvider |
metadata
The OpenSaml metadata source. |
private Map<Plugin,PluginMetadataParameter> |
plugins
What parameters do we pass in to which plugin? |
private Set<String> |
spNames
Is the named SP in the current metadata set? |
private static Timer |
timer
Time for the HTTP loading. |
| Constructor Summary | |
|---|---|
protected |
IdPSiteSet(Element element,
org.opensaml.xml.parse.ParserPool parserPool,
boolean warnOnBadBinding)
Create a new IdPSiteSet as described by the supplied XML segment. |
| Method Summary | |
|---|---|
protected void |
addPlugin(Plugin plugin)
Declares a plugin to the siteset. |
private org.opensaml.saml2.metadata.provider.MetadataFilter |
buildCertificateFilter(String param)
Create a new MetadataFilter from the specified certificate file. |
private org.opensaml.saml2.metadata.provider.MetadataFilterChain |
buildFilterChain(Element el,
boolean warnOnBadBinding)
Create the filter chain for the metadata. |
private org.apache.commons.httpclient.HttpClient |
buildHttpClient(Element config,
URL metadataURL)
Builds the HTTP client used to fetch metadata. |
private org.opensaml.saml2.metadata.provider.AbstractReloadingMetadataProvider |
buildHTTPProvider(Element element,
URL metadataURL)
Create a suitable AbstractObservableMetadataProvider to read data from a URL. |
private X509TrustManager |
buildNoTrustTrustManager()
Builds a X509TrustManager which bypasses all X.509 validation steps. |
private org.opensaml.saml2.metadata.provider.MetadataFilter |
buildValidUntilFilter(String duration)
Create validUntil Filter from the provided parameter. |
protected boolean |
containsIdP(String idPName)
For plugin handling we need to know quickly if a metadataset contains the idp. |
protected boolean |
containsSP(String sPName)
We do not need to look at a set if it doesn't know about the given SP. |
private org.opensaml.saml2.metadata.provider.MetadataFilter |
createFilter(Element element)
Create a < MetadataFilter filter as specified. |
private org.opensaml.xml.security.credential.Credential |
credentialFor(List<X509Certificate> certificates)
Create a BasicX509Credential from the provided certificates. |
private List<org.opensaml.saml2.metadata.EntityDescriptor> |
getAllEntities(org.opensaml.saml2.metadata.EntitiesDescriptor entitiesDescriptor)
Return all the entities below the entities descriptor (collapsing lists of lists into lists). |
protected String |
getDisplayName()
Return the human friendly name for this siteset. |
protected org.opensaml.saml2.metadata.EntityDescriptor |
getEntity(String name)
Return the entity given the name. |
protected String |
getIdentifier()
Return this sites (internal) identifier. |
protected Map<String,IdPSite> |
getIdPSites(String searchString,
boolean isWAYFprotocol,
HandlerConfig config,
Collection<IdPSite> searchMatches)
Return all the Idp in the provided entities descriptor. |
private long |
getMaxRefreshDelay(Element config)
Gets the maximum refresh delay for the metadata provider. |
private int |
getMinRefreshDelay(Element config)
Gets the minimum refresh delay for the metadata provider. |
private float |
getRefreshDelayFactor(Element config)
Gets the refresh delay factor for the metadata provider. |
protected IdPSite |
getSite(String idpName)
Return the idpSite for the given entity name. |
private Timer |
getTimer()
Initializes (if needed) and returns a timer to be used by the HTTP metadata loader. |
private static boolean |
hasIdPRole(org.opensaml.saml2.metadata.EntityDescriptor entity,
boolean isWAYFprotocol)
Enumerate all the roles and see whether this entity can be an IdP. |
private static boolean |
hasSPRole(org.opensaml.saml2.metadata.EntityDescriptor entity)
Enumerate all the roles and see whether this entity can be an SP. |
private static boolean |
isMatch(org.opensaml.saml2.metadata.EntityDescriptor entity,
String str,
HandlerConfig config)
Based on (Shibboleth IdP/DS) 1.2 Origin.isMatch. |
void |
onEvent(org.opensaml.saml2.metadata.provider.MetadataProvider provider)
Event handler. |
protected PluginMetadataParameter |
paramFor(Plugin plugin)
Return the parameter that this plugin uses. |
private void |
setHttpBasicAuthSettings(org.apache.commons.httpclient.HttpClient httpClient,
Element config,
URL metadataURL)
Sets the basic authentication properties, if any, for the HTTP client used to fetch metadata. |
private void |
setHttpProxySettings(org.opensaml.ws.soap.client.http.HttpClientBuilder builder,
Element config)
Sets the HTTP proxy properties, if any, for the HTTP client used to fetch metadata. |
private org.opensaml.xml.signature.SignatureTrustEngine |
trustEngineFor(org.opensaml.xml.security.credential.Credential credential)
Create a new ExplicitKeySignatureTrustEngine which understands the provided Credential. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final Logger LOG
private static Timer timer
private org.opensaml.saml2.metadata.provider.ObservableMetadataProvider metadata
private Set<String> spNames
private Set<String> idpNames
private final String identifier
private final String displayName
private String location
private final Map<Plugin,PluginMetadataParameter> plugins
| Constructor Detail |
|---|
protected IdPSiteSet(Element element,
org.opensaml.xml.parse.ParserPool parserPool,
boolean warnOnBadBinding)
throws ShibbolethConfigurationException
element - - configuration details.parserPool - - the parsers we initialized above.warnOnBadBinding - if we just warn or give an error if an SP has bad entry points.
ShibbolethConfigurationException - - if something goes wrong.| Method Detail |
|---|
private Timer getTimer()
private float getRefreshDelayFactor(Element config)
edu.internet2.middleware.shibboleth.common.config.metadata.AbstractReloadingMetadataProviderBeanDefinitionParser
config - provider configuration element
private long getMaxRefreshDelay(Element config)
edu.internet2.middleware.shibboleth.common.config.metadata.AbstractReloadingMetadataProviderBeanDefinitionParser
config - provider configuration element
private int getMinRefreshDelay(Element config)
edu.internet2.middleware.shibboleth.common.config.metadata.AbstractReloadingMetadataProviderBeanDefinitionParser
config - provider configuration element
private org.apache.commons.httpclient.HttpClient buildHttpClient(Element config,
URL metadataURL)
edu.internet2.middleware.shibboleth.common.config.metadata.HTTPMetadataProviderBeanDefinitionParser
config - the metadata provider configuration elementmetadataURL - the URL from which metadata will be fetched
private X509TrustManager buildNoTrustTrustManager()
X509TrustManager which bypasses all X.509 validation steps. Inspired by
edu.internet2.middleware.shibboleth.common.config.metadata.HTTPMetadataProviderBeanDefinitionParser
private void setHttpProxySettings(org.opensaml.ws.soap.client.http.HttpClientBuilder builder,
Element config)
edu.internet2.middleware.shibboleth.common.config.metadata.HTTPMetadataProviderBeanDefinitionParser
builder - the HTTP client builderconfig - the metadata provider configuration
private void setHttpBasicAuthSettings(org.apache.commons.httpclient.HttpClient httpClient,
Element config,
URL metadataURL)
edu.internet2.middleware.shibboleth.common.config.metadata.HTTPMetadataProviderBeanDefinitionParser
httpClient - the HTTP clientconfig - the metadata provider configurationmetadataURL - the URL from which metadata will be fetched
private org.opensaml.saml2.metadata.provider.AbstractReloadingMetadataProvider buildHTTPProvider(Element element,
URL metadataURL)
throws ShibbolethConfigurationException
AbstractObservableMetadataProvider to read data from a URL. Inspired by
edu.internet2.middleware.shibboleth.common.config.metadata.HTTPMetadataProviderBeanDefinitionParser
element - extra parameterizationmetadataURL - the URL
ShibbolethConfigurationException - if we meet bad parameters
private org.opensaml.saml2.metadata.provider.MetadataFilterChain buildFilterChain(Element el,
boolean warnOnBadBinding)
throws ShibbolethConfigurationException
el - The configuration elementwarnOnBadBinding - whether to warn on fail if the binding is bad.
ShibbolethConfigurationException - if any of the lookup fails
private org.opensaml.saml2.metadata.provider.MetadataFilter createFilter(Element element)
throws ShibbolethConfigurationException
MetadataFilter filter as specified.
element - the specification.
ShibbolethConfigurationException - if there was a
private org.opensaml.saml2.metadata.provider.MetadataFilter buildValidUntilFilter(String duration)
throws ShibbolethConfigurationException
duration - how long
ShibbolethConfigurationException - if the delay is bogus.
private org.opensaml.saml2.metadata.provider.MetadataFilter buildCertificateFilter(String param)
throws ShibbolethConfigurationException
MetadataFilter from the specified certificate file.
param - The file
ShibbolethConfigurationException - if any subsidiary function failsprivate org.opensaml.xml.signature.SignatureTrustEngine trustEngineFor(org.opensaml.xml.security.credential.Credential credential)
ExplicitKeySignatureTrustEngine which understands the provided Credential. edu.internet2.middleware.shibboleth.common.config.security.X509CredentialFactoryBean
credential - the input
private org.opensaml.xml.security.credential.Credential credentialFor(List<X509Certificate> certificates)
BasicX509Credential from the provided certificates. edu.internet2.middleware.shibboleth.common.config.security.StaticExplicitKeySignatureTrustEngineFactoryBean
certificates - Certificates from a file.
private static boolean isMatch(org.opensaml.saml2.metadata.EntityDescriptor entity,
String str,
HandlerConfig config)
entity - The entity to match.str - The pattern to match against.config - Provides list of tokens to not lookup
protected Map<String,IdPSite> getIdPSites(String searchString,
boolean isWAYFprotocol,
HandlerConfig config,
Collection<IdPSite> searchMatches)
searchString - to match withisWAYFprotocol - whether this is Shibboleth or SAML Dsconfig - parameter to matchingsearchMatches - if non null is filled with such of the sites which match the string
protected String getIdentifier()
protected String getDisplayName()
protected boolean containsSP(String sPName)
sPName - the Sp we are interested in.
protected boolean containsIdP(String idPName)
idPName - the IdP we are interested in.
protected void addPlugin(Plugin plugin)
plugin - what to declareprotected PluginMetadataParameter paramFor(Plugin plugin)
plugin - the plugin we are getting the parameter for
private List<org.opensaml.saml2.metadata.EntityDescriptor> getAllEntities(org.opensaml.saml2.metadata.EntitiesDescriptor entitiesDescriptor)
entitiesDescriptor - the entities descriptor
public void onEvent(org.opensaml.saml2.metadata.provider.MetadataProvider provider)
onEvent in interface org.opensaml.saml2.metadata.provider.ObservableMetadataProvider.Observerprovider - the provider we which is refreshing us.
private static boolean hasIdPRole(org.opensaml.saml2.metadata.EntityDescriptor entity,
boolean isWAYFprotocol)
entity - the entity under discoussion.isWAYFprotocol - whether this is a WAF or DS request.
private static boolean hasSPRole(org.opensaml.saml2.metadata.EntityDescriptor entity)
entity - the entity under scrutiny.
protected IdPSite getSite(String idpName)
throws WayfException
idpName - the entityname to look up
WayfException - if the metadata couldn't resolve the entityID.
protected org.opensaml.saml2.metadata.EntityDescriptor getEntity(String name)
throws WayfException
name - the entityID
WayfException - if the metadata couldn't resolve the entityID.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||