inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

스프링 시큐리티 OAuth2

OAuth 2.0 Token Endpoint 기능 및 특징

사용하지 않을 EndPoint를 Disable할 수 있는 방법이 있을까요?

489

finance

작성한 질문수 2

0

여기서 제가 사용하지 않는 정보들을 disable 하는 방법이 있나요??

{
    "issuer": "http://127.0.0.1:6080",
    "authorization_endpoint": "http://127.0.0.1:6080/oauth2/authorize",
    "device_authorization_endpoint": "http://127.0.0.1:6080/oauth2/device_authorization",
    "token_endpoint": "http://127.0.0.1:6080/oauth2/token",
    "token_endpoint_auth_methods_supported": [
        "client_secret_basic",
        "client_secret_post",
        "client_secret_jwt",
        "private_key_jwt"
    ],
    "jwks_uri": "http://127.0.0.1:6080/oauth2/jwks",
    "userinfo_endpoint": "http://127.0.0.1:6080/userinfo",
    "end_session_endpoint": "http://127.0.0.1:6080/connect/logout",
    "response_types_supported": [
        "code"
    ],
    "grant_types_supported": [
        "authorization_code",
        "client_credentials",
        "refresh_token",
        "urn:ietf:params:oauth:grant-type:device_code"
    ],
    "revocation_endpoint": "http://127.0.0.1:6080/oauth2/revoke",
    "revocation_endpoint_auth_methods_supported": [
        "client_secret_basic",
        "client_secret_post",
        "client_secret_jwt",
        "private_key_jwt"
    ],
    "introspection_endpoint": "http://127.0.0.1:6080/oauth2/introspect",
    "introspection_endpoint_auth_methods_supported": [
        "client_secret_basic",
        "client_secret_post",
        "client_secret_jwt",
        "private_key_jwt"
    ],
    "code_challenge_methods_supported": [
        "S256"
    ],
    "subject_types_supported": [
        "public"
    ],
    "id_token_signing_alg_values_supported": [
        "RS256"
    ],
    "scopes_supported": [
        "openid"
    ]
}

java spring spring-boot oauth

답변 2

0

정수원

음..

spring authorization server 에서 기본적으로 지원하는 기능을 비활성화 하는 부분에 대해서 구체적인 가이드를 저도 보지는 못했습니다.

다만 .well-known/openid-configuration 에 나와 있는 내용들은 인가서버의 각 기능들에 대한 지원여부를 안내하는 것인데 어떤 기능들을 사용하지 않기 위해서 해당 기능을 비활성화 할 수는 있지만 .well-known/openid-configuration 의 전체 내용에서 제외되는 것인지는 저도 확인하지 못했습니다.

이 부분은 조금 더 소스 차원에서 파악해야 할 것 같습니다.

0

인프런 AI 인턴

안녕하세요, 인프런 AI 인턴입니다.

사용하지 않는 OAuth 인증 서버의 엔드포인트를 비활성화하는 방법에 대해 알려드리겠습니다. Spring Boot 환경에서는 application.properties 또는 application.yml 설정 파일을 통해 필요한 엔드포인트만 활성화하도록 설정할 수 있습니다. 예를 들어, 애플리케이션에 필요하지 않은 엔드포인트를 비활성화하려면 해당 엔드포인트에 대한 프로퍼티를 false로 설정하면 됩니다.

다음은 몇 가지 예시입니다:

Properties 파일 예시:

spring.security.oauth2.authorizationserver.endpoint.authorization-uri.enabled=false
spring.security.oauth2.authorizationserver.endpoint.token-uri.enabled=false
spring.security.oauth2.authorizationserver.endpoint.introspection-uri.enabled=false
spring.security.oauth2.authorizationserver.endpoint.revocation-uri.enabled=false
# 여기에 더 많은 엔드포인트 설정을 추가할 수 있습니다.

Yaml 파일 예시:

spring:
  security:
    oauth2:
      authorizationserver:
        endpoint:
          authorization-uri:
            enabled: false
          token-uri:
            enabled: false
          introspection-uri:
            enabled: false
          revocation-uri:
            enabled: false
          # 여기에 더 많은 엔드포인트 설정을 추가할 수 있습니다.

이와 같이 설정을 추가함으로써 사용하지 않을 엔드포인트를 비활성화할 수 있습니다. 설정의 정확한 키는 사용하고 있는 Spring Boot의 버전과 구성에 따라 달라질 수 있습니다. 공식 문서를 참고하여 관련 프로퍼티를 확인해주시기 바랍니다.

관련된 자세한 내용을 참고하고자 하시면, Spring Boot Reference Documentation - Security Properties에서 추가적인 정보를 얻으실 수 있습니다.

authorization-server 라이브러리 질문이 있습니다.

0

75

1

loadUser 중 Missing attribute 'preferred_username' in attributes 에러 발생

0

76

2

JWT 조회 에 대한 질문

0

70

1

password grant 방식 에러 응답

0

88

3

FormLoginConfigure에서 생성하는 필터

0

77

2

현업에서 springboot를 3.5.5 를 사용해서 공부중인데...

0

282

2

Jdbc 관련 강의 및 깃헙 문의

0

77

1

OAuth2AuthorizedClient 이해 및 활용 강의 내용 질문

0

208

1

UserInfo 엔드포인트 요청 실습

0

74

1

RFC 문서에서의 AccessToken 발급 방식 궁금한점

0

150

1

강의자료.zip 를 다운로드 받았는데 압축이 풀리지 않습니다. 확인 부탁드려요

0

139

2

OIDC SSO 관련 질문 입니다.

0

130

1

AuthenticationEntryPoint 강의 누락 문의

0

122

1

cors설정방법

0

115

1

jwt decoder 토큰 검증 시 질문

0

221

1

클라이언트에서 userinfo 엔드포인트 호출 시 질문

0

184

2

JOSE 구성요소의 api에 관한 질문

0

140

2

스프링 부트 3버전으로 따라가시는 분들 참고하세요

1

529

1

CustomOAuth2AuthenticationFilter 구현 중 질문

0

145

2

AuthenticationManager 생성시점

0

117

1

FormLogin과 Oauth2Client 둘 중 사용하는 시점

0

127

1

postman userinfo 엔드포인트 질문

0

135

2

강의 수강신청하고 듣기 전입니다 질문있습니다.

0

113

1

인증 코드를 통해 발급 받은 토큰의 관리

0

198

1