Class LocalRSAKeyProvider

java.lang.Object
org.apache.polaris.service.auth.LocalRSAKeyProvider
All Implemented Interfaces:
KeyProvider

public class LocalRSAKeyProvider extends Object implements KeyProvider
Holds a public / private key pair in memory.
  • Constructor Details

    • LocalRSAKeyProvider

      public LocalRSAKeyProvider(@Nonnull KeyPair keyPair)
    • LocalRSAKeyProvider

      public LocalRSAKeyProvider(@Nonnull PublicKey publicKey, @Nonnull PrivateKey privateKey)
  • Method Details

    • fromFiles

      public static LocalRSAKeyProvider fromFiles(@Nonnull Path publicKeyFile, @Nonnull Path privateKeyFile)
    • getPublicKey

      public PublicKey getPublicKey()
      Getter for the Public Key instance
      Specified by:
      getPublicKey in interface KeyProvider
      Returns:
      the Public Key instance
    • getPrivateKey

      public PrivateKey getPrivateKey()
      Getter for the Private Key instance. Used to sign the content on the JWT signing stage.
      Specified by:
      getPrivateKey in interface KeyProvider
      Returns:
      the Private Key instance