Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Kong as a gateway for your Drupal API
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Abi
July 14, 2018
Programming
290
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Kong as a gateway for your Drupal API
Abi
July 14, 2018
Other Decks in Programming
See All in Programming
AIを上手に使っていこうとしたら越境せざるを得なくなった話 〜実践1年で見えた境界を越えなければならない理由と進め方〜 / Crossing borders with AI
tomoyakitaura
4
1.1k
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
1
160
Oxlintはいいぞ(続)
yug1224
1
560
Swift愛好会と私(ウホーイ) / Swift Fan Club and Uhooi
uhooi
0
150
思考垂れ流し開発 ~音声入力 × AIエージェント × 開発ハーネスによる試行錯誤~
npostring
0
980
[GoCon2026] When Goroutines Are Not Enough: Runtime Locality in High-Throughput Go
takehaya
5
680
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
130
デプロイ直後のレイテンシスパイクを調べたら、 Railsの仕様にたどり着いた
nhsykym
0
110
Kiroで創り、AgentCoreで繋ぐ!AWSで実践する「AI-DLC」から「AIエージェント統合」までの最新地図
licux
3
370
GKE アップグレード前に知っておきたい Blue/Green と PDB の関係
stkk
0
160
信頼性の目標を誰も求めてない
shubox
0
500
AWS Step Functions 大規模並列の壁を越える / jaws-sonic-2026-niigata-step-functions
kasacchiful
PRO
0
410
Featured
See All Featured
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
690
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
400
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
520
Building an army of robots
kneath
306
46k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
230
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
770
Believing is Seeing
oripsolob
1
210
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
65k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
430
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
430
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
650
Transcript
Sponsors Organisers https://www.drupal.org/u/el7cosmos https://github.com/el7cosmos Kong as a Gateway for Your
Drupal API by Luhur Abdi Rizal
Sponsors Organisers Drupal 8 API First
Sponsors Organisers Drupal 8: API First
Sponsors Organisers Problems ? Basic Auth Cookie OAuth2 A
Sponsors Organisers Solution Any Auth Reduce Load D A
Sponsors Organisers
Sponsors Organisers Radically Extensible Blazingly Fast Open Source Platform Agnostic
Cloud Native RESTful Interface why ?
Sponsors Organisers
Sponsors Organisers Decoupling Drupal Authentication
Sponsors Organisers Consumer Integration 1 Extends Account Interface 2 Reverse
Proxy Settings 3 Register Authentication Provider 4 Mapping Kong Group to Drupal Roles 5 Decoupling Drupal Authentication
Sponsors Organisers Consumers Integration The Consumer object represents a consumer
- or a user - of a Service. You can either rely on Kong as the Primary Datastore, or you can Map the Consumer List with your database to keep consistency between Kong and your existing primary datastore. https://www.drupal.org/project/consumers
Sponsors Organisers Consumer Account - \Drupal::currentUser - AccountInterface - -
- X-Consumer-ID - X-Consumer-Custom-ID - X-Consumer-Username - X-Anonymous-Consumer
Sponsors Organisers Reverse Proxy Settings /** * Reverse Proxy Configuration:
*/ $settings['reverse_proxy'] = TRUE; /** * Specify every reverse proxy IP address in your environment. */ $settings['reverse_proxy_addresses'] = [ '127.0.0.1', ];
Sponsors Organisers Kong Authentication Provider public function applies(Request $request) {
return $request->isFromTrustedProxy() && $request->headers->has('X-Consumer-ID'); }
Sponsors Organisers Kong Authentication Provider public function authenticate(Request $request) {
if ($request->headers->has('X-Consumer-Custom-ID')) { $this->consumerAccount->setRequest($request); return $this->consumerAccount; } return NULL; }
Sponsors Organisers Permission and ACL Restrict access to a Service
or a Route by whitelisting or blacklisting consumers using arbitrary ACL group names.
Sponsors Organisers Kong Group as Drupal Role public function getRoles($exclude_locked_roles
= FALSE) { $roles = []; if ($this->request->headers->has('X-Consumer-Groups')) { $roles += preg_split("/,\s?/", $this->request->headers ->get('X-Consumer-Groups')); } if (!$exclude_locked_roles) { $roles[] = RoleInterface::AUTHENTICATED_ID; } return $roles; }
Sponsors Organisers Kong as a gateway for Drupal API -
Provide underlying APIs with additional functionalities - Replace Drupal authentication - Provide various authentication method - Reduce Drupal load
Sponsors Organisers Whats Next?
Sponsors Organisers Q&A
Sponsors Organisers Thank You