PicketLink Federation Core 2.1.6.Final-redhat-2

org.picketlink.identity.federation.core.util
Class CoreConfigUtil

java.lang.Object
  extended by org.picketlink.identity.federation.core.util.CoreConfigUtil

public class CoreConfigUtil
extends Object

Utility for configuration

Since:
Nov 13, 2009
Author:
Anil.Saldhana@redhat.com

Constructor Summary
CoreConfigUtil()
           
 
Method Summary
static boolean decryptionNeeded(List<? extends KeyValueType> keyValueList)
          Given a key value list, check if decrypt of any properties is needed.
static String getIdentityURL(IDPSSODescriptorType idp, String bindingURI)
          Given a binding uri, get the IDP identity url
static IDPSSODescriptorType getIDPDescriptor(EntitiesDescriptorType entitiesDescriptor)
          Get the first metadata descriptor for an IDP
static IDPSSODescriptorType getIDPDescriptor(EntityDescriptorType entityDescriptor)
          Get the IDP metadata descriptor from an entity descriptor
static IDPType getIDPType(IDPSSODescriptorType idpSSODescriptor)
          Get the IDP Type
static List<AuthPropertyType> getKeyProviderProperties(KeyProviderType keyProviderType)
          Given a KeyProviderType, return the list of auth properties that have been decrypted for any masked password
static List<EntityDescriptorType> getMetadataConfiguration(ProviderType providerType, javax.servlet.ServletContext servletContext)
          Read metadata from ProviderType
static List<KeyValueType> getProperties(ClaimsProcessorType claimsProcessorType)
          Given a ClaimsProcessorType, return the list of properties that have been decrypted for any masked property value
static List<KeyValueType> getProperties(TokenProviderType tokenProviderType)
          Given a TokenProviderType, return the list of properties that have been decrypted for any masked property value
static String getServiceURL(SPSSODescriptorType sp, String bindingURI)
          Get the service url for the SP
static SPType getSPConfiguration(EntitiesDescriptorType entitiesDescriptor, String bindingURI)
          Given a metadata EntityDescriptorType, construct the Service provider configuration
static ProviderType getSPConfiguration(EntityDescriptorType entityDescriptor, String bindingURI)
          Given a metadata EntityDescriptorType, construct the Service provider configuration
static SPSSODescriptorType getSPDescriptor(EntityDescriptorType entityDescriptor)
          Get the SP Descriptor from an entity descriptor
static TrustKeyManager getTrustKeyManager(KeyProviderType keyProvider)
          Once the KeyProviderType is derived, get the TrustKeyManager
static TrustKeyManager getTrustKeyManager(ProviderType idpOrSPConfiguration)
          Given either the IDP Configuration or the SP Configuration, derive the TrustKeyManager
static PublicKey getValidatingKey(ProviderType idpSpConfiguration, String domain)
          Get the validating key
static PublicKey getValidatingKey(TrustKeyManager trustKeyManager, String domain)
          Get the validating key given the trust key manager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoreConfigUtil

public CoreConfigUtil()
Method Detail

getTrustKeyManager

public static TrustKeyManager getTrustKeyManager(ProviderType idpOrSPConfiguration)
Given either the IDP Configuration or the SP Configuration, derive the TrustKeyManager

Parameters:
idpOrSPConfiguration -
Returns:

getTrustKeyManager

public static TrustKeyManager getTrustKeyManager(KeyProviderType keyProvider)
Once the KeyProviderType is derived, get the TrustKeyManager

Parameters:
keyProvider -
Returns:

getValidatingKey

public static PublicKey getValidatingKey(ProviderType idpSpConfiguration,
                                         String domain)
                                  throws ConfigurationException,
                                         ProcessingException
Get the validating key

Parameters:
idpSpConfiguration -
domain -
Returns:
Throws:
ConfigurationException
ProcessingException

getValidatingKey

public static PublicKey getValidatingKey(TrustKeyManager trustKeyManager,
                                         String domain)
                                  throws ConfigurationException,
                                         ProcessingException
Get the validating key given the trust key manager

Parameters:
trustKeyManager -
domain -
Returns:
Throws:
ConfigurationException
ProcessingException

getKeyProviderProperties

public static List<AuthPropertyType> getKeyProviderProperties(KeyProviderType keyProviderType)
                                                       throws GeneralSecurityException
Given a KeyProviderType, return the list of auth properties that have been decrypted for any masked password

Parameters:
keyProviderType -
Returns:
Throws:
GeneralSecurityException

getProperties

public static List<KeyValueType> getProperties(TokenProviderType tokenProviderType)
                                        throws GeneralSecurityException
Given a TokenProviderType, return the list of properties that have been decrypted for any masked property value

Parameters:
tokenProviderType -
Returns:
Throws:
GeneralSecurityException

getProperties

public static List<KeyValueType> getProperties(ClaimsProcessorType claimsProcessorType)
                                        throws GeneralSecurityException
Given a ClaimsProcessorType, return the list of properties that have been decrypted for any masked property value

Parameters:
claimsProcessorType -
Returns:
Throws:
GeneralSecurityException

decryptionNeeded

public static boolean decryptionNeeded(List<? extends KeyValueType> keyValueList)
Given a key value list, check if decrypt of any properties is needed. Unless one of the keys is "salt", we cannot figure out is decrypt is needed

Parameters:
keyValueList -
Returns:

getSPConfiguration

public static ProviderType getSPConfiguration(EntityDescriptorType entityDescriptor,
                                              String bindingURI)
Given a metadata EntityDescriptorType, construct the Service provider configuration

Parameters:
entityDescriptor -
bindingURI -
Returns:

getSPConfiguration

public static SPType getSPConfiguration(EntitiesDescriptorType entitiesDescriptor,
                                        String bindingURI)
Given a metadata EntityDescriptorType, construct the Service provider configuration

Parameters:
entityDescriptor -
bindingURI -
Returns:

getIDPDescriptor

public static IDPSSODescriptorType getIDPDescriptor(EntitiesDescriptorType entitiesDescriptor)
Get the first metadata descriptor for an IDP

Parameters:
entitiesDescriptor -
Returns:

getIDPDescriptor

public static IDPSSODescriptorType getIDPDescriptor(EntityDescriptorType entityDescriptor)
Get the IDP metadata descriptor from an entity descriptor

Parameters:
entityDescriptor -
Returns:

getSPDescriptor

public static SPSSODescriptorType getSPDescriptor(EntityDescriptorType entityDescriptor)
Get the SP Descriptor from an entity descriptor

Parameters:
entityDescriptor -
Returns:

getIdentityURL

public static String getIdentityURL(IDPSSODescriptorType idp,
                                    String bindingURI)
Given a binding uri, get the IDP identity url

Parameters:
idp -
bindingURI -
Returns:

getServiceURL

public static String getServiceURL(SPSSODescriptorType sp,
                                   String bindingURI)
Get the service url for the SP

Parameters:
sp -
bindingURI -
Returns:

getIDPType

public static IDPType getIDPType(IDPSSODescriptorType idpSSODescriptor)
Get the IDP Type

Parameters:
idpSSODescriptor -
Returns:

getMetadataConfiguration

public static List<EntityDescriptorType> getMetadataConfiguration(ProviderType providerType,
                                                                  javax.servlet.ServletContext servletContext)
Read metadata from ProviderType

Parameters:
providerType -
servletContext -
Returns:

PicketLink Federation Core 2.1.6.Final-redhat-2

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.