Class SecretReferenceUtil


  • public class SecretReferenceUtil
    extends Object
    Utility class for secret references used by SecretManager.
    Since:
    11.0
    • Method Detail

      • getSecretManagerId

        public static String getSecretManagerId​(String secretReference)
        Parses out secretManagerId from secretReference.
        Parameters:
        secretReference - String in expected format OBF:MGR:{secretManagerId}:{secretId}
        Returns:
        String of the secretManagerId from the secretReference, otherwise null if secretReference is not valid.
      • getSecretId

        public static String getSecretId​(String secretReference)
        Parses out secretId from secretReference.
        Parameters:
        secretReference - String in expected format OBF:MGR:{secretManagerId}:{secretId}
        Returns:
        String of the secretId from the secretReference, otherwise null if secretReference is not valid.
      • validateSecretManagerId

        public static boolean validateSecretManagerId​(String secretReference)
        Validates the secretManagerId defined in the secretReference.
        Parameters:
        secretReference - String in expected format OBF:MGR:{secretManagerId}:{secretId}
        Returns:
        true if secretManagerId is a valid secret manager, otherwise false.