Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
20190827_Auth0_Rules_使ってみた.pdf
Search
shuntaka
August 29, 2019
Technology
0
280
20190827_Auth0_Rules_使ってみた.pdf
shuntaka
August 29, 2019
Tweet
Share
More Decks by shuntaka
See All by shuntaka
サーバーレスAPI(API Gateway+Lambda)とNext.jsで 個人ブログを作ろう!
shuntaka
0
800
NestJS Prisma on Fargate構成で作るWeb API開発Tips
shuntaka
1
15k
GoとServer-Sent Events
shuntaka
0
8.7k
GoでDynamoDBのCLI(便利)を作った
shuntaka
0
110
AWSのCI/CDサービスを試してみた!
shuntaka
0
230
Goでブラウザ業務を自動化する
shuntaka
0
2.2k
Other Decks in Technology
See All in Technology
Perlで始めるeBPF: 自作Loaderの作り方 / Getting started with eBPF in Perl_How to create your own Loader
takehaya
1
720
第45回 MLOps 勉強会 - ML Test Score を用いた機械学習システムの定量的なアセスメント
masatakashiwagi
3
290
Azure Verified Moduleを触って分かった注目ポイント/azure-verified-module-begin
mhrtech
1
310
Semantic Kernel の Agent 機能試してみた!
okazuki
1
120
Hazard pointers with reference counter
ennael
PRO
0
120
MLOpsの「あるある」課題の解決と、そのためのライブラリgokart
mski_iksm
1
160
RAGの性能を評価しよう
kurahara
1
300
AI時代のアジャイル開発(XP祭り2024版) / Agile Development in the AI Era in XPJUG
takaking22
13
3.6k
Oracle Database 23ai 新機能#4 Application Continuity
oracle4engineer
PRO
0
110
Slackbot × RAG で実現する社内情報検索の最適化
howdy39
2
310
【shownet.conf_】トポロジ図の歩き方
shownet
PRO
0
460
ITエンジニアとして知っておいてほしい、電子メールという大きな穴
logica0419
5
1k
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
334
57k
Being A Developer After 40
akosma
84
590k
YesSQL, Process and Tooling at Scale
rocio
167
14k
Rails Girls Zürich Keynote
gr2m
93
13k
WebSockets: Embracing the real-time Web
robhawkes
59
7.3k
For a Future-Friendly Web
brad_frost
174
9.3k
A Philosophy of Restraint
colly
202
16k
Building Adaptive Systems
keathley
37
2.1k
Embracing the Ebb and Flow
colly
83
4.4k
Statistics for Hackers
jakevdp
796
220k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
37
1.7k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Transcript
Auth0 Rules ͬͯΈͨ 2019/08/29 Auth0ϢʔβʔίϛϡχςΟMeetup in ౦ژ Vol.2 shuntaka
Twitter: @shuntaka_jp github: shuntaka9576 ࣄ: classmethod(ࠓ݄ೖࣾ) DevelopersIO: shuntaka
Rulesʹ1िؒ͘Β͍৮Εͯ ͔ͬͨ͜ͱΛ͠·͢ʂ
ॳ৺ऀ͚Ͱ͢ɻɻɻɻ
ͦͦRules
%BUBCBTF 4PDJBM &OUFSQJSTF 1BTTXPSEMFTT Connections Core Runtime 4BOECPY 8FCUBTL 3VMF
3VMF 3VMF/ ɾɾ ɾ ࢀߟ: https://auth0.com/docs/rules
%BUBCBTF 4PDJBM &OUFSQJSTF 1BTTXPSEMFTT Connections Core Runtime 4BOECPY 8FCUBTL 3VMF
3VMF 3VMF/ ɾɾ ɾ ϩάΠϯ
%BUBCBTF 4PDJBM &OUFSQJSTF 1BTTXPSEMFTT Connections Core Runtime 4BOECPY 8FCUBTL 3VMF
3VMF 3VMF/ ɾɾ ɾ ϩάΠϯ *%1SPWJEFSͰೝূ
%BUBCBTF 4PDJBM &OUFSQJSTF 1BTTXPSEMFTT Connections Core Runtime 4BOECPY 8FCUBTL 3VMF
3VMF 3VMF/ ɾɾ ɾ ੍ޚ͕8FCΞϓ ϦʹΔ ϩάΠϯ *%1SPWJEFSͰೝূ
%BUBCBTF 4PDJBM &OUFSQJSTF 1BTTXPSEMFTT Connections Core Runtime 4BOECPY 8FCUBTL 3VMF
3VMF 3VMF/ ɾɾ ɾ ϩάΠϯ ੍ޚ͕8FCΞϓϦʹΔ *%1SPWJEFSͰೝূ
%BUBCBTF 4PDJBM &OUFSQJSTF 1BTTXPSEMFTT Connections Core Runtime 4BOECPY 8FCUBTL 3VMF
3VMF 3VMF/ ɾɾ ɾ ϩάΠϯ 8FCΞϓϦʹ੍ޚ͕Δ ҙͷίʔυ͕࣮ߦͰ͖Δ! *%1SPWJEFSͰೝূ
࣮ߦڥʹ͍ͭͯ
ɾϥϯλΠϜ ɾར༻ՄೳͳϥΠϒϥϦ ࢀߟ: https://auth0.com/docs/rules/references/modules (https://auth0-extensions.github.io/canirequire/) (8/27 ࣌ process.versions.nodeͰग़ྗ݁Ռɺ8.11.4) ES6ͱNode.js(version8Ҏ߱)Λαϙʔτ async/awaitར༻Մೳʂ
Can I require: Auth0 Extensibilityࢀর
RulesͷϢʔεέʔε
%BUBCBTF 4PDJBM &OUFSQSJTF 1BTTXPSEMFTT Connections Core Runtime 4BOECPY 8FCUBTL 3VMF
3VMF 3VMF/ ɾɾ ɾ ΫϥΠΞϯτ͕ͬͯஔ͖ ͍ͨใΛऔಘ ࣾAPI CRMج൫
%BUBCBTF 4PDJBM &OUFSQSJTF 1BTTXPSEMFTT Connections Core Runtime 4BOECPY 8FCUBTL 3VMF
3VMF 3VMF/ ɾɾ ɾ JE@UPLFOʹؚΊͯ ΫϥΠΞϯτʹ͑Δ ࣾAPI CRMج൫
ৄࡉϒϩάʹ https://dev.classmethod.jp/etc/shuntaka9576-rules2/
⚠ ҙ ⚠
%BUBCBTF 4PDJBM &OUFSQJSTF 1BTTXPSEMFTT Connections Core Runtime 4BOECPY 8FCUBTL 3VMF
3VMF 3VMF/ ɾɾ ɾ 20ඵͷ࣮ߦ੍ݶ͋Γ ࢀߟ: https://auth0.com/docs/best-practices/rules
ޮΑ͍ίʔυΛॻͨ͘Ίʹɺ ͑ΔΦϒδΣΫτΛѲ͠·͠ΐ͏👊
4BOECPY 8FCUBTL con fi guration context user auth0 global 3VMF
3VMF 3VMF/ ɾɾɾ
4BOECPY 8FCUBTL con fi guration context user auth0 global 3VMF
3VMF 3VMF/ ɾɾɾ ɾෳͷϧʔϧ͔ΒࢀরՄೳ ɾϋΠίετͳมΛอଘ͢ΔྖҬ
4BOECPY 8FCUBTL context user auth0 global 3VMF 3VMF 3VMF/ ɾɾɾ
con fi guration ɾઃఆͨ͠ڥม͕ར༻Մೳ ɹ(APIΩʔͳͲͷػີใ֨ೲॴ)
4BOECPY 8FCUBTL context user global con fi guration auth0 3VMF
3VMF 3VMF/ ɾɾɾ "VUI .BOBHFNFOU"1*W ɾAuth0ͷAPIΛݺͼग़͠Մೳ ɾݖݶuserͷread,updateʹݶΒΕΔ
4BOECPY 8FCUBTL con fi guration user auth0 global context 3VMF
3VMF 3VMF/ ɾɾɾ ɾϩάΠϯͨ͠ϢʔβʔͷίϯςΩετใ (IPΞυϨεɺΞϓϦέʔγϣϯ)
4BOECPY 8FCUBTL con fi guration auth0 context global 3VMF user
3VMF 3VMF/ ɾɾɾ ɾϩάΠϯͨ͠Ϣʔβʔͷใ͕औಘՄೳ ɾσϑΥϧτͷid_tokenΑΓৄࡉͳใ͕औΕΔ
ৄࡉϒϩάʹ(ຊ2) https://dev.classmethod.jp/etc/shuntaka9576-auth0- rules/
͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ