REST with Spring Boot The canonical reference for building a production grade API with Spring (the price will increase by $50 after the launch) Learn Spring Security ▼▲ THE unique Spring Security education if you’re working with Java today
散々嵌りまくったので設定方法や踏んだ地雷についてのメモ ユーザープールを作る 単純なOAuth2認証がしたいだけの場合はユーザープールを作成。 「属性」の設定 ユーザー名かEmail/電話番号か 任意のユーザー名を付けたい場合はユーザー名側を選ぶ必要あり Email/電話番号を選ぶと、内部的なユーザー名はランダムな文字列になる カスタム属性 カスタム属性はPrincipalから取れる //custom属性roleがADMINか確かめたい場合 @RequestMapping("/") public String index(Principal principal) { if(principal instanceof OAuth2AuthenticationToken) { OAuth2AuthenticationToken token = (OAuth2AuthenticationToken
やりたいこと サーバーレスシステムでの個人情報保護について考えてみます。 システムで管理するべき個人情報は、できるだけクラウド内にとどめ、クライアントとやりとりしないということにできれば、通信路上での漏えいを防ぐことができます。 また、個人情報の管理を、限定することができれば、システムの大部分は、個人情報の漏洩について意識することなくシステム開発を行うことができます。 このような要求のシステムの場合、AWSでは、次のようになります。 Cognito Identity Poolでユーザー管理をする。 クライアント⇔AWS間の通信路上はアクセストークンと処理結果のみの受け渡しする。 AWS内ではLambdaがアクセストークンを受け取りCognitoのユーザー情報をもとに処理を行う。 アクセストークンを受け取ったLambdaにアクセストークンに対応するユーザー情報へのアクセス権限が委譲され、La
🔷 はじめに API Gatewayに作成したAPIを、認証済みのユーザーのみに利用を許可したい場合、API Gatewayのオーサライザーという機能を使う事で実現できます。 フロントエンドからAPIにリクエストを送る際に、認証情報を付加してリクエストを送ると、オーサライザーで認証情報が正しいものか判断して、正しければAPIの利用が許可されて、APIからフロントエンドにレスポンスが返るという流れになります。 🔶 オーサライザー API Gatewayにある、認可を行う機能です。 認可は、リクエスト時に付加されている認証情報を解析して、正しいものであればAPIの利用を許可する、という形で行います。 それだけの機能なので、Lambdaで自作したり、Auth0ののような外部サービスを利用したり、実現手段はいくつかありますが、今回はCognitoを使用して認可機能を実現します。 🔶 Cogn
[Amazon Cognito] Facebook / Google / Amazon だけじゃない!独自の認証システムも利用可能になりました! オリジナルの認証システムも利用可能に! 本日、Amazon Cognito で Developer Authenticated Identities がサポートされました。 Enhanced Identity Support for Amazon Cognito | Amazon Web Services Blog Amazon Cognito : Announcing Developer Authenticated Identities | AWS Developer Blog - Mobile 今までは Amazon / Facebook / Google しか使えませんでしたが、それ以外のサービスプロパイダも使えるようになりました!既存の認
【サーバーレスなユーザ管理基盤】Amazon Cognito ユーザープールにOpenID Connectを使ってLINEアカウントを連携させてみる どうも!大阪オフィスの西村祐二です。 みなさんCognitoは使ってますか? 少し前になりますが、5月17日頃にAmazon Cognito ユーザープールにOpenID Connect(以降OIDC) プロバイダーを追加できるようになりました。 https://aws.amazon.com/jp/about-aws/whats-new/2018/05/amazon-cognito-now-supports-the-capability-to-add-custom-oidc-providers/ いままでは、Google,、Facebook、AmazonEC、SAMLだけだったのですが、このアップデートにより、OpenID Connectに準
AWS Cognitoを設定したのですが、時間がたつと忘れてしまいそうだったので、備忘録として残しておきます。 皆さんのお役に立てられればうれしいです。 今回、備忘録に残すのは、タイトルにある通り、AWS Cognitoで管理するユーザIDとして、外部のソーシャルIDであるGoogleアカウントや、Yahoo・LINEアカウントを利用できるように設定する手順です。 なかなか初めて触るWebサイトで、ユーザID・パスワードを新規に入力してアカウントを作ってもらうのはユーザにとって負担ですし、ユーザもたくさんのサイトのユーザID・パスワードを覚えておくのはたいへんです。 さて、YahooとLINEアカウントを利用できるようにする、としていますが、正しくは、OpenID Connect(略してOIDC)のアカウントを利用できるようにする、といったほうが正しいかもしれません。AWS Cognito
ブラウザからのユーザーアクセスであればamazon-cognito-identity-jsを使ってユーザーの追加、ログインは簡単にできますが、どうにかサーバーサイドでできないものか、調査しました。 Javaのプログラムからユーザー追加やログイン(トークンの取得)ができましたので紹介します。 前準備(マネジメントコンソール) ユーザープールを作成します。ユーザーの登録以降のフローは異なりますが、ユーザープールを作成する手順まではこちらのサイトが参考になると思います。 前準備(Java) AWS SDKを使う設定をします。Gradleの場合は、build.gradleに以下の内容を追加します。 // https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-cognitoidp compile group: 'com.amazo
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く