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
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
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
Abi
July 14, 2018
Programming
300
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
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
640
APNsからLive Activityを開始する話
yumnumm
0
170
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
750
Event is what happens
moro
2
770
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
220
R8 の設定見直しでアプリサイズ削減
andpad
0
220
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
170
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.5k
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.2k
Workers Cache を知る
syumai
0
360
Simple Storage Service(S3) is not simple
iwatsukayura
0
290
Agents on Rails - Rails at Scale 2026
irinanazarova
0
560
Featured
See All Featured
From π to Pie charts
rasagy
1
400
Between Models and Reality
mayunak
4
500
We Have a Design System, Now What?
morganepeng
55
8.4k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
450
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
710
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
320
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Six Lessons from altMBA
skipperchong
29
4.5k
Paper Plane (Part 1)
katiecoart
PRO
2
12k
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