@Test public void resolve_BinaryFileBase64() throws Exception { Path path = getPath("secret.json"); String pathStr = path.toAbsolutePath().toString(); environment.set("FOO", pathStr); byte[] bytes = Files.readAllBytes(path); String expected = Base64.getEncoder().encodeToString(bytes); byte[] expectedBytes = Base64.getDecoder().decode(expected); String actual = resolve("${fileBase64:${FOO}}"); byte[] actualBytes = Base64.getDecoder().decode(actual); String lookup = BINARYFILE.lookup(pathStr); assertThat(lookup, equalTo(expected)); assertThat(actual, equalTo(expected)); assertThat(actualBytes, equalTo(expectedBytes)); }
@Deprecated @Restricted(DoNotUse.class) public static String resolve(ConfigurationContext context, String toInterpolate) { return context.getSecretSourceResolver().resolve(toInterpolate); }
SecretSourceResolver { @Deprecated @Restricted(DoNotUse.class) public static String resolve(ConfigurationContext context, String toInterpolate) { return context.getSecretSourceResolver().resolve(toInterpolate); } }
SecretSourceResolver { @Deprecated @Restricted(DoNotUse.class) public static String resolve(ConfigurationContext context, String toInterpolate) { return context.getSecretSourceResolver().resolve(toInterpolate); } SecretSourceResolver(ConfigurationContext configurationContext); }
SecretSourceResolver { @Deprecated @Restricted(DoNotUse.class) public static String resolve(ConfigurationContext context, String toInterpolate) { return context.getSecretSourceResolver().resolve(toInterpolate); } SecretSourceResolver(ConfigurationContext configurationContext); String encode(@CheckForNull String toEncode); @Deprecated @Restricted(DoNotUse.class) static String resolve(ConfigurationContext context, String toInterpolate); String resolve(String toInterpolate); }
SecretSourceResolver { @Deprecated @Restricted(DoNotUse.class) public static String resolve(ConfigurationContext context, String toInterpolate) { return context.getSecretSourceResolver().resolve(toInterpolate); } SecretSourceResolver(ConfigurationContext configurationContext); String encode(@CheckForNull String toEncode); @Deprecated @Restricted(DoNotUse.class) static String resolve(ConfigurationContext context, String toInterpolate); String resolve(String toInterpolate);  }