You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
spring cloud version: 2021.0.3
spring version: 2.7.3 (Spring boot starter)
the vault library doesn't seem to be respecting the response type as it passes it in to HttpMessageConverterExtractor
internally.
** note** please look at the screenshots of my debugger - you will see that HttpMessageConverterExtractor cannot properly parse VaultResponses
Ex:
public class SomeClass {
}
@SpringBootApplication
public class VaultdebugApplication {
@Bean void createBean() {
List<HttpMessageConverter<?>> messageConverters = new ArrayList<>();
messageConverters.add(new ByteArrayHttpMessageConverter());
messageConverters.add(new StringHttpMessageConverter());
messageConverters.add(new ResourceHttpMessageConverter(false));
HttpMessageConverterExtractor x = new HttpMessageConverterExtractor(SomeClass.class, messageConverters);
}
public static void main(String[] args) {
SpringApplication.run(VaultdebugApplication.class, args);
}
}
the above works - HttpMessageConverterExtractor recognizes SomeClass.class as the response type one I trace it through the debugger.
however - when I try to read a secret from a vault Versioned backend (kv2) for whatever reason running the debugger at that same place shows that HttpMessageConverterExtractor will not recognize SomeClass.class.
@SpringBootApplication
public class VaultdebugApplication {
@Bean
public Secrets secrets(VaultTemplate operations) {
VaultResponseSupport<SomeClass> response = operations.read("some/vault/path", SomeClass.class);
System.out.println(response.getRequiredData()); // results in null
System.out.println(response.getData()); // results in null
return null;
}
public static void main(String[] args) {
SpringApplication.run(VaultdebugApplication.class, args);
}
}
in fact you can even see that - whatever is passed into Type responseType field isn't a class but an instance of VaultResponses.
The text was updated successfully, but these errors were encountered:
spring cloud version: 2021.0.3
spring version: 2.7.3 (Spring boot starter)
the vault library doesn't seem to be respecting the response type as it passes it in to
HttpMessageConverterExtractor
internally.
** note** please look at the screenshots of my debugger - you will see that HttpMessageConverterExtractor cannot properly parse VaultResponses
Ex:
the above works - HttpMessageConverterExtractor recognizes SomeClass.class as the response type one I trace it through the debugger.
however - when I try to read a secret from a vault Versioned backend (kv2) for whatever reason running the debugger at that same place shows that HttpMessageConverterExtractor will not recognize SomeClass.class.
in fact you can even see that - whatever is passed into
Type responseType
field isn't a class but an instance of VaultResponses.The text was updated successfully, but these errors were encountered: