티스토리 뷰

728x90

정말 단순하게 spring security 설정으로 인해 해당 endpoint를 접근할 수 없어 발생한 문제였다.

에러 메시지가 좀 더 자세하게 나왔었다면 더 금방 트러블 슈팅했겠지만 시큐리티 문제임에도 에러 메시지가

"INVALID" is not a valid start token라니..프로메테우스 할아버지가 와도 뭐가 문제인지 모를 것같다..

 

 

해결 방법

actuator 관련 endpoint에 접근할 수 있게 다음과 같이 설정한다.

 

@Override
public void configure(WebSecurity web) {
    web.ignoring().antMatchers("/actuator/**");
}

 

httpBasic 설정도 해주어야 하는줄 알았으나 해당 설정을 제거해도 잘 동작하는 것으로 보아 단순히 endpoint 오픈 여부만 해당 에러에 영향을 미치는 듯하다.

 

레퍼런스

https://stackoverflow.com/questions/59276188/invalid-is-not-a-valid-start-token

 

"INVALID" is not a valid start token

Can't for the life of me figure out why I'm getting this error for one of the applications I'm trying to scrape. I have the following prometheus.yml: # prometheus.yml global: scrape_interval:...

stackoverflow.com

https://stackoverflow.com/questions/65437818/spring-security-ignore-url-does-not-work-with-the-we-security-ignore-method

 

Spring security ignore url does not work with the we security ignore method

We are facing an issue with SpringSecurity ignoring a method. We tried to skip authentication for a few urls (acutator/health) and resources. Authentication is being taken care externally and we are

stackoverflow.com

 

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함