Friday, April 22, 2016

Spring Cloud Security Resource Server and JSON Vulnerability Protection

Leave a Comment

According to JSON Vulnerability Protection I prefix JSON responses:

@Bean public MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter() {     MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();     converter.setJsonPrefix(")]}',\n");     return converter; } 

It works fine with AngularJS, but not with @EnableOAuth2Resource-App, because Jackson can't parse response from Authorization Server. Firthermore, I can't override

    @Bean     public TokenStore jwtTokenStore() {         return new JwtTokenStore(jwtTokenEnhancer());     } 

definition from org.springframework.cloud.security.oauth2.resource.ResourceServerTokenServicesConfiguration.JwtTokenServicesConfiguration to configure ObjectMapper/RestTemplate because of autoconfiguration ordering and SPR-13980.

Maybe I'm missing a solution?

0 Answers

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment