0

I have the following issue

I have to secure an azure function developed with JAVA. I am using Spring Boot with Azure Function for development. To protect it, I use Spring Security, the configuration I have is the following:

@Override
protected void configure(HttpSecurity http) throws Exception {
    http.authorizeRequests(authorizeRequests ->
                    authorizeRequests
                            .anyRequest().authenticated())
            .oauth2ResourceServer(oauth2ResourceServer -> oauth2ResourceServer.jwt());
}

But it doesn't protect the function, however when I start the app by Spring Boot it works for me.

Any idea how to fix it?

Thanks in advance

  • Spring Cloud Function does not rely on HTTP at all unless you're exporting it via `spring-cloud-function-web` module, so what do you mean "..I am using Spring Boot with Azure Function for development..."?. I am confused about the question. – Oleg Zhurakousky Nov 16 '21 at 12:46
  • Could you please refer this https://stackoverflow.com/questions/57164490/securing-spring-cloud-functions-with-spring-security may it helps – AjayKumarGhose Nov 17 '21 at 11:48

0 Answers0