SAMLv2ModelImpl.java revision 87eb3f7fa6a83f2e2682123f21cf20afcdc88f4a
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: SAMLv2ModelImpl.java,v 1.45 2009/11/24 21:48:40 madan_ranganath Exp $
*
*/
/**
* Portions Copyrighted 2010-2012 ForgeRock Inc
*/
private SAML2MetaManager metaManager;
//extended metadata attributes for idp only
static {
// ECP
// IDP Adapter
//SAE
//RelayState URL List
}
//extended metadata attributes for sp only
static {
//IDP PROXY
//ECP
//SAE
//spAdapter
//RelayState URL List
// Do Not Write Federation Info Feature
}
//extended Assertion Content metadata attributes for idp only
static {
}
//extended Assertion Processing metadata attributes for idp only
static {
}
//extended Services metadata attributes for idp only
static {
}
//extended Advanced metadata attributes for idp only
static {
}
//extended Assertion Content metadata attributes for sp only
static {
}
//extended Assertion Processing metadata attributes for sp only
static {
// extendedAPMetaSpMap.put(ATTR_DO_NOT_WRITE_FEDERATION_INFO, Collections.EMPTY_SET);
}
//extended Services metadata attributes for sp only
static {
}
//extended Advanced metadata attributes for sp only
static {
//IDP PROXY
//ECP
//SAE
//Relay State URL List
}
static {
}
static {
}
//attributes for attribute authority
static {
}
//attributes for authn authority
static {
}
//attributes for attribute query
static {
}
}
/**
* Returns a map with standard identity provider attributes and values.
*
* @param realm to which the entity belongs.
* @param entityName is the entity id.
* @return Map with standard attribute values of Identity Provider.
* @throws AMConsoleException if unable to retrieve the Identity Provider
* attrubutes based on the realm and entityName passed.
*/
) throws AMConsoleException {
try {
if (idpssoDescriptor != null) {
// retrieve WantAuthnRequestsSigned
//retrieve ArtifactResolutionService
}
//retrieve SingleLogoutService
if (i == 0) {
}
spslsElem.getLocation()));
spslsElem.getLocation()));
spslsElem.getLocation()));
}
}
//retrieve ManageNameIDService
if (i == 0) {
}
mniElem.getLocation()));
mniElem.getLocation()));
mniElem.getLocation()));
}
}
//retrieve nameid mapping service
if (!nameIDmappingList.isEmpty()) {
namidElem1.getLocation()));
}
//retrieve nameid format
//retrieve single sign on service
signElem.getLocation()));
signElem.getLocation()));
signElem.getLocation()));
}
}
//retrieve key descriptor encryption details if present
}
}
} catch (SAML2MetaException e) {
("SAMLv2ModelImpl.getIdentityProviderAttributes:", e);
logEvent("FEDERATION_EXCEPTION_GET_ENTITY_DESCRIPTOR_ATTR_VALUES",
paramsEx);
throw new AMConsoleException(strError);
}
return map;
}
/**
* Returns a map with extended identity provider attributes and values.
*
* @param realm to which the entity belongs.
* @param entityName is the entity id.
* @return Map with extended attribute values of Identity Provider.
* @throws AMConsoleException if unable to retrieve the Identity Provider
* attrubutes based on the realm and entityName passed.
*/
) throws AMConsoleException {
try {
if (idpssoConfig != null) {
}
} catch (SAML2MetaException e) {
("SAMLv2ModelImpl.getExtIdentityProviderAttributes:", e);
logEvent("FEDERATION_EXCEPTION_GET_ENTITY_DESCRIPTOR_ATTR_VALUES",
paramsEx);
throw new AMConsoleException(strError);
}
}
/**
*Returns the metaAlias of the entity.
*
*@param realm to which the entity belongs.
*@param entityName is the entity id.
*@param role the Role of entity.
*@return the metaAlias of the entity.
*@throws AMConsoleException if unable to retrieve metaAlias.
*/
public String getMetaalias(
) throws AMConsoleException {
try {
if (idpssoConfig != null) {
}
if (spssoConfig != null) {
}
}
} catch (SAML2MetaException e) {
("SAMLv2ModelImpl.getMetaalias:", e);
logEvent("FEDERATION_EXCEPTION_GET_METAALIAS",
paramsEx);
throw new AMConsoleException(strError);
}
return metaAlias;
}
/**
* Returns a map with standard service provider attributes and values.
*
* @param realm to which the entity belongs.
* @param entityName is the entity id.
* @return Map with standard attribute values of Service Provider.
* @throws AMConsoleException if unable to retrieve the Service Provider
* attrubutes based on the realm and entityName passed.
*/
) throws AMConsoleException {
try {
if (spssoDescriptor != null) {
// retrieve WantAuthnRequestsSigned
//retrieve SingleLogoutService
if (i == 0) {
}
spslsElem.getLocation()));
spslsElem.getLocation()));
}
}
//retrieve ManageNameIDService
if (i == 0) {
}
mniElem.getLocation()));
}
}
//retrieve nameid format
//retrieve key descriptor encryption details if present
}
}
} catch (SAML2MetaException e) {
("SAMLv2ModelImpl.getStandardServiceProviderAttribute:", e);
logEvent("FEDERATION_EXCEPTION_GET_ENTITY_DESCRIPTOR_ATTR_VALUES",
paramsEx);
throw new AMConsoleException(strError);
}
return map;
}
/**
* Returns a List with Assertion Consumer Service attributes and values.
*
* @param realm to which the entity belongs.
* @param entityName is the entity id.
* @return List with Assertion Consumer values of Service Provider.
* @throws AMConsoleException if unable to retrieve the Service Provider
* Assertion Consumer values based on the realm and entityName passed.
*/
public List getAssertionConsumerServices(
) throws AMConsoleException {
try {
if (spssoDescriptor != null) {
}
} catch (SAML2MetaException e) {
if (debug.warningEnabled()) {
}
throw new AMConsoleException(getErrorString(e));
}
return asconsServiceList;
}
/*
*Creates and returns a new AssertionConsumerServiceElement.
*
* @throws AMConsoleException if unable to retrieve.
*/
throws AMConsoleException {
try {
} catch (JAXBException e) {
if (debug.warningEnabled()) {
}
throw new AMConsoleException(getErrorString(e));
}
return acsElem;
}
/**
* Returns a map with extended service provider attributes and values.
*
* @param realm to which the entity belongs.
* @param entityName is the entity id.
* @return Map with extended attribute values of Service Provider.
* @throws AMConsoleException if unable to retrieve the Service Provider
* attrubutes based on the realm and entityName passed.
*/
) throws AMConsoleException {
try {
if (spssoConfig != null) {
}
} catch (SAML2MetaException e) {
"SAMLv2ModelImpl.getExtendedServiceProviderAttributes:", e);
logEvent("FEDERATION_EXCEPTION_GET_ENTITY_DESCRIPTOR_ATTR_VALUES",
paramsEx);
throw new AMConsoleException(strError);
}
}
/**
* Saves the standard attribute values for the Identiy Provider.
*
* @param realm to which the entity belongs.
* @param entityName is the entity id.
* @param idpStdValues Map which contains the standard attribute values.
* @throws AMConsoleException if saving of attribute value fails.
*/
public void setIDPStdAttributeValues(
) throws AMConsoleException {
try {
if (idpssoDescriptor != null) {
// save for WantAuthnRequestsSigned
boolean value = setToBoolean(
}
// save for Artifact Resolution Service
indexValue = "0";
}
boolean isDefault =
elem =
elem.setIsDefault(false);
artList =
}
}
// save for Single Logout Service - Http-Redirect
if (lohttpLocation != null) {
} else if (postLocation != null) {
} else if (losoapLocation != null) {
}
}
}
{
}
}
// save for Manage Name ID Service
if (mnihttpLocation != null) {
} else if (mnipostLocation != null) {
} else if (mnisoapLocation != null) {
}
}
if (!manageNameIdList.isEmpty()) {
}
}
}
//save nameid mapping
if (nameIDmappingList.isEmpty()) {
}
}
//save nameid format
}
//save for SingleSignOnService
{
if (!signonList.isEmpty()) {
signonList.clear();
}
if (ssohttpLocation != null &&
{
}
if (ssopostLocation != null &&
{
}
if (ssoSoapLocation != null &&
{
}
}
}
} catch (SAML2MetaException e) {
("SAMLv2ModelImpl.setIDPStdAttributeValues:", e);
logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",
paramsEx);
throw new AMConsoleException(strError);
} catch (JAXBException e) {
logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",
paramsEx);
}
}
/**
* Saves the extended attribute values for the Identiy Provider.
*
* @param realm to which the entity belongs.
* @param entityName is the entity id.
* @param idpExtValues Map which contains the standard attribute values.
* @param location has the information whether remote or hosted.
* @throws AMConsoleException if saving of attribute value fails.
*/
public void setIDPExtAttributeValues(
) throws AMConsoleException {
try {
//entityConfig is the extended entity configuration object
//for remote cases
if (entityConfig == null) {
}
if (idpssoConfig != null) {
}
//saves the attributes by passing the new entityConfig object
} catch (SAML2MetaException e) {
logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",
paramsEx);
} catch (JAXBException e) {
logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",
paramsEx);
} catch (AMConsoleException e) {
logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",
paramsEx);
}
}
/**
* Saves the standard attribute values for the Service Provider.
*
* @param realm to which the entity belongs.
* @param entityName is the entity id.
* @param spStdValues Map which contains the standard attribute values.
* @param assertionConsumer List with assertion consumer service values.
* @throws AMConsoleException if saving of attribute value fails.
*/
public void setSPStdAttributeValues(
) throws AMConsoleException {
try {
if (spssoDescriptor != null) {
// save for Single Logout Service - Http-Redirect
{
if (lohttpLocation != null) {
} else if (lopostLocation != null) {
} else if (losoapLocation != null) {
}
}
}
{
}
}
// save for Manage Name ID Service
{
if (mnihttpLocation != null) {
} else if (mnipostLocation != null) {
} else if (mnisoapLocation != null) {
}
}
if (!manageNameIdList.isEmpty()) {
}
{
}
}
//save for artifact, post and paos Assertion Consumer Service
if (!assertionConsumer.isEmpty() &&
if (!asconsServiceList.isEmpty()) {
}
}
//save nameid format
}
//save AuthnRequestsSigned
boolean authnValue = setToBoolean(
}
//save WantAssertionsSigned
boolean assertValue = setToBoolean(
}
}
} catch (SAML2MetaException e) {
("SAMLv2ModelImpl.setSPStdAttributeValues:", e);
logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",
paramsEx);
throw new AMConsoleException(strError);
} catch (JAXBException e) {
logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",
paramsEx);
}
}
/**
* Saves the extended attribute values for the Service Provider.
*
* @param realm to which the entity belongs.
* @param entityName is the entity id.
* @param spExtValues Map which contains the standard attribute values.
* @param location has the information whether remote or hosted.
* @throws AMConsoleException if saving of attribute value fails.
*/
public void setSPExtAttributeValues(
) throws AMConsoleException {
try {
//entityConfig is the extended entity configuration object
//for remote cases
if (entityConfig == null) {
}
if (spssoConfig != null){
}
//saves the attributes by passing the new entityConfig object
} catch (SAML2MetaException e) {
logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",
paramsEx);
} catch (JAXBException e) {
logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",
paramsEx);
} catch (AMConsoleException e) {
logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",
paramsEx);
}
}
/**
* Updates the BaseConfigElement.
*
* @param baseConfig is the BaseConfigType passed.
* @param role the role of entity.
* @throws AMConsoleException if update of baseConfig object fails.
*/
private void updateBaseConfig(
) throws JAXBException, AMConsoleException {
}
}
}
}
}
/**
* Saves the signing and encryption values for the entity.
*
* @param realm to which the entity belongs.
* @param entityName is the entity id.
* @param extValues Map which contains the extended attribute values.
* @param stdValues Map which contains the standard attribute values.
* @param isIDP has information whether entity is an idp or sp.
* @throws AMConsoleException if saving of attribute value fails.
*/
public void updateKeyinfo(
boolean isIDP
) throws AMConsoleException {
if (isIDP) {
} else {
}
"http://www.w3.org/2001/04/xmlenc#aes128-cbc" : algorithm;
try {
} catch (SAML2MetaException e) {
throw new AMConsoleException(getErrorString(e));
}
}
/**
* Updates the BaseConfigElement.
*
* @param baseConfig is the BaseConfigType passed.
* @param attributeName is the attribute name
* @param list the list which contains the new values.
* @throws AMConsoleException if update of baseConfig object fails.
*/
private void updateBaseConfig(
) throws AMConsoleException {
}
}
}
/**
* Saves the NameIdFormat.
*
* @throws AMConsoleException if save fails.
*/
private void saveNameIdFormat(
) throws AMConsoleException {
}
}
/**
* retrieves the encryption key size and algorithm
*
*/
private void getKeyandAlgorithm(
) {
if (!encryptMethod.isEmpty()) {
if (!keySizeList.isEmpty()) {
contains("KeySizeImpl")) {
}
}
}
}
}
}
}
/**
* Creates the extended config object when it does not exist.
* @param realm the realm to which the entity belongs.
* @param entityName is the entity id.
* @param location indicates whether hosted or remote
* @throws SAML2MetaException, JAXBException,
* AMConsoleException if saving of attribute value fails.
*/
private void createExtendedObject(
entityConfigElement.setHosted(false);
} else {
entityConfigElement.setHosted(true);
}
realm, entityName);
realm, entityName);
if (isDualRole(entityDescriptor)) {
(idpssoDesc != null))
{
{
}
(attrauthDescriptor != null))
{
}
(authnauthDescriptor != null))
{
}
(attrQueryDescriptor != null))
{
}
(xacmlPDPDescriptor != null))
{
}
(xacmlAuthzDescriptor != null))
{
}
}
throws JAXBException{
}
return bctype;
}
/**
* Retrieves information whether entity has dual role or not.
* @param entityDescriptor is the standard metadata object.
*
* @return a boolean value which indicates entity has dual role or not.
*/
boolean dual = false;
if (entityDescriptor != null) {
if ( (SAML2MetaUtils.getSPSSODescriptor(
entityDescriptor) != null) && (
entityDescriptor) != null) ) {
dual = true;
}
}
return dual;
}
/**
* Returns a Map of PEP descriptor data.(Standard Metadata)
*
* @param realm realm of Entity
* @param entityName entity name of Entity Descriptor.
* @return key-value pair Map of PEP descriptor data.
* @throws AMConsoleException if unable to retrieve the PEP
* standard metadata attributes
*/
public Map getPEPDescriptor(
) throws AMConsoleException {
try {
realm, entityName);
if (xacmlAuthzDescriptor != null) {
//ProtocolSupportEnum
} else {
}
}
} catch (SAML2MetaException e) {
logEvent("FEDERATION_EXCEPTION_GET_ENTITY_DESCRIPTOR_ATTR_VALUES",
paramsEx);
throw new AMConsoleException(strError);
}
}
/**
* Returns a Map of PDP descriptor data.(Standard Metadata)
*
* @param realm realm of Entity
* @param entityName entity name of Entity Descriptor.
* @return key-value pair Map of PDP descriptor data.
* @throws AMConsoleException if unable to retrieve the PDP
* standard metadata attribute
*/
throws AMConsoleException
{
try {
if (xacmlPDPDescriptor != null) {
//ProtocolSupportEnum
authzService.getBinding()));
authzService.getLocation()));
}
}
} catch (SAML2MetaException e) {
logEvent("FEDERATION_EXCEPTION_GET_ENTITY_DESCRIPTOR_ATTR_VALUES",
paramsEx);
throw new AMConsoleException(strError);
}
}
/**
* Returns a <code>Map</code> containing the extended metadata for the PEP.
*
* @param realm where entity exists.
* @param entityName name of entity descriptor.
* @param location if the entity is remote or hosted.
* @return key-value pair Map of PEP config data.
* @throws AMConsoleException if unable to retrieve the PEP
* extended metadata attribute
*/
public Map getPEPConfig(
) throws AMConsoleException {
try {
realm, entityName);
if (xacmlAuthzConfigElement != null) {
for (int i=0; i< size; i++) {
}
} else {
}
} catch (JAXBException e) {
logEvent("FEDERATION_EXCEPTION_GET_ENTITY_DESCRIPTOR_ATTR_VALUES",
paramsEx);
throw new AMConsoleException(strError);
} catch (SAML2MetaException e) {
logEvent("FEDERATION_EXCEPTION_GET_ENTITY_DESCRIPTOR_ATTR_VALUES",
paramsEx);
throw new AMConsoleException(strError);
}
}
/**
* Returns a Map of PDP Config data. (Extended Metadata)
*
* @param realm realm of Entity
* @param entityName entity name of Entity Descriptor
* @param location location of entity(hosted or remote)
* @return key-value pair Map of PPP config data.
* @throws AMConsoleException if unable to retrieve the PDP
* extended metadata attribute
*/
public Map getPDPConfig(
) throws AMConsoleException {
try {
realm, entityName);
if (xacmlPDPConfigElement != null) {
for (int i=0; i< size; i++) {
}
} else {
}
} catch (JAXBException e) {
logEvent("FEDERATION_EXCEPTION_GET_ENTITY_DESCRIPTOR_ATTR_VALUES",
paramsEx);
throw new AMConsoleException(strError);
} catch (SAML2MetaException e) {
logEvent("FEDERATION_EXCEPTION_GET_ENTITY_DESCRIPTOR_ATTR_VALUES",
paramsEx);
throw new AMConsoleException(strError);
}
}
/**
* Save standard metadata for PDP descriptor.
*
* @param realm realm of Entity.
* @param entityName entity name of Entity Descriptor.
* @param attrValues key-value pair Map of PDP standed data.
* standard metadata attribute
*/
public void updatePDPDescriptor(
) throws AMConsoleException {
try {
if (pdpDescriptor != null) {
}
}
} catch (SAML2MetaException e) {
throw new AMConsoleException(strError);
}
}
/**
* Save extended metadata for PDP Config.
*
* @param realm realm of Entity.
* @param entityName entity name of Entity Descriptor.
* @param location entity is remote or hosted.
* @param attrValues key-value pair Map of PDP extended config.
* extended metadata attribute
*/
public void updatePDPConfig(
) throws AMConsoleException {
try {
//entityConfig is the extended entity configuration object
if (entityConfig == null) {
throw new AMConsoleException("invalid.xacml.configuration");
}
realm, entityName);
if (pdpEntityConfig == null) {
throw new AMConsoleException("invalid.xacml.configuration");
} else {
}
//saves the attributes by passing the new entityConfig object
} catch (SAML2MetaException e) {
throw new AMConsoleException(strError);
} catch (JAXBException e) {
throw new AMConsoleException(strError);
}
}
/**
* Save the standard metadata for PEP descriptor.
*
* @param realm realm of Entity.
* @param entityName entity name of Entity Descriptor.
* @param attrValues key-value pair Map of PEP descriptor data.
* throws AMConsoleException if there is an error.
*/
public void updatePEPDescriptor(
) throws AMConsoleException {
// TBD : currently, there is nothing to save
}
/**
* Save the extended metadata for PEP Config.
*
* @param realm realm of Entity
* @param entityName entity name of Entity Descriptor.
* @param location entity is remote or hosted
* @param attrValues key-value pair Map of PEP extended config.
* extended metadata attributes
*/
public void updatePEPConfig(
) throws AMConsoleException {
try {
//entityConfig is the extended entity configuration object
if (entityConfig == null) {
throw new AMConsoleException("invalid.xacml.configuration");
}
realm, entityName);
if (pepEntityConfig == null) {
throw new AMConsoleException("invalid.xacml.configuration");
} else {
}
//saves the attributes by passing the new entityConfig object
} catch (SAML2MetaException e) {
throw new AMConsoleException(strError);
} catch (JAXBException e) {
throw new AMConsoleException(strError);
}
}
/**
* Returns the object of Auththentication Contexts in IDP.
*
* @param realm Realm of Entity
* @param entityName Name of Entity Descriptor.
* @return SAMLv2AuthContexts contains IDP authContexts values.
* @throws AMConsoleException if unable to retrieve the IDP
* Authentication Contexts
*/
) throws AMConsoleException {
try {
} else {
throw new AMConsoleException("invalid.entity.name");
}
boolean isDefault = false;
isDefault = true;
}
}
} catch (SAML2MetaException e) {
throw new AMConsoleException(getErrorString(e));
} catch (AMConsoleException e) {
throw new AMConsoleException(getErrorString(e));
}
}
/**
* Returns the object of Auththentication Contexts in SP.
*
* @param realm Realm of Entity
* @param entityName Name of Entity Descriptor.
* @return SAMLv2AuthContexts contains SP authContexts values.
* @throws AMConsoleException if unable to retrieve the SP
* Authentication Contexts
*/
) throws AMConsoleException {
try{
} else {
throw new AMConsoleException("invalid.entity.name");
}
boolean isDefault = false;
isDefault = true;
}
}
} catch (SAML2MetaException e) {
throw new AMConsoleException(getErrorString(e));
} catch (AMConsoleException e) {
throw new AMConsoleException(getErrorString(e));
}
}
/**
* update IDP Authentication Contexts
*
* @param realm Realm of Entity
* @param entityName Name of Entity Descriptor.
* @param cxt SAMLv2AuthContexts object contains IDP
* Authentication Contexts values
* @throws AMConsoleException if fails to update IDP
* Authentication Contexts.
*/
public void updateIDPAuthenticationContexts(
) throws AMConsoleException {
"IDP-updateIDPAuthenticationContexts"};
try {
if (entityConfig == null) {
throw new AMConsoleException("invalid.entity.name");
}
if (idpDecConfigElement == null) {
throw new AMConsoleException("invalid.config.element");
} else {
);
}
//saves the attributes by passing the new entityConfig object
} catch (SAML2MetaException e) {
"IDP-updateIDPAuthenticationContexts", strError};
logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",
paramsEx);
throw new AMConsoleException(strError);
}
return;
}
/**
* update SP Authentication Contexts
*
* @param realm Realm of Entity
* @param entityName Name of Entity Descriptor.
* @param cxt SAMLv2AuthContexts object contains SP
* Authentication Contexts values
* @throws AMConsoleException if fails to update SP
* Authentication Contexts.
*/
public void updateSPAuthenticationContexts(
) throws AMConsoleException {
"SP-updateSPAuthenticationContexts"};
try {
if (entityConfig == null) {
throw new AMConsoleException("invalid.entity.name");
}
if (spDecConfigElement == null) {
throw new AMConsoleException("invalid.config.element");
} else {
// update sp entity config
);
}
//saves the attributes by passing the new entityConfig object
} catch (SAML2MetaException e) {
"SP-updateSPAuthenticationContexts", strError};
logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",
paramsEx);
throw new AMConsoleException(strError);
}
return;
}
/**
* Returns a map with standard AttributeAuthority attributes and values.
*
* @param realm to which the entity belongs.
* @param entityName is the entity id.
* @return Map with AttributeAuthority values.
* @throws AMConsoleException if unable to retrieve std AttributeAuthority
* values based on the realm and entityName passed.
*/
) throws AMConsoleException {
try {
if (attrauthDescriptor != null) {
(key.isSupportsX509Query()))
{
key.isSupportsX509Query()));
{
}
}
}
}
if (!attrProfileList.isEmpty()) {
}
}
} catch (SAML2MetaException e) {
("SAMLv2ModelImpl.getStandardAttributeAuthorityAttributes:", e);
logEvent("FEDERATION_EXCEPTION_GET_ATTR_AUTH_ATTR_VALUES",
paramsEx);
throw new AMConsoleException(strError);
}
return map;
}
/**
* Returns a map with extended AttributeAuthority attributes and values.
*
* @param realm to which the entity belongs.
* @param entityName is the entity id.
* @return Map with extended AttributeAuthority values.
* @throws AMConsoleException if unable to retrieve ext AttributeAuthority
* attributes based on the realm and entityName passed.
*/
) throws AMConsoleException {
try {
if (attributeAuthorityConfig != null) {
}
} catch (SAML2MetaException e) {
("SAMLv2ModelImpl.getExtendedAttributeAuthorityAttributes:", e);
logEvent("FEDERATION_EXCEPTION_ATTR_AUTH_ATTR_VALUES",
paramsEx);
throw new AMConsoleException(strError);
}
}
/**
* Returns a map with standard AuthnAuthority attributes and values.
*
* @param realm to which the entity belongs.
* @param entityName is the entity id.
* @return Map with AuthnAuthority values.
* @throws AMConsoleException if unable to retrieve std AuthnAuthority
* values based on the realm and entityName passed.
*/
) throws AMConsoleException {
try {
if (authnauthDescriptor != null) {
if (!authQueryServiceList.isEmpty()) {
}
}
}
}
} catch (SAML2MetaException e) {
("SAMLv2ModelImpl.getStandardAuthnAuthorityAttributes:", e);
logEvent("FEDERATION_EXCEPTION_GET_AUTHN_AUTH_ATTR_VALUES",
paramsEx);
throw new AMConsoleException(strError);
}
return map;
}
/**
* Returns a map with extended AuthnAuthority attributes and values.
*
* @param realm to which the entity belongs.
* @param entityName is the entity id.
* @return Map with extended AuthnAuthority values.
* @throws AMConsoleException if unable to retrieve ext AuthnAuthority
* attributes based on the realm and entityName passed.
*/
) throws AMConsoleException {
try {
if (authnAuthorityConfig != null) {
}
} catch (SAML2MetaException e) {
("SAMLv2ModelImpl.getExtendedAuthnAuthorityAttributes:", e);
logEvent("FEDERATION_EXCEPTION_AUTHN_AUTH_ATTR_VALUES",
paramsEx);
throw new AMConsoleException(strError);
}
}
/**
* Returns a map with standard AttrQuery attributes and values.
*
* @param realm to which the entity belongs.
* @param entityName is the entity id.
* @return Map with AttrQuery values.
* @throws AMConsoleException if unable to retrieve std AttrQuery
* values based on the realm and entityName passed.
*/
public Map getStandardAttrQueryAttributes(
) throws AMConsoleException {
try {
} catch (SAML2MetaException e) {
("SAMLv2ModelImpl.getStandardAttrQueryAttributes:", e);
logEvent("FEDERATION_EXCEPTION_GET_ATTR_QUERY_ATTR_VALUES",
paramsEx);
throw new AMConsoleException(strError);
}
return map;
}
/**
* Returns a map with extended AttrQuery attributes and values.
*
* @param realm to which the entity belongs.
* @param entityName is the entity id.
* @return Map with extended AttrQuery values.
* @throws AMConsoleException if unable to retrieve ext AttrQuery
* attributes based on the realm and entityName passed.
*/
public Map getExtendedAttrQueryAttributes(
) throws AMConsoleException {
try {
if (attrQueryConfig != null) {
}
} catch (SAML2MetaException e) {
("SAMLv2ModelImpl.getExtendedAttrQueryAttributes:", e);
logEvent("FEDERATION_EXCEPTION_ATTR_QUERY_ATTR_VALUES",
paramsEx);
throw new AMConsoleException(strError);
}
}
/**
* Saves the standard attribute values for Attribute Authority.
*
* @param realm to which the entity belongs.
* @param entityName is the entity id.
* @param attrAuthValues Map which contains standard attribute auth values.
* @throws AMConsoleException if saving of attribute value fails.
*/
public void setStdAttributeAuthorityValues(
) throws AMConsoleException {
try {
if (attrauthDescriptor != null) {
//save attribute Service
boolean is509 =
key2.setSupportsX509Query(false);
}
}
//save assertion ID request
if (soapLocation != null) {
}
if (uriLocation != null) {
}
//save attribute profile
if (!attrProfileList.isEmpty()) {
}
}
} catch (SAML2MetaException e) {
("SAMLv2ModelImpl.setStdAttributeAuthorityValues:", e);
logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",
paramsEx);
throw new AMConsoleException(strError);
} catch (JAXBException e) {
logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",
paramsEx);
}
}
/**
* Saves the extended attribute values for Attribute Authority.
*
* @param realm to which the entity belongs.
* @param entityName is the entity id.
* @param attrAuthExtValues Map which contains the extended values.
* @param location has the information whether remote or hosted.
* @throws AMConsoleException if saving of attribute value fails.
*/
public void setExtAttributeAuthorityValues(
) throws AMConsoleException {
try {
//for remote cases
if (entityConfig == null) {
}
if (attributeAuthorityConfig != null) {
}
//saves the attributes by passing the new entityConfig object
} catch (SAML2MetaException e) {
logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",
paramsEx);
} catch (JAXBException e) {
logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",
paramsEx);
} catch (AMConsoleException e) {
logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",
paramsEx);
}
}
/**
* Saves the standard attribute values for Authn Authority.
*
* @param realm to which the entity belongs.
* @param entityName is the entity id.
* @param authnAuthValues Map which contains standard authn authority values.
* @throws AMConsoleException if saving of attribute value fails.
*/
public void setStdAuthnAuthorityValues(
) throws AMConsoleException {
try {
if (authnauthDescriptor != null) {
//save query service
if (!authQueryServiceList.isEmpty()) {
}
//save assertion ID request
if (!assertionIDReqList.isEmpty()) {
}
if (soapLocation != null) {
}
if (uriLocation != null) {
}
}
} catch (SAML2MetaException e) {
("SAMLv2ModelImpl.setStdAuthnAuthorityValues:", e);
logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",
paramsEx);
throw new AMConsoleException(strError);
} catch (JAXBException e) {
logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",
paramsEx);
}
}
/**
* Saves the extended attribute values for Authn Authority.
*
* @param realm to which the entity belongs.
* @param entityName is the entity id.
* @param authnAuthExtValues Map which contains the extended values.
* @param location has the information whether remote or hosted.
* @throws AMConsoleException if saving of attribute value fails.
*/
public void setExtauthnAuthValues(
) throws AMConsoleException {
try {
//entityConfig is the extended entity configuration object
//for remote cases
if (entityConfig == null) {
}
if (authnAuthorityConfig != null) {
}
//saves the attributes by passing the new entityConfig object
} catch (SAML2MetaException e) {
logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",
paramsEx);
} catch (JAXBException e) {
logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",
paramsEx);
} catch (AMConsoleException e) {
logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",
paramsEx);
}
}
/**
* Saves the standard attribute values for Attribute Query.
*
* @param realm to which the entity belongs.
* @param entityName is the entity id.
* @param attrQueryValues Map which contains standard attribute query values.
* @throws AMConsoleException if saving of attribute value fails.
*/
public void setStdAttributeQueryValues(
) throws AMConsoleException {
try {
if (attrQueryDescriptor != null) {
//save nameid format
if (!NameIdFormatList.isEmpty()) {
}
}
}
} catch (SAML2MetaException e) {
("SAMLv2ModelImpl.setStdAttributeQueryValues:", e);
logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",
paramsEx);
throw new AMConsoleException(strError);
}
}
/**
* Saves the extended attribute values for Attribute Query.
*
* @param realm to which the entity belongs.
* @param entityName is the entity id.
* @param attrQueryExtValues Map which contains the extended values.
* @param location has the information whether remote or hosted.
* @throws AMConsoleException if saving of attribute value fails.
*/
public void setExtAttributeQueryValues(
) throws AMConsoleException {
try {
//entityConfig is the extended entity configuration object
//for remote cases
if (entityConfig == null) {
}
if (attrQueryConfig != null) {
}
//saves the attributes by passing the new entityConfig object
} catch (SAML2MetaException e) {
logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",
paramsEx);
} catch (JAXBException e) {
logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",
paramsEx);
} catch (AMConsoleException e) {
logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",
paramsEx);
}
}
/**
* Returns a map with standard Affiliation attributes and values.
*
* @param realm to which the entity belongs.
* @param entityName is the entity id.
* @return Map with Affiliation values.
* @throws AMConsoleException if unable to retrieve std Affiliation
* values based on the realm and entityName passed.
*/
public Map getStandardAffiliationAttributes(
) throws AMConsoleException {
try {
if (affiliationDescriptor != null) {
//retrieve member list
}
}
} catch (SAML2MetaException e) {
("SAMLv2ModelImpl.getStandardAffiliationAttributes:", e);
logEvent("FEDERATION_EXCEPTION_GET_AFFILIATION_ATTR_VALUES",
paramsEx);
throw new AMConsoleException(strError);
}
return map;
}
/**
* Returns a map with extended Affiliation attributes and values.
*
* @param realm to which the entity belongs.
* @param entityName is the entity id.
* @return Map with extended Affiliation values.
* @throws AMConsoleException if unable to retrieve ext Affiliation
* attributes based on the realm and entityName passed.
*/
public Map getExtendedAffiliationyAttributes(
) throws AMConsoleException {;
try {
if (atffilConfig != null) {
}
}
} catch (SAML2MetaException e) {
("SAMLv2ModelImpl.getExtendedAffiliationyAttributes:", e);
logEvent("FEDERATION_EXCEPTION_AFFILIATION_ATTR_VALUES",
paramsEx);
throw new AMConsoleException(strError);
}
}
/**
* Saves the standard attribute values for Affilaition.
*
* @param realm to which the entity belongs.
* @param entityName is the entity id.
* @param affiliationValues Map which contains standard affiliation values.
* @param members Set which contains all members.
* @throws AMConsoleException if saving of attribute value fails.
*/
public void setStdAffilationValues(
) throws AMConsoleException {
try {
if (affiliationDescriptor != null) {
//save memberlist
if (!memberList.isEmpty()) {
}
}
}
}
} catch (SAML2MetaException e) {
("SAMLv2ModelImpl.setStdAffilationValues:", e);
logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",
paramsEx);
throw new AMConsoleException(strError);
}
}
/**
* Returns a set with all the Service Providers under the realm.
*
* @param realm to which the entity belongs.
* @return Set with all service providers under the realm passed.
* @throws AMConsoleException if unable to retrieve service providers.
*
*/
try {
} catch (SAML2MetaException e) {
throw new AMConsoleException(getErrorString(e));
}
return allSPEntities;
}
/**
* Saves the Http-Redirect Single Logout Service.
*
* @param lohttpLocation is the location url.
* @param lohttpRespLocation is the response location url.
* @param logList the live list to be updated.
* @param objFact the Object Factory class.
* @throws JAXBException if save fails.
*/
private void savehttpRedLogout (
) throws JAXBException {
}
}
/**
* Saves the Post Single Logout Service.
*
* @param postLocation is the location url.
* @param postRespLocation is the response location url.
* @param logList the live list to be updated.
* @param objFact the Object Factory class.
* @throws JAXBException if save fails.
*/
private void savepostLogout(
) throws JAXBException {
}
}
/**
* Saves the Soap Single Logout Service.
*
* @param losoapLocation is the location url.
* @param logList the live list to be updated.
* @param objFact the Object Factory class.
* @throws JAXBException if save fails.
*/
private void savesoapLogout(
) throws JAXBException {
}
}
/**
* Saves the Http-Redirect ManageNameID Service.
*
* @param mnihttpLocation is the location url.
* @param mnihttpRespLocation is the response location url.
* @param manageNameIdList the live list to be updated.
* @param objFact the Object Factory class.
* @throws JAXBException if save fails.
*/
private void savehttpRedMni (
) throws JAXBException {
}
}
/**
* Saves the Post ManageNameID Service.
*
* @param mnipostLocation is the location url.
* @param mnipostRespLocation is the response location url.
* @param manageNameIdList the live list to be updated.
* @param objFact the Object Factory class.
* @throws JAXBException if save fails.
*/
private void savepostMni(
) throws JAXBException {
}
}
/**
* Saves the Soap ManageNameID Service.
*
* @param mnisoapLocation is the location url.
* @param manageNameIdList the live list to be updated.
* @param objFact the Object Factory class.
* @throws JAXBException if save fails.
*/
private void savesoapMni(
) throws JAXBException {
}
}
/**
* Saves the Soap ManageNameID Service for SP.
*
* @param mnisoapLocation is the location url.
* @param mnirespsoapLocation is the response location url.
* @param manageNameIdList the live list to be updated.
* @param objFact the Object Factory class.
* @throws JAXBException if save fails.
*/
private void saveSPsoapMni(
) throws JAXBException {
}
}
if (metaManager == null) {
metaManager = new SAML2MetaManager();
}
return metaManager;
}
}
}
}
return val;
}
/**
* Returns SAMLv2 Extended Service Provider attribute values.
*
* @return SAMLv2 Extended Service Provider attribute values.
*/
public Map getSPEXDataMap() {
return extendedMetaSpMap;
}
/**
* Returns SAMLv2 Extended Identity Provider attribute values.
*
* @return SAMLv2 Extended Identity Provider attribute values.
*/
public Map getIDPEXDataMap() {
return extendedMetaIdpMap;
}
/**
* Returns SAMLv2 Extended Service Provider attribute for Assertion Content.
*
* @return SAMLv2 Extended Service Provider attribute for Assertion Content.
*/
public Map getSPEXACDataMap() {
return extendedACMetaSpMap;
}
/**
* Returns SAMLv2 Extended Service Provider values for Assertion Processing.
*
* @return SAMLv2 Extended Service Provider values for Assertion Processing.
*/
public Map getSPEXAPDataMap() {
return extendedAPMetaSpMap;
}
/**
* Returns SAMLv2 Extended Service Provider attribute values for Services.
*
* @return SAMLv2 Extended Service Provider attribute values for Services.
*/
public Map getSPEXSDataMap() {
return extendedSMetaSpMap;
}
/**
* Returns SAMLv2 Extended Service Provider attribute values for Advanced.
*
* @return SAMLv2 Extended Service Provider attribute values for Advanced.
*/
public Map getSPEXAdDataMap() {
return extendedAdMetaSpMap;
}
/**
* Returns SAMLv2 Extended Identity Provider values for Assertion Content.
*
* @return SAMLv2 Extended Identity Provider values for Assertion Content.
*/
public Map getIDPEXACDataMap() {
return extendedACMetaIdpMap;
}
/**
* Returns SAMLv2 Extended Identity Provider values for Assertion Processing.
*
* @return SAMLv2 Extended Identity Provider values for Assertion Processing.
*/
public Map getIDPEXAPDataMap() {
return extendedAPMetaIdpMap;
}
/**
* Returns SAMLv2 Extended Identity Provider attribute values for Services.
*
* @return SAMLv2 Extended Identity Provider attribute values for Services.
*/
public Map getIDPEXSDataMap() {
return extendedSMetaIdpMap;
}
/**
* Returns SAMLv2 Extended Identity Provider attribute values for Advanced.
*
* @return SAMLv2 Extended Identity Provider attribute values for Advanced.
*/
public Map getIDPEXAdDataMap() {
return extendedAdMetaIdpMap;
}
/**
* Returns SAMLv2 Extended Attribute Authority values.
*
* @return SAMLv2 Extended Attribute Authority values.
*/
public Map getattrAuthEXDataMap() {
return extAttrAuthMap;
}
/**
* Returns SAMLv2 Extended Authn Authority values.
*
* @return SAMLv2 Extended Authn Authority values.
*/
public Map getauthnAuthEXDataMap() {
return extAuthnAuthMap;
}
/**
* Returns SAMLv2 Extended Attribute Query values.
*
* @return SAMLv2 Extended Attribute Query values.
*/
public Map getattrQueryEXDataMap() {
return extattrQueryMap;
}
public Map getXacmlPEPExtendedMetaMap() {
return xacmlPEPExtendedMeta;
}
public Map getXacmlPDPExtendedMetaMap() {
return xacmlPDPExtendedMeta;
}
}