강의

멘토링

로드맵

BEST
Programming

/

Back-end

Spring Security OAuth2

Spring Security OAuth2の基本概念から、APIの使い方と内部アーキテクチャを学びます。また、OAuth2 Client、OAuth2 Resource Server、Authorization Serverを統合して連携する方法を見て、独自の認可サーバーを構築し、これによりOAuth2サービスを実装する方法を学習します。

  • leaven
스프링
스프링시큐리티
스프링부트
자바
oauth
Java
Spring
Spring Boot
OAuth

学習した受講者のレビュー

こんなことが学べます

  • Spring Securityのコアコンセプトを理解する

  • OAuth 2.0 Authorizatioin Frameworkの基本

  • Java Cryptography Architectureの基礎

  • JWT基本/活用

  • Spring Security OAuth 2.0 Client理論/実践/活用

  • Spring Security OAuth 2.0 Resource Serverの理論/実践/活用

  • Spring Security OAuth 2.0 Authorization Server理論/実践/活用

強力な認証/認可処理のための最善の選択!
きちんと学ぶSpring Security OAuth2 🔐

Spring Security OAuth2?

Spring Security OAuth2は、OAuth 2.0 Authorization Framework標準技術仕様を採用し、OAuth2 Client、Resource Server、Authorization Serverのファミリーに分類してAPIを提供しています。

伝統的なセッションベースの認証方式の強力な代替

過去から現在に至るまで、レガシーシステムの伝統的な認証および認可方式でセッション/クッキーを活用した技術を多く使用しています。しかし、システムの規模が大きくなり、モバイル、タブレット、PC、IOTなど多様な機器の認証処理を行う上で、セッション共有の問題やサーバーリソースの負担、セキュリティの安全性、複雑なアーキテクチャ構成など、従来のセッション方式の認証構成が複数の問題と限界を持っていると認識されています。

特にモノリシックではなくMSA方式のインフラがますます傾向になっている現時点では、さらにセッションベースの認証方式が効率的な代替にならないことも事実です。

このため、上記の限界点と問題を解決するための方法で、セッションではなくトークン方式で認証/認可処理をする必要性が台頭し、OAuth、JWTなどの認証処理技術が誕生しました。これにより、グローバル企業であるグーグル、フェイスブック、フェッヘットでサービスするOAuthサービスを活用し、より簡潔で強力な認証/認可処理ができるようになりました。

本講義は、Spring Security OAuth2の知識に初めて接する入門者から基礎的な知識や使用経験はありますが、より深い知識の習得とSpring Security OAuth2の核心原理、内部構造、動作方式などを深く理解し、これを応用したい中~高級者の方々のために製作されました。


Spring Security OAuth
コア理解講義は

🔑

単純なAPIの使用法と文法だけを学習しません。認定技術の原理と構造に基づいて、コア技術の理解を高めます。

🎓

Spring Security OAuth2がどのような構造で動作するのか正確な流れを理解し、原理を把握します。

🧰

Spring Security OAuth2が提供する基本機能を拡張して、カスタマイズする能力を向上させることができます。

Spring Security OAuth2の技術をどのように実践的に活用できるかについての感覚を身につけます。

主な学習内容

💡このレッスンは、OAuth 2.0標準技術とそれに基づいたSpring Security OAuth2の重要な概念であるOAuth2 Client、Resource Server、Authorization Serverの3つの軸を中心に授業を行います。

1) OAuth 2.0 Authorization Framework

RFC標準技術であるOAuth 2.0認可フレームワークの全体的な概念と原理、構造などの内容を調べます。

Spring Security OAuth2の本格的な技術を学ぶ前に、OAuth 2.0の標準技術の基礎と基本的な理論をまず理解し、実習を通じて正確な概念を熟知することで、Spring Security OAuth2の内容を困難なく追いつくことができるようにします。

2) OAuth2 Client

OAuth 2.0のクライアントモジュールとして、クライアントが認可サーバーと連携できるさまざまなタイプの承認タイプと要求APIを紹介し、認可サーバーから発行されたトークンを使用してリソースサーバーへのアクセス制御をどのように実装するかについて学びます。

また、Google、Facebook、FagHet、Naver、Cacaoなど、OAuth 2.0 Authorization Serverサービスプロバイダとの連携を通じてソーシャルログイン機能を実装する方法を紹介します。認証プロトコルであるOpenID Connectを紹介し、認証処理のためのさまざまなオプション設定方法とフローを理解します。

3) OAuth2 Resource Server

ユーザーのリソースを保護しているサーバーとして、APIサーバーの役割を果たします。リソースサーバーがリソースを保護する方法を調べて、Access Tokenを含む要求に対してトークンを検証する方法と、権限スキームを制御する流れについて学びます。

OAuth2サービスプロバイダによって発行されたAccess TokenがJWT形式で生成されたトークンである場合は、Scope(範囲)を抽出する内容を調べ、リソースサーバーでAccess Tokenに含まれているScopeを分析して権限がどのように決定されるかを学習します。

4) OAuth2 Authorization Server

市場には、オープンソースを含むさまざまなAuthorization Serverの商用製品とサービスがあります。 Spring Security Development チームは Authorization Server フレームワーク プロジェクトを中断しましたが、多数の開発者の撤退が要求されたため、Authorization Server プロジェクトはまったく新しい設計に戻りました。

このレッスンでは、新しいアーキテクチャで再誕生したAuthorization Serverプロジェクトに基づいてレッスンを作成しました。 OAuth2 ClientとResource Serverとの連携を通じた認可サーバとしての機能の詳細を見て、自ら認可サーバを構築してサービスできる知識を持たせることに重点を置きました。

Authorization Server機能を処理する主なクラスを学び、カスタマイズする方法を学びます。また、OAuth 2.0標準エンドポイントの仕様を調べて、各エンドポイントに設定されたフィルタの構造と処理プロセスを学習します。

アーキテクチャ/フロー/原理を理解することができます。

Spring Frameworkのプロジェクトの中で、Spring Securityは、技術アーキテクチャ、動作原理、フロー理解などの内部ソースレベルの実装に関する全体的な理解が非常に重要です。

与えられたAPIを中心に使用しても予期しないエラーや問題に遭遇したら、Googleで検索して解決策を見つけます。しかし、Spring Security OAuth2に関する資料が多くなく、ほとんど同様のケースが繰り返されるレベルであるため、Spring Security OAuth2の内部構造と動作原理を正確に理解できない場合や分析できない場合は、サービス運営に多くの困難を経験します。

そのため、今回の講義は、さまざまな図式やフローとデバッグを通じた正確で詳細な説明を通じて、単純なAPIの使い方や機能例を越えて、Spring Security OAuth2の構造と流れを完全に分析し理解することで、どんな状況でも柔軟な対処が可能な知識を備えることに重点を置いています。これは、本講師が開設した講義のパターンと共通の特徴といえる。


講義の構成と詳細なカリキュラム

Part 1. Spring Bootベースで開発するSpring Security

Spring Securityの重要な概念である認証と認可の2つの軸を中心に講義が行われます。春のセキュリティの基礎と基本は非常に重要なので、Part。 1では、Spring Securityを構成する重要な構造と認証、および認証に関連する主な項目の正確な概念を理解し、例と実践を通じて実践的な開発に役立つように構成しました。

Part. 1 を受講すると、Spring Security の全体的な Fundamentals を確実に確立するとともに、さらにセキュリティシステム構築時のセキュリティ基本構造を拡張し、応用可能なレベルの能力を養うことになります。

Part 2. Spring Boot ベースで開発する Spring Security OAuth2

OAuth2の基本的な概念と流れの正確な理解とSpring Security OAuth2のコアモジュールであるOAuth2 Client、Resource Server、Authorization Serverの技術について学びます。 Part. 2をスムーズに学習するためにPart。 1の基本内容の理解が必須であるため、必ず事前に知識を習得してから受講する必要があります。

Part. 2では、OAuth2に関するさまざまな技術が複合的に構成されているため、膨大なOAuth2関連の概念を十分に理解し、これに基づいてクライアントアプリ、リソースサーバー、認可サーバー相互の連携過程を詳細かつ深く分析し、検討します。

Spring Security Fundamentals

Spring Securityの重要な基礎を見てください。初期化プロセスの詳細と原理を学び、HttpBasic、Corsなどの要素を扱います。

OAuth 2.0 Authorization Framework

OAuth 2.0 標準技術の詳細仕様について学習します。 OAuth 2.0で表現されているさまざまな用語をまず理解し、権限付与フローのタイプに関する概念整理とkeycloakオープンソースを活用して認可フレームワークの全体的な流れを理解します。

OAuth 2.0 Client - oauth2Login()

クライアントアプリの機能を自動化し、権限付与フローのタイプであるAuthorization Code方式で認可サーバーとの連動方法を学習し、ユーザー承認と承認からAccess Tokenを受け取り、認証/認可処理に至るまでの全過程を調べ、内部構造について学習することになります。

OAuth 2.0 Client - oauth2Client()

oauth2Login() API が提供する権限付与フローのタイプである Authorization Code の他に、Resource Owner Password と Client Credentials タイプで認可サーバーと連動する方法を見て、 DefaultOAuth2AuthorizedClientManager、@RegisteredOAuth2AuthorizedClient の使い方を知ります。

OAuth 2.0 Client - OAuth 2.0 Social Login

OAuth2サービスプロバイダーとして、Google、Facebook、FagHet、Naver、Cacaoなどがありますが、デュアルGoogle、Naver、KeyClockを使用してログイン認証する方法と認証後の後続処理の実装方法を見てください。

OAuth 2.0 Resource Server API - jwt()

リソースサーバーの構成方法とAccess Token要求を処理するJwtDecoderの機能を調べて、トークン検証の成功後に生成される認証関連オブジェクトの構造と使用方法を学習します。また、Access Tokenの検証に使用されるMAC&RSAアルゴリズムの仕組みとは何ですか?どの処理手順によって検証が行われるのかを調べます。

OAuth 2.0 Resource Server - リソースサーバー権限の実装

Access Token 要求を処理するフィルタと、JwtDecoder によって抽出された Scope を権限に変換し、変換された権限でリソースのアクセス可否を制御する方法について学習します。

OAuth 2.0 Resource Server - opaque()

リモートトークンチェックプロセスとして、アクセストークンを有効にするかどうかを認可サーバーと直接通信する方法を学びます。

Spring Authorization Server - 主要ドメインクラス

認可サーバーを構成する主要ドメインクラスの種類と概念、役割などを学習し、これらのクラスがSpring MVCでどのように参照および利用できるかを学習します。

Spring Authorization Server - エンドポイントプロトコル

認可サーバーの重要な機能であるさまざまなタイプのエンドポイントプロトコルについて学びます。承認要求を開始したエンドポイントからユーザー情報を要求するエンドポイントまでの全体のプロセスを図式とフローで詳しく見ていきます。

OAuth 2.0 Client + Resource Server + Authorization Serverの連携

Spring Securityが提供する各OAuth2のモジュールを連携および連携する方法を学び、それを使用してOAuth2サービスプロバイダとして機能する具体的な項目を例に示します。


この講義を作った
知識共有者を紹介します。

浄水源(leaven)

  • 現職のJava開発者
  • SI/SM/ソリューション/Mobile/Front&Back-end のさまざまなプロジェクト体験
  • Architect/PM/PL として役割を果たす
  • Github

一緒に見れば良い講義

こんな方に
おすすめです

学習対象は
誰でしょう?

  • OAuth 2.0の基礎と概念を確実に理解したい方

  • Spring Security OAuth2に関連する全体的な基礎と原則を正確に理解したい人

  • Spring Security OAuth 2.0を活用して認証/認可機能を実装したい人

  • OAuth 2.0 の認可サーバーを構築してサービスしたい方

前提知識、
必要でしょうか?

  • Spring Security Basic(必須)、Spring Boot& MVC、DB

  • Lombok

  • MySQL

こんにちは
です。

9,902

受講生

327

受講レビュー

1,210

回答

4.9

講座評価

5

講座

다양한 프로젝트에서 웹/모바일/솔루션 제품 개발과 관련된 업무를 진행해 오고 있으며 분석/설계/개발 Role 을 맡아 오고 있습니다.

공공기간, 교육프로그램, 기업 프로젝트, 쇼핑몰 등의 웹 개발 및 솔루션 프로그램, 프레임워크, 오픈소스 연동 등의 아키텍처 설계 및 구조적 고도화 개선 등을 해 오고 있으며 개발, PL 등의 역할을 맡았습니다.

다양한 Open Source 와 여러 기술적인 경험들을 통해 웹의 전반적인 기술 흐름들을 익혔으며 개발 경험이 거듭될 수록 요구사항의 기능 구현에만 거치지 않고 좀 더 OOP 적인 구조의 소프트웨어로서 안전성과 성능을 고려한 아키텍처링과 튜닝의 기술들을 접목시켜 지속적으로 더 훌륭한 소프트웨어를 완성하기 위한 연구와 개발 실무를 책임감 있게 맡아 오고 있습니다.

 

カリキュラム

全体

109件 ∙ (44時間 31分)

講座資料(こうぎしりょう):

授業資料
講座掲載日: 
最終更新日: 

受講レビュー

全体

70件

4.9

70件の受講レビュー

  • progammer님의 프로필 이미지
    progammer

    受講レビュー 8

    平均評価 5.0

    5

    100% 受講後に作成

    Hello. I listened to the lecture on security and OAUTH2 well. I can feel that the instructor prepared the lecture a lot and is passionate. And he is also a very knowledgeable person. However, I think it would be good if the teaching method was improved a bit. 1. I feel like the explanation is a bit rushed. This is a bit awkward, but I think that calmly leading the lecture can reduce awkwardness. Sometimes, I skipped over the words without knowing what they were because of the pronunciation. 2. The lecture structure is difficult for students to learn proactively. Basically, you have no choice but to follow along. In such a situation, if the instructor and students are not properly synchronized, and the instructor and the students have different contexts, the students become very stressed. I sometimes see emotional posts expressing complaints about this in the community. I understand the feelings a little. This is because most of the students who purchase the lecture start taking the lecture with high expectations. From the instructor's perspective, something that is so obvious (the more years you have and the more knowledge you have, the stronger this tendency becomes), but from the student's perspective, it is often not the case at all. 3. For example, it was good to practice authorization requests with Postman and then move to Spring. Well, since the speed of the speech is fast without any special points, it feels like important stories are flowing by. For example, when requesting authorization for the first time, when you press the login button, the client requests /oauth2/authorization, and when the client requests a temporary code from the authorization server, it goes down to /oauth2/authorize, but since this just happens, I couldn't recognize it for a while. It was quite confusing and confusing for a long time. So I got used to it by debugging it one by one. I think it may be because the instructor is so familiar with it, but when you are teaching, you say, "This URL may be a bit confusing. The initial login is /oauth2/authorization, and the code request is /oauth2/authorize. In reality, the authorization process starts when the client requests a code, so authorize means granting permission, so /oauth2/authorize is the URL for requesting a code. In this context, it would be good to remember it." If you explain it once, it will be a very helpful point for students. 4. When proceeding with the next chapter lecture, there are many cases where you proceed with new code (from the beginning). I think it is the same reason why someone asked to maintain the code in the course review. It is definitely convenient because Younghan leaves all the code after the first lecture. The process is carried out without editing, so just watching and following it together can be a learning experience, and it is advantageous because students and instructors can be on the same page. You can start from a new branch every time like Suwon Instructor, but I think it would have been good if there had been just one guide at the beginning of the lecture. Each clip or section is managed as a branch unit, so if possible, I ask the students to do the same. There may be some beginners in Git. You only need to show it once. Since you are not going to merge PRs into master, if you just show them how to create a new branch, the students will be on the same page as you. 5. Lastly, I think it would have been better to explain Filter -> Manager -> Provider -> before the actual lecture started. They mentioned it in the latter half of the lecture. I realized that the pattern was set while listening to the lecture, but it would have been easier if I had known the pattern at the beginning. It may be less so in other lectures, but Security has so many classes and the depth is so deep that it is a bit confusing to follow the lecture, and I get lost even while following the lecture. Of course, the instructor explains the flow with class diagrams at the beginning, but when the screen is filled with classes with long names that I have never seen before... the flow is not immediately apparent. Of course it helps, but I still don't think I'm on the same page as the students. 6. Oh, and you clearly said that you would save it in the database during the final practice instead of saving it in memory, but I was a little disappointed that you forgot and ended the practice with in-memory. This is a small thing, but it would have been better if you had named the resource server as ResourceServerPhoto instead of 1, 2 during the final practice. When I was taking a C++ class in the past, the instructor said, "It might be boring or not fun because it's the same example every time (the example was written by putting the name, age, and a few other pieces of information in the Person class), but since you have a lot to learn in the future, the hurdle for newness in this area should be low so that it's easy to learn." I remember that. I like what Einstein said, that when explaining, you should make it so that even a grandmother without relevant knowledge can understand, so I wrote down a lot of thoughts about teaching methods. Nevertheless, students, Security and this lecture are great guides for understanding the in-depth inside of the security framework. I now know almost everything about where and how to set breakpoints when debugging. If the breakpoints don't go where I thought they would, I can figure out the right flow by looking around more. Security and OAUTH2 are definitely not easy lectures, but I think they are lectures that you can gain a lot from if you put in the effort. I'm learning well. Thank you.

    • leaven
      知識共有者

      I am so touched that you have given me such a thorough lecture evaluation. And I am so grateful for your sincere advice. I will do my best to refer to the items you mentioned when creating the lecture. However, I would appreciate it if you could be generous and understand that there may be shortcomings in various ways, even though I said that habits are scary. Regardless of career or years of experience, I always try to look at myself with a humble attitude, thinking that there are many more excellent developers in the world than you think. Although I am an instructor at Inferun, I do not think that instructors are in a position to teach because they are better or more capable than their students. Of course, it is natural that instructors should try to provide the best quality to students, but it is not necessarily because they have more outstanding skills or abilities, but because there are people who need the knowledge that instructors know, and I always prepare the lecture with the thought that there will be developers among the students who are better than the instructor. I still do not have many of the requirements of a professional instructor, so there are many areas that are lacking or need improvement, so I always think about them and make efforts to improve them when creating the lecture. Once again, thank you for your sincere advice and support. I will always strive to be an instructor who prioritizes my students so that they will never be disappointed, rather than prioritizing personal interests. Thank you.

  • ghkvud22405님의 프로필 이미지
    ghkvud22405

    受講レビュー 1

    平均評価 5.0

    5

    100% 受講後に作成

    It is definitely a really good lecture. I am listening to everything from Spring Batch > Security > OAuth2. Since everyone else has mentioned the advantages, I would like to tell you about my suggestions(?) or regrets. I thought it would be helpful to check all the source code levels of Spring in debugging mode. Of course, the instructor checks by setting breakpoints in advance, but it doesn't seem easy to follow the screen that passes by quickly. Of course, if you say that you have to know everything to use a certain technology!!, I have nothing to say, but I think the lecture would be more compact and cost-effective if the instructor explains the theory part and ends by quoting some source code. It is definitely a good lecture, but it takes a lot of time to learn everything, including the debugging process, and if you take this lecture to use it in practice right away, you might think that you should postpone applying it to practice. I am leaving a review in the hope that the instructor will continue to make better lectures in the future.

    • leaven
      知識共有者

      Yes, thank you for your sincere evaluation^^ As you said, showing the source level processing process using debugging in the lecture may not be a necessary element in some sense. The lecture time is relatively longer, and there are also things that are not easy to understand even after seeing the debugging process once. Nevertheless, the reason for including debugging elements in the lecture is to help you clearly understand the internal processing of the framework or library. Of course, you do not need to know the internal processes and flow of all modules and APIs, and you cannot know them. From my perspective, if it is determined that knowing the internal processing process is important when implementing a function, I explain the overall processing process through debugging. Debugging does not mean that it ends with debugging itself. The purpose is to develop the ability to extend or apply the API as I want, beyond simply using it, by clearly understanding the purpose and principles of the design of the API through debugging. Although we did not design or create Spring Security directly, it is a good way to indirectly participate in the design of the core technology through debugging and partially experience the principles of implementation. If this process is repeated and accumulated, not only the basic use of the API but also a deep understanding of the technology will be possible, and complex custom applications will be possible, and you will be able to respond quickly when exceptions or issues occur. However, if you look too closely at the source level, you will miss the whole picture. Because it can be done, you should take the method of analyzing and adjusting it according to your level and understanding ability. I will continue to think about how to incorporate debugging utilization at an appropriate level into the lecture through speed adjustment and develop it. Thank you again for your valuable evaluation^^

  • dhtmdgus21343562님의 프로필 이미지
    dhtmdgus21343562

    受講レビュー 3

    平均評価 5.0

    5

    40% 受講後に作成

    It explains it in great detail. It shows the debugging process, so it's much more memorable. I think I need to do this much to be able to say I've used OAuth 2.0.

    • leaven
      知識共有者

      If you keep doing it consistently, there will come a moment when even the most difficult things will be solved smoothly. I hope you overcome those hardships well. Thank you for your valuable feedback.^^

  • kingbj04292512님의 프로필 이미지
    kingbj04292512

    受講レビュー 30

    平均評価 5.0

    5

    36% 受講後に作成

    Thank you for the great lecture :) I was trying to listen to Udemy because there were no proper security-related lectures in Korean, and it seems like the perfect lecture came out at the perfect time!! I've only listened to about 1/5 of it so far.. but it's a really informative lecture!! I'm very satisfied :)

    • leaven
      知識共有者

      This is my first class review^^ Thank you~!! I hope you finish the class even though the lecture time is long.

  • sorayeon님의 프로필 이미지
    sorayeon

    受講レビュー 81

    平均評価 5.0

    5

    100% 受講後に作成

    I am glad that the long-awaited lecture has been released, so I am happily registering for the class and studying hard. I am taking the class while thinking about the understanding of the OAuth2 standard and how Spring Security implemented the code, and it is very helpful. It is actually a little difficult, but I hope that I can persevere to the end and grow personally. Thank you so much for the great lecture. Stay healthy^^

    • leaven
      知識共有者

      Yes, thank you^^ As you said, if you learn the technology of Spring Security OAuth2 that complies with the OAuth2.0 standard specification, you will acquire the concept of OAuth2.0 almost like a professional before you know it. This is because the technical perfection of Spring Security's OAuth2.0 is that high. The overall technical difficulty may not be easy, but I hope you complete it to the end and have good results~~

期間限定セール

¥70

24%

¥14,205

leavenの他の講座

知識共有者の他の講座を見てみましょう!

似ている講座

同じ分野の他の講座を見てみましょう!