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
App::LDAP - 管理者と百台のコンピュータ #YAPC::Asia 2012
Search
shelling
September 30, 2012
Technology
2
520
App::LDAP - 管理者と百台のコンピュータ #YAPC::Asia 2012
Introduction to App::LDAP, YAPC::Asia 2012
shelling
September 30, 2012
Tweet
Share
More Decks by shelling
See All by shelling
Distributed Storage for Web Applications
shelling
3
680
Other Decks in Technology
See All in Technology
マイクロサービスにおける容易なトランザクション管理に向けて
scalar
0
140
WACATE2024冬セッション資料(ユーザビリティ)
scarletplover
0
210
生成AIのガバナンスの全体像と現実解
fnifni
1
190
watsonx.ai Dojo #5 ファインチューニングとInstructLAB
oniak3ibm
PRO
0
170
ガバメントクラウドのセキュリティ対策事例について
fujisawaryohei
0
560
新機能VPCリソースエンドポイント機能検証から得られた考察
duelist2020jp
0
230
宇宙ベンチャーにおける最近の情シス取り組みについて
axelmizu
0
110
How to be an AWS Community Builder | 君もAWS Community Builderになろう!〜2024 冬 CB募集直前対策編?!〜
coosuke
PRO
2
2.8k
OpenAIの蒸留機能(Model Distillation)を使用して運用中のLLMのコストを削減する取り組み
pharma_x_tech
4
570
スタートアップで取り組んでいるAzureとMicrosoft 365のセキュリティ対策/How to Improve Azure and Microsoft 365 Security at Startup
yuj1osm
0
230
フロントエンド設計にモブ設計を導入してみた / 20241212_cloudsign_TechFrontMeetup
bengo4com
0
1.9k
ブラックフライデーで購入したPixel9で、Gemini Nanoを動かしてみた
marchin1989
1
540
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
For a Future-Friendly Web
brad_frost
175
9.4k
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
RailsConf 2023
tenderlove
29
940
Mobile First: as difficult as doing things right
swwweet
222
9k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Transcript
App::LDAP 管理者と百台のコンピュータ shelling Sunday, September 30, 12
#!/me use qw(perl ruby javascript); use feature qw(css elisp); twitter
“shellingford”; github “shelling”; cpan “shelling”; Sunday, September 30, 12
Review Sunday, September 30, 12
/etc/passwd /etc/shadow LDAP Server Sunday, September 30, 12
network file system samba account netgroup network printers ... Sunday,
September 30, 12
new . Sunday, September 30, 12
ldap-utils LDAP Server Sunday, September 30, 12
LDIF#add ldapmodify -a -f dn: uid=jason8936,ou=people,dc=example,dc=com uid: jason8936 cn: jason8936
sn: jason8936 mail:
[email protected]
objectClass: inetOrgPerson objectClass: posixAccount objectClass: top objectClass: shadowAccount userPassword: {crypt}$6$Hk7MFO3..... shadowMax: 99999 shadowWarning: 7 loginShell: /bin/bash uidNumber: 1020 gidNumber: 1020 homeDirectory: /home/jason8936 Sunday, September 30, 12
LDIF#modify ldapmodify -f dn: uid=jason8936,ou=people,dc=example,dc=com changetype: modify delete: mail mail:
[email protected]
- add: mail mail:
[email protected]
mail:
[email protected]
Sunday, September 30, 12
LDIF#delete ldapmodify -f dn: uid=jason8936,ou=people,dc=example,dc=com changetype: delete Sunday, September 30,
12
Drawbacks • Time-Consumed • Not Quite Convenient • Not Abstract
Enough Sunday, September 30, 12
Demo https://vimeo.com/50077777 Sunday, September 30, 12
Demo https://vimeo.com/50077777 Sunday, September 30, 12
under the hood Sunday, September 30, 12
MVC $ ldap add user foo Controller Model LDAP Server
(CRUD)able Sunday, September 30, 12
User Group Host Sudoer Controller & Dispatcher $ ldap add
user foo Command Add Del Passwd Export User Group Host Sudoer App::LDAP:: use qw( Namespace::Dispatch MooseX::Getopt ); sub run { ... } foo Sunday, September 30, 12
Model & Schema top posixAccount person organizationalPerson inetOrgPerson shadowAccount posixGroup
ipHost LDIF::User LDIF::Group RFC2307 RFC2798 Sunday, September 30, 12
just class package person; use Moose; extends ‘top’; has ...
=> ...; package organizationalPerson; use Moose; extends ‘person’; has ... => ...; Sunday, September 30, 12
required => ? objectclass ( 1.3.6.1.1.1.2.0 NAME 'posixAccount' DESC 'an
account with POSIX attributes' SUP top AUXILIARY MUST ( cn $ uid $ uidNumber $ gidNumber $ homeDirectory ) MAY ( userPassword $ loginShell $ gecos $ description ) ) 1 0 RFC2307 has cn => ( required => ); Sunday, September 30, 12
isa => ? attributetype ( 1.3.6.1.1.1.1.0 NAME 'uidNumber' DESC 'An
integer identifying a user' EQUALITY integerMatch SYNTAX ‘INTEGER’ SINGLE-VALUE ) attributetype ( 1.3.6.1.1.1.1.12 NAME 'memberUid' EQUALITY caseExactIA5Match SUBSTR caseExactIA5SubstringsMatch SYNTAX ‘IA5String’ ) ArrayRef[Str] Num Not SINGLE-VALUE RFC2307 Sunday, September 30, 12
Ext#1 package App::LDAP::ObjectClass::Foo; use Moose; has ‘a_attribute’ => ( is
=> “rw”, isa => “...”, required => 1 or 0, ); ... Sunday, September 30, 12
Ext#2 package App::LDAP::LDIF::Foo; use Moose; extends “App::LDAP::ObjectClass::Foo”; has ‘+a_attribute’ =>
( default => “...”, ); ... Sunday, September 30, 12
Ext#3 package App::LDAP::Command::Foo; use Moose; with “App::LDAP::Role::Command”; sub run {
my $self = @_; App::LDAP::LDIF::Foo->... } ... Sunday, September 30, 12
NextStep#1 User->search( cn => “shelling ford”, mail => “
[email protected]
” );
Sunday, September 30, 12
NextStep#2 $user->modify( cn => “shelling ford”, mail => “
[email protected]
” );
Sunday, September 30, 12
NextStep#3 config(“/nss/passwd”); config(“/nss/group”); Sunday, September 30, 12
UseCase#1 LDAP NFS orker /home/ Worker Worker Worker Work look
up sudoers mount Sunday, September 30, 12
UseCase#2 galera1 galera2 galera3 LDAP galera3’ look up hosts 10.1.193.205
10.1.132.173 Sunday, September 30, 12
Conclusions Not a replacement to ldap-utils Saving your time on
routines help you to create correct LDIFs Sunday, September 30, 12
Thank You http://github.com/shelling/app-ldap pull request & issues welcome Sunday, September
30, 12