Class IDFFMetaSecurityUtils


  • public final class IDFFMetaSecurityUtils
    extends Object
    The IDFFMetaSecurityUtils class provides metadata security related utility functions.
    • Method Detail

      • buildX509Certificate

        public static String buildX509Certificate​(String certAlias)
                                           throws IDFFMetaException
        Returns BASE64 encoded X509 Certificate string corresponding to the certificate alias.
        Parameters:
        certAlias - Alias of the Certificate to be retrieved.
        Returns:
        BASE64 encoded X509 Certificate string, return null if null or empty certificate alias is specified.
        Throws:
        IDFFMetaException - if unable to retrieve the certificate from the internal key store.
      • updateProviderKeyInfo

        public static void updateProviderKeyInfo​(String realm,
                                                 String entityID,
                                                 String certAlias,
                                                 boolean isSigning,
                                                 boolean isIDP,
                                                 String encAlgo,
                                                 int keySize)
                                          throws IDFFMetaException
        Updates signing or encryption key info for SP or IDP. This will update both signing/encryption alias on extended metadata and certificates in standard metadata.
        Parameters:
        realm - Realm the entity resides.
        entityID - ID of the entity to be updated.
        certAlias - Alias of the certificate to be set to the entity. If null, will remove existing key information from the SP or IDP.
        isSigning - true if this is signing certificate alias, false if this is encryption certification alias.
        isIDP - true if this is for IDP signing/encryption alias, false if this is for SP signing/encryption alias
        encAlgo - Encryption algorithm URI, this is applicable for encryption cert only.
        keySize - Encryption key size, this is applicable for encryption cert only.
        Throws:
        IDFFMetaException - if failed to update the certificate alias for the entity.