2 * Copyright [2005] [University Corporation for Advanced Internet Development, Inc.] Licensed under the Apache License,
3 * Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy
4 * of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in
5 * writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
6 * OF ANY KIND, either express or implied. See the License for the specific language governing permissions and
7 * limitations under the License.
10 package edu.internet2.middleware.shibboleth.idp;
13 import java.security.Principal;
14 import java.util.Collection;
17 import org.apache.log4j.Logger;
18 import org.opensaml.InvalidCryptoException;
19 import org.opensaml.SAMLAssertion;
20 import org.opensaml.SAMLAttribute;
21 import org.opensaml.SAMLException;
22 import org.opensaml.SAMLResponse;
23 import org.opensaml.saml2.metadata.provider.MetadataProvider;
24 import org.opensaml.security.TrustEngine;
25 import org.opensaml.security.X509EntityCredential;
26 import org.w3c.dom.Element;
28 import edu.internet2.middleware.shibboleth.aa.AAAttribute;
29 import edu.internet2.middleware.shibboleth.aa.AAException;
30 import edu.internet2.middleware.shibboleth.aa.arp.ArpProcessingException;
31 import edu.internet2.middleware.shibboleth.artifact.ArtifactMapper;
32 import edu.internet2.middleware.shibboleth.common.RelyingParty;
33 import edu.internet2.middleware.shibboleth.common.RelyingPartyMapper;
36 * Delivers core IdP functionality (Attribute resolution, ARP filtering, Metadata lookup, Signing, Mapping between local &
37 * SAML identifiers, etc.) to components that process protocol-specific requests.
39 * @author Walter Hoehn
41 public interface IdPProtocolSupport extends MetadataProvider {
44 * Facility for logging transaction information. Should be used by most Protocol Hanlder implementations.
46 public Logger getTransactionLog();
49 * Access to system-wide configuration.
51 public IdPConfig getIdPConfig();
54 * Access to relying party-specific configuration.
56 public RelyingPartyMapper getRelyingPartyMapper();
58 public void signAssertions(SAMLAssertion[] assertions, RelyingParty relyingParty) throws InvalidCryptoException,
61 public void signResponse(SAMLResponse response, RelyingParty relyingParty) throws SAMLException;
64 * Registered a metadata provider based on supplied XML configuration.
66 public void addMetadataProvider(Element element);
68 public Collection<? extends SAMLAttribute> getReleaseAttributes(Principal principal, RelyingParty relyingParty,
69 String requester) throws AAException;
71 public Collection<? extends SAMLAttribute> getReleaseAttributes(Principal principal, RelyingParty relyingParty,
72 String requester, Collection<URI> attributeNames) throws AAException;
74 public Collection<? extends SAMLAttribute> resolveAttributes(Principal principal, String requester,
75 String responder, Map<String, AAAttribute> attributeSet) throws ArpProcessingException;
77 public Collection<? extends SAMLAttribute> resolveAttributesNoPolicies(Principal principal, String requester,
78 String responder, Map<String, AAAttribute> attributeSet);
81 * Cleanup resources that won't be released when this object is garbage-collected
83 public void destroy();
85 public ArtifactMapper getArtifactMapper();
88 * Returns an OpenSAML2 Trust Engine implementation.
90 public TrustEngine<X509EntityCredential> getTrustEngine();
93 * Returns the number of active Metadata Providers.
95 public int providerCount();