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
msgraph-sshpubkey
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
YAEGASHI Takeshi
November 09, 2019
Technology
88
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
170
Microsoft Entra/Azure による Redmine の企業内利用向けカスタマイズと運用
yaegashi
0
620
バンダイナムコスタジオにおけるクラウドネイティブなゲーム開発スタジオの挑戦
yaegashi
2
1.6k
Bandai Namco DX Cloud Studios の全貌
yaegashi
0
280
DX(開発者体験)の向上を目指す ゲーム開発インフラの進化とDX(デジタル変革)
yaegashi
0
200
Azure AD対応の認証プロキシサーバをGoで作っている話
yaegashi
0
290
ゲーム開発におけるクラウドネイティブな CI/CD の最新動向
yaegashi
0
570
rclonefunction
yaegashi
0
940
大規模ゲーム開発を支えるAzure DevOpsによるクラウドネイティブなCI/CDの紹介
yaegashi
5
2.8k
Other Decks in Technology
See All in Technology
現地で盛り上がった WWDC26 Keynote
zozotech
PRO
1
240
200個のGitHubリポジトリを横断調査したかった
icck
0
130
ルールやカスタム機能、どう活かす?ハンズオンで体感するIBM Bobの出力コントロール
muehara
1
150
Agent Skills設計で柔軟性と硬さのバランスが難しい話
nassy20
0
130
なぜ Platform Engineering の土台に Kubernetes を選ぶのか
r4ynode
2
640
2026TECHFRESH畢業分享會 - Lightning Talk - E起 See See : 電商推薦讀心術? 數據說了算
line_developers_tw
PRO
0
970
SONiCの統計情報を取得したい
sonic
0
150
【Snowflake Summit 2026 Recap!!】Snowflake Summit Deep Dive: Security & Governance
civitaspo
0
150
Bucharest Tech Week 2026 - Reinventing testing practices in the AI era
edeandrea
PRO
1
150
脆弱性対応、どこで線を引くか
rymiyamoto
1
380
2026 TECHFRESH 畢業分享會 - AI-Native 重塑軟體工程與虛擬講師
line_developers_tw
PRO
0
970
日本 Fintech 未来予測レポート 2027〜2028年(オリジナル版)
8maki
0
2.1k
Featured
See All Featured
The agentic SEO stack - context over prompts
schlessera
0
820
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.3k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
1.7k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.4k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
240
Unsuck your backbone
ammeep
672
58k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
530
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
Faster Mobile Websites
deanohume
310
31k
Tell your own story through comics
letsgokoyo
1
950
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 などを利用した認可機能
おわり