Class KeyPairGeneratorConfiguration

java.lang.Object
org.apache.nifi.web.security.configuration.KeyPairGeneratorConfiguration

@Configuration public class KeyPairGeneratorConfiguration extends Object
  • Field Details

    • STANDARD_KEY_PAIR_ALGORITHM

      private static final String STANDARD_KEY_PAIR_ALGORITHM
      Standard Key Pair Algorithm for signing JSON Web Tokens
      See Also:
    • STANDARD_KEY_PAIR_ALGORITHM_FILTER

      private static final String STANDARD_KEY_PAIR_ALGORITHM_FILTER
      See Also:
    • FALLBACK_KEY_PAIR_ALGORITHM

      private static final String FALLBACK_KEY_PAIR_ALGORITHM
      Fallback Key Pair Algorithm when standard algorithm not supported in current Security Provider
      See Also:
    • logger

      private static final org.slf4j.Logger logger
  • Constructor Details

    • KeyPairGeneratorConfiguration

      public KeyPairGeneratorConfiguration()
  • Method Details

    • jwtKeyPairGenerator

      @Bean public KeyPairGenerator jwtKeyPairGenerator() throws NoSuchAlgorithmException
      JSON Web Token Key Pair Generator defaults to Ed25519 and falls back to RSA when current Security Providers do not support Ed25519. The fallback strategy supports security configurations that have not included Ed25519 as an approved algorithm. This strategy works with restricted providers such as those that have not incorporated algorithm approvals described in FIPS 186-5
      Returns:
      Key Pair Generator for JSON Web Token signing
      Throws:
      NoSuchAlgorithmException - Thrown on failure to get Key Pair Generator for selected algorithm