Blog all

  • OAuth 2.0 Basics – 2. Roles

    우리가 일정관리 웹 애플리케이션(Xscheduler)을 개발하는 팀이라고 가정해봅시다. 이 애플리케이션은 사용자가 입력한 일정을 자동으로 구글 캘린더에 추가하는 핵심 기능을 제공합니다. Xscheduler가 사용자의 구글 캘린더에 지속적으로 일정을 추가하려면 OAuth 인증을 통해 적절한 권한을 획득해야 합니다.

    OAuth 인증 과정에는 세 가지 주요 주체가 관여합니다: 사용자(User), 웹 애플리케이션(Xscheduler), 그리고 구글입니다. OAuth에서는 이들을 각각 다른 용어로 지칭합니다.

    먼저 사용자는 Resource Owner라고 불립니다. 이는 웹 애플리케이션이 접근하려는 리소스(구글의 캘린더)의 실제 소유자가 사용자이기 때문입니다. 구글은 Resource Server라고 불리는데, 이는 해당 리소스를 실제로 저장하고 관리하는 서버이기 때문입니다.

    마지막으로 웹 애플리케이션(Xscheduler)은 해당 리소스를 사용하는 고객이기 때문에(실제로 사용하는 것은 사용자가 아니라, 웹 애플리케이션 입니다) Client라고 부릅니다.

    따라서

    • 사용자 – Resource Owner(R.O)
    • 웹 애플리케이션 – Client(C)
    • 구글 서버 – Resource Server(R.S)

    의 세가지의 주체가 있습니다.

    OAuth에서 이 각 주체는 role(역할)이라고 부릅니다.

    (실제로 OAuth 인증에 관여하는 주체는 Authorization Server를 포함하여 4개입니다. Authorization Server는 OAuth 인증 과정에서 인증과 권한 부여를 담당하는 서버입니다. 많은 경우 Authorization Server와 Resource Server가 같은 회사에서 운영되거나 통합되어 있어서 하나로 묶어서 설명하는 경우가 많습니다. 구글도 마찬가지로 두 서버 모두 구글에서 운영하므로, 편의상 “구글”이라고 통칭하여 설명하는 것입니다.)

  • OAuth 2.0 Basics – 1. Introduction

    현재 수많은 고품질 웹 애플리케이션이 존재하는 시대에서 OAuth를 통한 다른 웹 애플리케이션 연동은 거의 필수적인 요소가 되었습니다. 따라서 OAuth를 활용하는 개발자와 정보보안 담당자들에게는 OAuth에 대한 심도 있는 이해가 매우 중요해졌습니다.

    하지만 OAuth는 다소 높은 학습 곡선을 가지고 있습니다. 인증 과정에 참여하는 여러 주체들과 이들 간의 복잡한 상호작용 흐름, 그리고 이 과정에서 발생할 수 있는 다양한 보안 취약점들이 존재하기 때문입니다. 또한 JWT, OpenID Connect(OIDC), PKCE와 같은 다른 표준들과 함께 사용되는 경우가 많아, OAuth를 올바르게 개발하고 운영하는 것은 결코 쉬운 일이 아닙니다.

    OAuth를 제대로 이해하기 위해서는 먼저 OAuth 인증 흐름에 참여하는 각 주체들이 어떤 방식으로 인증 데이터를 주고받는지를 파악해야 합니다.

  • OAuth 2.0: Benefits and Security Considerations

    서비스 연동 시대의 필수 기술

    현대 웹 생태계에서는 수많은 전문화된 웹 애플리케이션들이 존재합니다. 따라서 새로운 서비스를 개발할 때 모든 기능을 처음부터 구현하기보다는, 기존의 검증된 서비스들을 연동하여 활용하는 것이 효율적이고 권장되는 방식이 되었습니다. 이제는 진정한 ‘서비스 연동의 시대’라고 할 수 있습니다.

    OAuth의 핵심 가치

    1. 편리한 인증 경험

    OAuth가 없다면 써드파티 애플리케이션을 사용할 때마다 매번 사용자 인증 정보(아이디, 패스워드)를 입력해야 합니다. OAuth는 최초 한 번의 인증만으로 장기간 동안 지속적인 재인증 없이 써드파티 서비스를 이용할 수 있게 해줍니다.

    2. 보안성 향상

    사용자는 자신의 실제 로그인 정보를 써드파티 애플리케이션에 직접 제공하지 않습니다. 대신 OAuth를 통해 제한된 권한만을 안전하게 위임할 수 있습니다.

    실제 사용 예시

    일정 관리 애플리케이션이 구글 캘린더와 연동하는 경우를 생각해보겠습니다:

    1. 기존 방식: 사용자가 일정 관리 앱에 구글 아이디와 패스워드를 직접 입력
      • 보안 위험성 높음
      • 써드파티 앱이 구글 계정에 대한 모든 권한을 가지게 됨
    2. OAuth 방식: 구글의 인증 서버를 통한 안전한 권한 위임
      • 최초 한 번의 인증 후, 일정 관리 앱이 지속적으로 구글 캘린더에 접근 가능
      • 사용자의 실제 로그인 정보는 노출되지 않음
      • 필요한 권한(캘린더 읽기/쓰기)만 제한적으로 부여

    OAuth의 중요성과 주의사항

    OAuth는 현재 대부분의 웹 애플리케이션에서 필수불가결한 기술로 자리잡았습니다. 하지만 동시에 올바르게 구현되지 않으면 심각한 보안 취약점을 야기할 수 있는 기술이기도 합니다.

    주요 보안 위험

    • 부적절한 구현으로 인한 계정 탈취 위험
    • 권한 범위(scope) 관리 미흡
    • 토큰 관리 및 갱신 과정에서의 보안 허점
    • CSRF, 리다이렉션 공격 등의 취약점

    따라서 OAuth를 도입할 때는 보안 모범 사례를 철저히 준수하고, 정기적인 보안 점검을 통해 안전성을 확보하는 것이 중요합니다.

  • Before diving into BFLA, let’s clarify what “function” actually means in BFLA

    BFLA stands for Broken Function Level Authorization.

    Simply put, BFLA involves performing “actions” that go beyond a user’s authorized permissions.

    In typical API usage, the term “function” usually refers to an API endpoint with all HTTP methods including GET. However, in the context of BFLA, it carries a slightly different meaning — referring to privileged operations or functionalities that require proper authorization. With the GET method, requests are used only to read data, not to modify it. Thus, it does not align with the definition of a “function” as described in BFLA.

    “Actions” in this context typically involve HTTP methods other than GET, such as POST, PUT, or DELETE, since these methods are used to modify data rather than just read it.

    Similarly, in BFLA, a “Function” often represents an operation that changes system state or performs a sensitive task — not just a simple data retrieval.

    However, it’s important to note that GET requests can still be part of a BFLA vulnerability — for example, if a user without admin privileges is able to access sensitive admin-only information via a GET request. Even though the request doesn’t change data, the ability to retrieve unauthorized information still represents a failure in function-level authorization.

    Here are two common methods for testing BFLA vulnerabilities:

    1. Try different HTTP methods (e.g., changing GET to POST, or GET to DELETE)
    2. Manipulate parameters within the request (e.g., DELETE /api/users/999 – An unauthorized user attempts to perform a delete operation on user 999.)

  • Essential Burp Suite Tips for Beginners #1 – Scope

    Burp Suite can be overwhelming at first — the endless HTTP requests and the sheer number of tabs and settings often confuse beginners. I was no exception.

    Using scope can be especially helpful if you have multiple tabs open in your browser. It allows you to browse other websites while targeting a specific one in Burp Suite.

    In the above example, you can see there are tons of requests. You probably don’t want unnecessary ones getting in your way.

    If you’re visiting multiple websites but only targeting a few, you can define your scope in Burp Suite under the “Target” tab. You can also set the scope by right-clicking on a request and selecting “Add to scope.”

    Now that you’ve set the scope in Burp Suite, other webpages are no longer logged in the history. You’re free to Google, use ChatGPT, or browse the web without cluttering your logs

  • Why Cybersecurity Is a Promising Career Path?

    Cybersecurity offers an excellent career outlook with strong growth potential and job security. According to the U.S. Bureau of Labor Statistics, Information Security Analysts ranked as the 5th fastest-growing occupation from 2023 to 2033.

    Supporting Reasons

    1. Increasing cyber threats – As digital transformation accelerates, cyberattacks are becoming more frequent and sophisticated, creating greater demand for security professionals.
    2. Slow AI replacement – Cybersecurity roles require human judgment, creativity, and strategic thinking that AI cannot easily replicate, making these positions more resistant to automation.
    3. High demand across industries – Every sector from healthcare to finance to government needs cybersecurity expertise, creating diverse opportunities.
    4. Stricter regulations – New compliance requirements and data protection laws are driving organizations to invest more heavily in cybersecurity talent.

    Consider This Opportunity

    With all these positive factors in mind, cybersecurity education could be worth exploring. It might be an interesting path to consider – a field that not only offers strong job prospects but also provides the satisfaction of doing meaningful work that helps protect organizations from digital threats.

    Reference: https://www.bls.gov/ooh/fastest-growing.htm

  • What is an API?

    API stands for Application Programming Interface, which refers to a programming interface (intermediary) that allows two applications to communicate with each other.

    In the case of Web APIs, these two applications refer to the frontend and backend of a web application. The frontend is the interface part of the website that users see, enabling interaction with the server through login windows, order buttons, text input fields, and more. The backend, on the other hand, handles the database that stores data and the business logic that processes requests received from the frontend.

    Let’s take searching for hamburger restaurants on Google as an example. When you type “hamburger restaurants” in the search box and press enter, the browser requests the necessary information from Google’s server through an API. The server receives this API request, processes it, and then sends the search result data back to the user as a response. This is a typical example of API communication.

    Simply put, an API is a tool that websites use to exchange data with servers.