Skip to Content
実践 Keycloak ―OpenID Connect、OAuth 2.0を利用したモダンアプリケーションのセキュリティー保護
book

実践 Keycloak ―OpenID Connect、OAuth 2.0を利用したモダンアプリケーションのセキュリティー保護

by Stian Thorgersen, Pedro Igor Silva, 和田 広之, 田村 広平, 乗松 隆志, 田畑 義之
October 2022
Intermediate to advanced
352 pages
5h 8m
Japanese
O'Reilly Japan, Inc.
Content preview from 実践 Keycloak ―OpenID Connect、OAuth 2.0を利用したモダンアプリケーションのセキュリティー保護

5章OAuth 2.0によるアクセスの認可

 本章では、Keycloakが、OAuth 2.0を利用してREST APIやその他のサービスへのアクセスをどのように認可するかについて、より深く理解することができます。OAuth 2.0では、アプリケーションがサービスを安全に呼び出すためにアクセストークンを必要とします。本書のサンプルアプリケーション(プレイグラウンドアプリケーション)を使って、アプリケーションがKeycloakからアクセストークンを取得するためのやり取りを、実際に見ることができます。

 まず、プレイグラウンドアプリケーションを起動し、REST APIを安全に呼び出すために使用できるアクセストークンをKeycloakから取得します。次に、アプリケーションへのアクセスを認可する前にユーザーから同意を得る方法や、アプリケーションに提供されるアクセスを制御する方法を見ていきます。最後に、REST APIがアクセスを許可すべきかどうかを判断するためにどのようにしてアクセストークンを検証するのかを見ていきます。

 本章を読み終えると、OAuth 2.0について、例えば、アクセストークンの取得方法や概要、アクセストークンを使ってサービスを安全に呼び出す方法などについて、よく理解できるでしょう。

 本章で取り上げる主なトピックは、以下の通りです。

  • OAuth 2.0プレイグラウンドアプリケーションの実行
  • アクセストークンの取得
  • ユーザーの同意の要求
  • アクセストークンに付与されるアクセス権限の制限
  • アクセストークンの検証

5.1 技術要件

 本章で紹介するプレイグラウンドアプリケーションを実行するには、コンピューターにNode.js(https://nodejs.org/)がインストールされている必要があります。 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

セキュアで信頼性のあるシステム構築 ―Google SREが考える安全なシステムの設計、実装、保守

セキュアで信頼性のあるシステム構築 ―Google SREが考える安全なシステムの設計、実装、保守

Heather Adkins, Betsy Beyer, Paul Blankinship, Piotr Lewandowski, Ana Oprea, Adam Stubblefield, Kuma Arakawa, 渡邉 了介
実践 自然言語処理 ―実世界NLPアプリケーション開発のベストプラクティス

実践 自然言語処理 ―実世界NLPアプリケーション開発のベストプラクティス

Sowmya Vajjala, Bodhisattwa Majumder, Anuj Gupta, Harshit Surana, 中山 光樹

Publisher Resources

ISBN: 9784814400096Other