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
msgraph-sshpubkey
Search
YAEGASHI Takeshi
November 09, 2019
Technology
96
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
msgraph-sshpubkey
第三十七回Azureもくもく会@品川
YAEGASHI Takeshi
November 09, 2019
More Decks by YAEGASHI Takeshi
See All by YAEGASHI Takeshi
Microsoft Entra IDとAzure App Serviceによる エンタープライズWebアプリ・サービスのプラットフォーム構築
yaegashi
0
190
Microsoft Entra/Azure による Redmine の企業内利用向けカスタマイズと運用
yaegashi
0
680
バンダイナムコスタジオにおけるクラウドネイティブなゲーム開発スタジオの挑戦
yaegashi
2
1.7k
Bandai Namco DX Cloud Studios の全貌
yaegashi
0
310
DX(開発者体験)の向上を目指す ゲーム開発インフラの進化とDX(デジタル変革)
yaegashi
0
230
Azure AD対応の認証プロキシサーバをGoで作っている話
yaegashi
0
300
ゲーム開発におけるクラウドネイティブな CI/CD の最新動向
yaegashi
0
600
rclonefunction
yaegashi
0
960
大規模ゲーム開発を支えるAzure DevOpsによるクラウドネイティブなCI/CDの紹介
yaegashi
5
2.9k
Other Decks in Technology
See All in Technology
LLMに渡さなかった仕事
nanaism
0
170
日経電子版を支えていく Kasane Design System/fec_fukuoka
nikkei_engineer_recruiting
0
1.5k
SREは、MCPとAutopilotをこう使え!
kazumax55
2
810
アプリをもっと"iOSアプリっぽく"する小さな工夫 / Small Touches That Make Your App Feel More Like an iOS App
matsuji
1
900
AI de Idea
kawaguti
PRO
2
110
データ_AIの事業の勝敗をわけるもの
nek0128
0
360
空間オーディオで過去の 自分(ゴースト)と競うランニング 〜HealthKitのルートを足音に変える実装〜
nao_randd
0
220
絵ではじめるKubernetesセキュリティ
aoi1
3
570
バイブコーディング時代のWebアプリ開発入門~Cloud Runで学ぶセキュアなビルドとデプロイ
waiwai2111
1
130
CLIライブラリ開発を支える技術
htnabe
0
110
DEFCON_CHV_CTF_Write-up.pdf
bata_24
0
150
Claude Code本って、 読む必要あるの?
oikon48
2
460
Featured
See All Featured
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
The untapped power of vector embeddings
frankvandijk
2
1.9k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
280
Ethics towards AI in product and experience design
skipperchong
2
370
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.2k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
500
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.1k
We Have a Design System, Now What?
morganepeng
55
8.3k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.8k
Navigating Team Friction
lara
192
16k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Transcript
msgraph-sshpubkey 2019-11-09 Takeshi Yaegashi 第三十七回Azureもくもく会@品川
自己紹介 八重樫 剛史 Takeshi Yaegashi • 株式会社バンダイナムコスタジオ所属 • Linux・Unix・OSS・低レベルなことが好きなエンジニア •
ホームページ・ブログ https://l0w.dev • 最近の仕事 ◦ Raspberry Pi を使った IoT 案件 (Go) ◦ スマホゲームアプリのサーバ (Go) ◦ Azureによる開発者向けインフラ構築 (Python, Ansible, etc.) • 最近の登壇 ◦ Microsoft de:code 2019「DT01 ゲームメーカー目線でAzureを(略)」 ◦ Go Conference 2019 Autumn「Microsoft Graph API Library for Go」
msgraph.go • Microsoft Graph Client Library for Go https://github.com/yaegashi/msgraph.go •
Microsoft Graph の各種リソースをGo言語で操作できるライブラリ ◦ Azure Active Directory: User, Group, ... ◦ Office 365: OneDrive, SharePoint, Outlook, Teams, Excel Workbook, ... • 様々なGo製インフラツールをMicrosoft Graph対応にできるかもしれない ◦ oauth2_proxy, traefik, ... ◦ HashiCorp Terraform,Vault, Consul, Packer, …
msgraph.go アプリの例:msgraph-sshpubkey • https://github.com/yaegashi/msgraph.go/tree/master/cmd/msgraph-sshpubkey • SSH 公開鍵を Azure AD に登録して
Linux VM ログインの認証に利用できる • 必要なものは 5.6MB の実行ファイルと設定ファイルのみ、導入が容易 /etc/ssh/sshd_config: AuthorizedKeysCommand /usr/bin/msgraph-sshpubkey -config /etc/msgraph-sshpubkey.json -login %u AuthorizedKeysCommandUser root /etc/msgraph-sshpubkey.json: { "tenant_id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "client_id": "YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY", "client_secret": "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ", "login_map": { "yaegashi": "
[email protected]
" } }
背景:Azure Linux VM のユーザー認証・認可 • Windows VM と比較して、認証統合機能が弱い • Azure
Active Directory 認証を使用して Azure の Linux 仮想マシンにログインする https://docs.microsoft.com/ja-jp/azure/virtual-machines/linux/login-using-aad • ユーザー名がUPNになる
[email protected]
• ソースコードが 公開されていない? • どうも使いづらい (コレジャナイ感) • VMのRBACでアクセス 制御できるのはよい Package: aadlogin Status: install ok installed Priority: extra Section: default Installed-Size: 686 Maintainer: Azure AD <
[email protected]
> Architecture: amd64 Version: 1.0.009820001 Depends: uuid-runtime, libcurl4 Conffiles: /etc/sudoers.d/aad_admins 108feed92ff2287593d22b83206b82ea Description: AAD NSS and PAM extensions License: MIT Vendor: Microsoft Homepage: https://azure.com
背景:Azure Linux VM に自分がほしい機能 • ユーザーログインの認証、SSH 公開鍵の管理 ◦ ユーザーの SSH
公開鍵を Azure AD で管理できる ◦ VM ログインに Azure AD に登録した SSH 公開鍵が利用できる ◦ ユーザーは自分の SSH 公開鍵の管理が Web や CLI で簡単にできる • ユーザーログインのアクセス認可 ◦ Azure AD のグループによるアクセス認可 ◦ Linux VM RBAC 設定によるアクセス認可 • 類似のソフトウェア http://linyo.ws/octopass ◦ GitHub のユーザー・組織情報を利用する
msgraph-sshpubkey もくもく進捗 • 今日できたこと ◦ WIP: ユーザーが自分の SSH 公開鍵を管理できる Web
アプリの開発 ▪ React フロントエンドと Go バックエンド、CLIの雛形作成 ◦ msgraph-sshpubkey リポジトリの公開 https://github.com/yaegashi/msgraph-sshpubkey • 次にやりたいこと ◦ CLI と Web アプリの完成 ◦ Azure AD グループや RBAC などを利用した認可機能
おわり