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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
690
バンダイナムコスタジオにおけるクラウドネイティブなゲーム開発スタジオの挑戦
yaegashi
2
1.7k
Bandai Namco DX Cloud Studios の全貌
yaegashi
0
350
DX(開発者体験)の向上を目指す ゲーム開発インフラの進化とDX(デジタル変革)
yaegashi
0
240
Azure AD対応の認証プロキシサーバをGoで作っている話
yaegashi
0
310
ゲーム開発におけるクラウドネイティブな CI/CD の最新動向
yaegashi
0
610
rclonefunction
yaegashi
0
960
大規模ゲーム開発を支えるAzure DevOpsによるクラウドネイティブなCI/CDの紹介
yaegashi
5
3k
Other Decks in Technology
See All in Technology
二歩目のフロントエンド・ウェブアクセシビリティ
camiha
2
370
「事実」を「計測」して、「解釈」する 〜AWS Lambdaのメモリ最適解の見つけ方〜
maimyyym
0
130
生成AIで高い生産性を求められて、 悩み、乗り越えた話
mot_techtalk
2
160
自分で立ててみるLLMサービス
y_sera15
0
160
Cognition AI Japan - ウェビナー2_テストQA_運用監視
cogakira
0
130
Kiro Crewをはじめよう
kizawa2020
1
140
AI駆動開発、viviONの1年 ── うまくいったこと・いかなかったこと
vivion
0
290
AI時代のPRレビューにどう向き合うか?
kairim0
1
170
子育てエンジニアの可処分時間が減っても成長を諦めない戦い方
sudoakiy
6
4.4k
More Freedom on the Same Shared GPU Cluster: A Small Team’s Experience with vCluster
nttcom
0
150
オンラインゲームのシステム全体像 - コロプラ 2026年度 新卒研修
colopl
0
1.1k
go-sqletch
moznion
0
130
Featured
See All Featured
Side Projects
sachag
456
43k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
730
Everyday Curiosity
cassininazir
0
350
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Tell your own story through comics
letsgokoyo
1
1.1k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
400
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
A better future with KSS
kneath
240
18k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
520
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
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 などを利用した認可機能
おわり