Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IDLE-64] 사업자 등록번호 조회 API #42

Merged
merged 1 commit into from
Jul 8, 2024
Merged

Conversation

wonjunYou
Copy link
Contributor

@wonjunYou wonjunYou commented Jul 8, 2024

Background

센터 관리자 가입 및 센터 정보를 등록하는 경우, 사업자 등록번호를 함께 받아야 합니다.

센터 관리자 회원가입 flow는 아래와 같습니다.

  1. 센터 관리자 가입 희망자에 대한 전화번호 인증
  2. 기본 정보 및 사업자등록번호 기입 및 API를 통한 검증
  3. 시스템 담당자가 확인 후, 해당 API를 이용해 상호명 및 전화번호 검색
  4. 해당 시설에 연락하여 확인 후 가입 승인

즉, 위 2, 3번 과정에서 해당 사업자 등록번호 조회 API가 필요합니다.

또한, 사업자 등록번호를 통해 사칭하려는 악의적인 사용자를 blocking할 수 있습니다.

위에 언급한 3번 플로우에서는 사업자 등록번호 API를 통해 조회한 상호명과 전화번호를 이용해 확인 연락을 시도합니다.

즉, 기존에 악의적인 사용자가 입력한 본인의 전화번호가 아닌 실제 센터에 연락 후 검증하여 신뢰성을 보장합니다.

Goals & Non-Goals

Goals

  • 입력한 사업자 등록 번호의 유효성을 검증해야 합니다.
  • 해당 사업자 등록번호를 통해 회사명을 조회할 수 있어야 합니다.

External API Description

비즈노 API


사용 이유

무료 PLAN 사용 가능 횟수 정책

  • 1일 request 200건
  • 출력정보 : 사업자등록번호, 상호명, 사업자상태, 과세유형

Methodology & Design(Proposal)

API

  • API
    • [🆕 Sample] POST /api/v1/auth/center/authentication/{business-registration-number}
      • request

        • method & path: POST /api/v1/auth/center/authentication/{business-registration-number}

        • body

          {
            "businessRegistrationNumber": "string", (required & not null) (000-00-00000의 형식을 따릅니다.)
          }
      • response

        • 정상 처리된 경우

          • status code: 204 No Content

          • body

            {
              "businessRegistrationNumber": "String",
              "companyName": "String",
            }
        • 잘못된 사업자 등록번호를 입력하는 경우

          • status code: 400 Bad Request
        • 사업자 등록번호가 없거나, 조회가 되지 않는 경우

          • status code: 400 Bad Request

3. 🤔 이슈 공유

사업자등록번호 조회 외부 API 통신을 위해 OpenFeign Client 의존성을 추가하니, SonarCloud에서 아래와 같은 취약점 이슈가 발생하였습니다.

Warning:(8, 20)  Provides transitive vulnerable dependency maven:org.springframework:spring-web:6.1.4 CVE-2024-22259 8.1 Vulnerability with High severity found  Results powered by Checkmarx(c) 

https://spring.io/security/cve-2024-22259
https://devhub.checkmarx.com/cve-details/CVE-2024-22259/

위 두 레퍼런스를 확인해 본 결과, Spring Core 6.1.0 - 6.1.4 버전에서 발생하는 이슈이며 6.1.5 버전부터 해결되었다는 것을 파악하였습니다.

따라서 해당 spring 버전과 호환되는 버전에 맞게, spring boot 버전을 3.2.3 > 3.2.4로 변경하였습니다.

@wonjunYou wonjunYou added the ✨기능 기능 개발 및 구현 label Jul 8, 2024
@wonjunYou wonjunYou self-assigned this Jul 8, 2024
Copy link

sonarqubecloud bot commented Jul 8, 2024

@wonjunYou wonjunYou merged commit 56923b7 into develop Jul 8, 2024
3 checks passed
@wonjunYou wonjunYou deleted the feat/IDLE-64 branch July 8, 2024 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨기능 기능 개발 및 구현
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant