Class MetadataServiceRegistry
java.lang.Object
net.shibboleth.idp.cas.service.impl.MetadataServiceRegistry
- All Implemented Interfaces:
ServiceRegistry
CAS service registry implementation that queries SAML metadata for a CAS service given a CAS service URL using
the following strategy. A
MetadataResolver
is queried for an EntityDescriptor
that meets the
following criteria:
- Defines
https://www.apereo.org/cas/protocol
in theprotocolSupportEnumeration
attribute of anSPSSODescriptor
element. - Defines an
AssertionConsumerService
element where theBinding
URI is "https://www.apereo.org/cas/protocol/login". - Matching
AssertionConsumerService
element also defines aLocation
attribute where the given service URL starts with the ACS location.
Service
and returned; if more than result is found, a
ResolverException
is raised, otherwise null is returned.
Two additional aspects of a CAS service may be specified in metadata:
allowedToProxy
- True if there is anAssertionConsumerService
element with a binding of"https://www.apereo.org/cas/protocol/proxy"
, false otherwise.singleLogoutParticipant
- True if there is aSingleLogoutService
element with a binding of"https://www.apereo.org/cas/protocol/logout"
and a location of"urn:mace:shibboleth:profile:CAS:logout"
, false otherwise.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Predicate defines CAS login endpoints so that the metadata index on endpoints can be scoped to the smallest set needed to support CAS entities in SAML metadata. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.Logger
Class logger.static final String
URI identifying an ACS endpoint that requests CAS service tickets.static final String
URI identifying a CAS SLO endpoint.static final String
URN marking that SLO endpoint is dynamic based on service ticket URL.private final RoleDescriptorResolver
SAML metadata resolver.static final String
URI identifying a CAS proxy callback endoint. -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new instance that queries the given metadata resolver. -
Method Summary
Modifier and TypeMethodDescriptionprotected Service
create
(String serviceURL, SPSSODescriptor role) Create a CASService
from an input service URL and the matchingRoleDescriptor
that was resolved from the metadata source.protected CriteriaSet
Create the set of criteria used to find a unique CAS service given a CAS service URL.private boolean
Checks if theEntityDescriptor
has an SLO endpoint.private boolean
Checks if theEntityDescriptor
have aPROXY_BINDING
acs.Looks up a service entry from a service URL.
-
Field Details
-
LOGIN_BINDING
URI identifying an ACS endpoint that requests CAS service tickets.- See Also:
-
LOGOUT_BINDING
URI identifying a CAS SLO endpoint.- See Also:
-
LOGOUT_LOCATION
URN marking that SLO endpoint is dynamic based on service ticket URL.- See Also:
-
PROXY_BINDING
URI identifying a CAS proxy callback endoint.- See Also:
-
log
private final org.slf4j.Logger logClass logger. -
metadataResolver
SAML metadata resolver.
-
-
Constructor Details
-
MetadataServiceRegistry
public MetadataServiceRegistry(@Nonnull @ParameterName(name="resolver") RoleDescriptorResolver resolver) Create a new instance that queries the given metadata resolver.- Parameters:
resolver
- SAML metadata resolver.
-
-
Method Details
-
lookup
Description copied from interface:ServiceRegistry
Looks up a service entry from a service URL.- Specified by:
lookup
in interfaceServiceRegistry
- Parameters:
serviceURL
- Non-null CAS service URL.- Returns:
- Service found in registry or null if no match found.
-
criteria
Create the set of criteria used to find a unique CAS service given a CAS service URL.- Parameters:
serviceURL
- CAS service URL.- Returns:
- Metadata resolver criteria set.
-
create
Create a CASService
from an input service URL and the matchingRoleDescriptor
that was resolved from the metadata source.- Parameters:
serviceURL
- CAS service URL.role
- resolved from metadata.- Returns:
- CAS service created from inputs.
-
isAuthorizedToProxy
Checks if theEntityDescriptor
have aPROXY_BINDING
acs.- Parameters:
role
- what to look at- Returns:
- whether is is authorized to proxy
-
hasSingleLogoutService
Checks if theEntityDescriptor
has an SLO endpoint.- Parameters:
role
- what to look at- Returns:
- whether it has an SLO endpoint
-