Inflearn brand logo image
Inflearn brand logo image
Inflearn brand logo image
BEST
Programming

/

Back-end

春のセキュリティ完全征服[6.xリビジョン]

Spring Security 6.x最新版で製作された改訂版講義で初級から中級・高級に至るまで、Spring Securityの基本概念からAPIの使い方と内部アーキテクチャを学習することになり、これを元に本番プロジェクトを完成させていくことでSpring Securityの認証と認可に関連する重要な技術を身につけます。

  • leaven
백엔드개발자
스프링시큐리티
개정판
업데이트
Spring
Spring Boot
Spring Security
security
web-security

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

こんなことが学べます

  • Spring Securityの基本APIと関連するFilter完全征服

  • Spring Securityの内部アーキテクチャとオブジェクト間の役割と関係の流れを理解する

  • Spring Securityの認証原理と内部動作方法の理解

  • スプリングセキュリティの認可原理と内部動作方式の理解

  • Spring SecurityとSpring MVCの連携方法を理解する

  • Spring Securityを活用した実務レベルのセキュリティシステム構築のノウハウ学習

Spring Security 6.x最新バージョン完全改訂版!

Spring Security 6.xは、以前のバージョンと比較してかなりの変更と改善示しています。

これにより、カリキュラム項目も既存のスプリングセキュリティ講座と比較して変更または新しく追加された項目が多くなりました。
だから今回のSpring Security完全征服講座は、Spring Security 6.xバージョンの主な変更点と新機能を詳細に分析し、掘り下げることで受講生の皆さんが本講座の理論と実習を通じて各機能とAPIを確実に身につけるなら役に立つ


入門者、小・中・高級者全員のための講義

本講座はスプリングセキュリティに初めて接する入門者から基礎的な知識や使用経験はありますが、より深い知識の習得とスプリングセキュリティの核心原理、内部構造、動作方式などを深く理解し、これを応用したい中高級者のために製作しました。

主な学習内容💡

本講義は、Spring Securityのための鍵となるテーマであり、大きく認証、認可、悪用保護、統合、実戦プロジェクトの5つの軸を中心に授業を行います。

1. 認証(Authentication)

Spring Security 6.xは、ユーザー認証のためのフォームベース認証、基本認証、記憶認証など、さまざまな方法を提供します。この認証方式は、ユーザーがシステムに自分の身元を証明するための効果的な手段を提供します。認証プロセスは、ユーザーが提供した資格情報を検証してユーザーの身元を確認します。これはAuthenticationManagerを中心に行われます。認証が成功した後、ユーザーの認証情報はSecurityContextHolder内のSecurityContextに格納され、アプリケーション全体でユーザーの認証状態を参照するために使用されます。 Spring Securityは、セッション管理を通じてユーザーのセッション情報を管理し、同時セッション制御、セッションポリシー設定、セッションの有効期限、セッション固定保護などの機能を提供することで、ユーザーのセッションを安全に保護します。認証プロセスで発生する可能性のあるさまざまな例外状況も適切に処理できるように設計されています。


2. 認可 (Authorization)

Spring Securityの認可プロセスは、ユーザーが認証を完了した後に特定のリソースにアクセスできるかどうかを決定します。 Spring Security 6.xでは、 HttpSecurityを使用してURLベースまたはメソッドベースの認可処理を設定でき、 AuthorizationManagerを含む新しい認可アーキテクチャを使用して、よりきめ細かく柔軟な認可ポリシーを実装できます。これにより、開発者はアプリケーションのセキュリティ要件に合わせてアクセス制御ポリシーを定義でき、ユーザーの要求に対する権限を評価してリソースへのアクセスを許可または拒否できます。認可処理はアプリケーションのセキュリティを強化するために重要な役割を果たし、機密情報とリソースを保護するために重要です。

3. 悪用保護 ( Protection Against Exploits )

Spring Security 6.xは、CORS、CSRF保護、SameSite Cookie設定などの機能を提供し、さまざまなセキュリティ脅威からアプリケーションを保護します。これらのセキュリティ機能は、アプリケーションをクロスサイトスクリプティング、クロスサイトリクエスト偽造攻撃から保護し、ユーザーのデータとセッションを安全に保ちます。 CORS設定により、開発者は他のドメインのリソースに安全にアクセスできるようになり、CSRF保護は悪意のあるWebサイトがユーザーに代わって要求を送信するのを防ぎます。 SameSite Cookieプロパティを設定することで、ブラウザがCookieを送信する方法を制御し、追加のセキュリティ層を提供します。

4. 統合 (Integrations)

Spring Security 6.xバージョンは、サーブレット環境、Spring MVC、およびSpring MVC非同期処理との緊密な統合を提供します。この統合により、開発者はSpringベースのアプリケーションにセキュリティ機能を簡単に追加および設定できます。サーブレット統合により、Spring SecurityはHTTP要求と応答のセキュリティ処理を管理し、Spring MVC統合はコントローラとサービス層できめ細かいセキュリティポリシーを可能にします。非同期処理との統合は、Spring WebFluxを使用するレスポンシブプログラミングモデルのセキュリティ要件を満たし、開発者が非同期およびストリームベースのアプリケーションを構築するときにセキュリティを効果的に管理できるようにします。これらの統合機能は、Spring SecurityをさまざまなSpringアプリケーションアーキテクチャとシームレスに連携させ、セキュリティ実装の複雑さを軽減します。

5. 実戦プロジェクト (Practical Projects)

Spring Security 6.xバージョンは、本番プロジェクトでの会員認証システム、会員管理システムの実装において重要な役割を果たします。これにより、開発者は、ユーザー認証、権限管理、リソースアクセス制御などの機能を効果的に実装できます。会員認証システムは、アプリケーションのセキュリティを強化するための基盤を提供し、会員管理システムは、ユーザー情報の安全な保存、照会、修正、削除などを管理します。権限管理を通じてユーザーごとに異なるアクセス権を割り当て、リソース管理はアプリケーション内の機密情報と機能へのアクセスを制御します。さらに、Spring SecurityはMapとデータベースを使用した動的許可設定をサポートし、実行時に権限を変更または更新できる柔軟性を提供します。これらの実践プロジェクトでの実装は、Spring Securityの強力な機能と柔軟性を示し、開発者がセキュリティ要件を満たすために不可欠なツールです。

会員認証システム

会員管理システム

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

セクション1.初期化プロセスの理解

  • Spring Securityが起動して発生する初期化プロセスを深く扱います。

  • Spring Securityの初期化時に設定されるBean、全体構造とフロー、フィルタチェーン構成などを含め、Spring Securityがどのように動作する準備をするかを詳しく説明します。このプロセスを理解することで、開発者はSpring Securityの基本的な動作原理を理解し、必要なセキュリティ設定を効果的に適用できます。

セクション2.認証プロセス

  • さまざまなユーザー認証方法を学ぶ

  • フォームベース認証、基本認証(Basic Authentication)、「記憶(remember-me)」認証など、さまざまな認証メカニズムを詳細に紹介し、アプリケーションのニーズに最も適した認証方式を選択して実装する方法を学びます。

セクション 3.認証アーキテクチャ

  • このセクションでは、Spring Securityの認証処理構造と原理に焦点を当てます。

  • 認証プロセスにおけるオブジェクト間の関係、認証マネージャ、認証プロバイダなど、コアコンポーネントの役割と相互作用について詳しく説明します。理解を容易にするために、さまざまな認証フローとユースケースで認証アーキテクチャを実際にどのように適用できるかを示します

セクション 4.認証状態の永続性

  • このセクションでは、認証状態の保存、参照、削除などの永続性管理方法について説明します。

  • 以前のバージョンと比較して、より効率的な認証状態の永続性をどのように設定して実装するかを詳しく学びます。

セクション 5.セッション管理

  • このセクションでは、セッション情報の作成、維持、有効期限、削除などのセッションライフサイクル管理を含む、同時セッション制御、セッション固定保護、セッションポリシー設定などについて詳しく説明します。

セクション6.例外処理

  • 認証および認可プロセスで発生する可能性のあるさまざまな例外状況をどのように処理するかについての方法論を提示します。セキュリティ関連の例外処理の重要性を強調し、ユーザーにKindエラーメッセージを提供し、システムのセキュリティを維持するための例外処理戦略を学習します。

セクション 7.悪用保護

  • Webアプリケーションはさまざまなセキュリティ脅威にさらされています。 CORS(Cross-Origin Resource Sharing)、CSRF(Cross-Site Request Forgery)、SameSite Cookieプロパティなどのセキュリティメカニズムを使用して、これらの脅威からアプリケーションを保護する方法を学びます。

セクション8.認可プロセス

  • 許可は、アプリケーション内でユーザーが実行できる操作を決定します。

  • URLベースの認可、メソッドレベルの認可など、さまざまな認可処理方法を紹介し、それぞれの適用方法とセキュリティの考慮事項について説明します。これにより、開発者はアプリケーションのセキュリティ要件に合った適切な承認ポリシーを設計および実装できます。

セクション9.認可アーキテクチャ

  • 認可処理の内部構造と原理を深く扱います。

  • 認可マネージャー、認可決定者など、コアコンポーネントとそれらの間の関係を分析し、認可アーキテクチャを介して複雑なセキュリティ要件を解決する方法を紹介します。

セクション 10.イベント処理

  • Spring Securityは、認証と承認の過程で発生するイベントを処理するためのメカニズムを提供します。

  • 認証イベント、認可イベントの処理方法を学び、どのような状況でイベントを発生して受信するかについての方法を学習します。

セクション11.統合

  • Spring SecurityはSpring Ecosystemと緊密に統合されています。

  • サーブレットAPI、Spring MVCとの統合方法を詳細に説明し、SpringアプリケーションにSpring Securityを効果的に統合する方法について説明します。

セクション12:詳細設定

  • 複数のセキュリティ設定、冗長設定、セキュリティDSLをどのように実装できるかを学びます。

セクション13:本番プロジェクト

  • このレッスンは実際には理論を超えており、会員認証システムと会員管理システムの実装を通じて、Spring Securityの全体的な適用方法を学びます。

Spring Securityロードマップ

  • スプリングセキュリティ完成征服+スプリングセキュリティOAuth2

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

浄水源(leaven)

  • 現職のJava開発者

  • SI/SM/ソリューション/Mobile/Front&Back-end のさまざまなプロジェクト体験

  • Architect/PM/PL として役割を果たす

  • Github


こんな方に
おすすめです

学習対象は
誰でしょう?

  • Spring Securityの基本概念を確実に理解したい方

  • Spring Securityの基本機能を超えて自由に機能を拡張し、カストマイジングしたい方

  • Spring Securityを活用して実務レベルの認証および権限制御システムを実装したい人

  • Spring Security入門者から中高級者まで活用できる内容で構成

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

  • Java

  • Spring Boot

  • Spring MVC

  • Spring JPA

  • RDBMS

こんにちは
です。

9,790

受講生

322

受講レビュー

1,207

回答

4.9

講座評価

5

講座

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

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

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

 

カリキュラム

全体

103件 ∙ (36時間 55分)

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

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

受講レビュー

全体

70件

4.9

70件の受講レビュー

  • rocket700015862님의 프로필 이미지
    rocket700015862

    受講レビュー 2

    平均評価 5.0

    5

    75% 受講後に作成

    I was working on a project and had a lot of trouble with security and authentication/authorization. I learned the general flow by cloning the free lecture (Spring Security 5.x) from another place and then modified the source codes in the blog to fit my project, but I felt that it was not enough. Most of the existing books and lectures were based on Spring Security 5.x version, so there were many differences from 6.x. In particular, in the security setting part, 5.x uses a simple method, but from 6.x, lambda expressions are required, so I had to googling every single thing while wondering if it was right. I applied JWT and OAuth2 to the project with Googling and Spring Security in Action 2nd Edition and GPT4, and the server worked, but I was very uneasy about applying authentication/authorization without properly understanding it, so I decided to take the lecture. I was worried that there would be a lot of overlap with Spring Security in Action 2nd Edition, but the detailed parts that were not covered in the book were covered in detail, so I was able to clearly understand the concepts that were ambiguous. For those who are learning for the first time, I recommend 5.x version + ChatGPT4 or 4o (since most of the learning data is 5.x version, it presents a lot of deprecated code) + don't waste time Googling and just listen to this lecture😭 + If you are completely new to Spring Security, I recommend Spring Security in Action 2nd (6.x version or higher) sold by Manning + official documentation. I do not recommend studying 5.x version.

    • alsry922님의 프로필 이미지
      alsry922

      受講レビュー 17

      平均評価 4.7

      4

      76% 受講後に作成

      I just listened to what I thought was necessary. The lecture is very long, but I recommend that you watch it three times. At first, I didn't understand what was being said, and I wondered if I should keep listening to it, but the second time, I got a general idea of what it was. I think I'll understand most of it if I listen to it one more time. I've watched it twice, so I'll listen to it one more time. The pronunciation is a bit hard to listen to at double speed, and the feedback from community questions seems a bit slow, so it's a bit disappointing... Aside from that, I think you'll learn most of what you need to know about Spring Security if you study it with this. I recommend it!

      • pinako님의 프로필 이미지
        pinako

        受講レビュー 2

        平均評価 4.5

        4

        37% 受講後に作成

        He explains it in great detail, and explains the principles thoroughly. However... his pronunciation is very disappointing. On top of that, he speaks in a dialect, so there are many times when I couldn't understand. It's much harder than other lectures.. Thank you for the great lecture.

        • smathj9975님의 프로필 이미지
          smathj9975

          受講レビュー 25

          平均評価 5.0

          5

          100% 受講後に作成

          Finally, I'm done!!! First of all, I liked the previous version of the lecture. I like this Security 6 version more than the previous 5 version! The more I take the lecture, the more I realize that the instructor has done a lot of analysis on the new version and created the lecture. I'll write down some features that might be helpful to others. 1. Place the filter initialization part in front of the leaf I am also really satisfied with the fact that the initialization process is placed at the very front 2. Separation of theory and practice parts The lecture is divided into each part, so it is easy to watch in about 20~30 minutes 3. Branch management for each part The branches are divided into each part, so it is very useful for taking the class 4. Teaching ability There is no need to say anything about the teaching ability, and among the security lectures or textbooks I have seen, This is a lecture that is really like light and salt Just adding a library and turning on the server, a lot of things happen... It is good because it is not a lecture that simply uses functions and ends In addition, you can develop insight into various Spring technologies What I hope for... Can you also give a new lecture on OAuth2!!!

          • leaven
            知識共有者

            Thank you so much for your valuable evaluation. Congratulations on completing the course for a long time^^ I will cheer for smathj to create his own system that goes beyond my lecture. Nothing can beat the fun in studying. I am also happy that smathj's evaluation is filled with such fun. We are continuously monitoring OAuth2. I don't know the exact time, but I hope to meet you with more upgraded content at the necessary time. Thank you.~~

        • ttasjwi님의 프로필 이미지
          ttasjwi

          受講レビュー 16

          平均評価 5.0

          5

          40% 受講後に作成

          The lecture time is 36 hours and 55 minutes, so it is scary when you first watch the lecture. I also felt resistance when I first learned this part... However, the true value of this lecture is the part where the internal operation principles are explained in detail through the debugger. As you follow the lecture to dig into the detailed operation principles through the debugger, you will learn how to use the debugger yourself, which was a great help in improving your development skills. If you follow this lecture at the stage where you have gone through the Spring introductory stage (learning core, web, jpa, boot, etc.) and learn the internal automatic settings and operation flow through the debugger, you will feel that your understanding of security will grow rapidly. And as of now, most of the security-related materials are based on deprecated or unused materials, but this lecture was created with version 6 and later in mind. It is hard to find lectures or materials that explain security, or even specific technologies, in such depth. This is a lecture that I really recommend.

          • leaven
            知識共有者

            First of all, thank you very much for your valuable evaluation^^ Most of my lectures are produced over a long period of time, so I think you may have a lot of burden before learning like Mr. Ssulji. It is true. However, I personally have a firm standard and principle that I must convey the best knowledge to students in any form regardless of the length of the lecture time, so even if the external appearance of the lecture video is not refined and has advanced marketability, I have a strong will to never compromise or yield on the quality of the internal content, the knowledge transfer, so the video time always ends up being longer than expected!! Of course, I always recognize that it needs to be adjusted appropriately^^ Since it is long, I think you will have a more solid foundation if you follow the difficult parts repeatedly. And I am even more grateful that you felt the charm of debugging^^ If you use it well in practice, it will be of great help, so I hope you continue to develop it as a habit. Thank you again for your sincere evaluation.

        ¥11,754

        leavenの他の講座

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

        似ている講座

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