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
go-ldap Contribution
Search
kazamori
November 30, 2023
Technology
0
360
go-ldap Contribution
Kobe Engineer SakeBash #2 ~神戸のエンジニアコミュニティを盛り上げよう LT
https://acall.connpass.com/event/302038/
kazamori
November 30, 2023
Tweet
Share
More Decks by kazamori
See All by kazamori
Try creating your own orderedmap
kazamori
1
300
Iintroduction of how big tech runs tech projects
kazamori
1
990
Custom GitHub Actions by Java
kazamori
1
850
Other Decks in Technology
See All in Technology
온디바이스 AI 및 로컬 AI의 도전 과제 / Challenges of On-Device AI and Local AI
inureyes
PRO
0
780
Amazon RDS / Amazon Aurora パフォーマンスチューニングとモニタリング
twingob
4
410
まずは開発組織を整えるところからはじめる
ichimichi
0
110
SREがいない”今いる場所”で 「SRE」について聞いて、考えてみた
maimyyym
1
210
検索失敗率のモニタリングから改善まで - Search Engineering Tech Talk 2024 Spring
magicpieh28
2
120
From here to resilience - a travel guide
ufried
1
220
組織的なクラウド統制のはじめの一歩_20240529
yhana
0
400
Oracle Database 23ai セキュリティ新機能
oracle4engineer
PRO
1
1.9k
Microsoft クラウド サービスのコスト管理
murachiakira
0
120
Building Static Websites with Sculpin
opdavies
0
1.3k
左手は添えるだけ!?AWS Well-Architected Frameworkが教えてくれる大事なデータの守り方
ohtk79
0
360
Evolutionary Architecture - Discovering Boundaries @DevTalks 24
victorrentea
1
260
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
34
6.1k
Producing Creativity
orderedlist
PRO
338
39k
What the flash - Photography Introduction
edds
64
11k
Designing on Purpose - Digital PM Summit 2013
jponch
111
6.5k
Pencils Down: Stop Designing & Start Developing
hursman
117
11k
The Invisible Side of Design
smashingmag
294
49k
Music & Morning Musume
bryan
42
5.7k
4 Signs Your Business is Dying
shpigford
176
21k
Typedesign – Prime Four
hannesfritz
36
2.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
323
20k
Building Applications with DynamoDB
mza
88
5.7k
How to Ace a Technical Interview
jacobian
273
22k
Transcript
2023-12-01 (Fri.) Tetsuya Morimoto go-ldap への コントリビューション
2 Kazamori LLC © 2023 • 森本 哲也 (もりもと てつや)
• 神戸市在住 • カザモリ合同会社 ◦ フルリモートワークで他社の開発のお手伝いをしている ▪ 直近の事例: OSSTech株式会社様 システム開発 • 課題管理 (課題管理システム) という分野に関心がある • 言語歴は Python → Java → Go をそれぞれ5年ほどの実務経験 • プログラミングや OSS 文化が好き 自己紹介
3 Kazamori LLC © 2023 目次 LDAP プロトコル概要 1. Go
開発と LDAP プロトコル 2. ID 連携に必要な機能をコントリビューション 3. リファレンス 4.
4 LDAP プロトコル概要
5 Kazamori LLC © 2023 ディレクトリサービスを提供するためのプロトコル • デファクトスタンダードでよいはず • 組織
(社員) の ID 管理などに使われている ◦ 例) 外部サービスへ ID 連携するときに使う リファレンス • LDAPとは:LDAPの仕組みと機能、プロトコル | Okta • UCIDM 用語集 - Unicorn Cloud ID Manager (オンプレミス版) LDAP プロトコルとは ディレクトリサービス ネットワーク上の リソースに対して ID と名前を管理 するサービスの総称
6 Kazamori LLC © 2023 • OpenLDAP サーバー ◦ ミシガン大学のオリジナルの
LDAP 実装から派生したもので OpenLDAP Project が開発しているサーバー実装 • Active Directory サーバー ◦ Windows 向けのマイクロソフト社のディレクトリサービスの実装 LDAP プロトコルのサーバー
7 Kazamori LLC © 2023 今回、紹介するのは検索リクエストの拡張で実現した事例になる • LDAP メッセージという単位で LDAP
オペレーションを扱う LDAP プロトコルの検索リクエストの拡張 LDAPMessage ::= SEQUENCE { messageID MessageID, protocolOp CHOICE { ..., searchRequest SearchRequest, ..., intermediateResponse IntermediateResponse }, controls [0] Controls OPTIONAL } 「コントール」 という データ構造により 検索を拡張する という考え方
8 Go 開発と LDAP プロトコル
9 Kazamori LLC © 2023 github.com/go-ldap/ldap というライブラリがある • (名前が競合するので便宜上 go-ldap
ライブラリと呼ぶ) • Go 言語の LDAP クライアント実装のデファクトスタンダード (たぶん) ◦ LDAP サーバーと通信するときに使うライブラリ ◦ 開発者が LDAP プロトコルを知らなくても簡単に使える 例) ldapadd, ldapmodify, ldapdelete, ldappassword などの操作 go-ldap/ldap ライブラリ
10 ID 連携に必要な機能を コントリビューション
11 Kazamori LLC © 2023 LDAP サーバーの情報が更新されたときにその変更を検知したい ID 連携に求められる要件 LDAP
サーバー DB エントリ 社内の部署移動 パスワード変更 新入社員追加
12 Kazamori LLC © 2023 時刻指定のポーリング検索で変更を検知できる • feat: enable DirSync
control in search operation #436 ◦ 検索リクエストにリクエストコントロールを追加して、 指定した日時以降に更新されたエントリーのみを取得する リファレンス • LDAP_SERVER_DIRSYNC_OID control code Active Directory の DirSync ポーリング (2023-12-01以降)
13 Kazamori LLC © 2023 レプリケーションの仕組みを応用した pubsub 的なもの • Add
syncrepl (rfc-4533) consumer (persistent search) #447 ◦ LDAP の検索リクエストにリクエストコントロールを追加する ◦ サーバーの状態に応じた複数のレスポンスが返ってくる リファレンス • OpenLDAP Software 2.6 Administrator's Guide: Replication • RFC 4533 - The Lightweight Directory Access Protocol (LDAP) Content Synchronization Operation OpenLDAP サーバーの syncrepl 検索リクエスト レプリケーション
14 リファレンス
15 Kazamori LLC © 2023 OSSTech 社のテックブログに詳細があります • OSSTech ブログ:
go-ldap へのコントリビューション • github.com/go-ldap/ldap このスライドで紹介した内容の詳細
ありがとうございました!