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
mairuでつくるクレデンシャルレス開発環境 / Credential-less develo...
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Issei Naruta
December 16, 2025
Technology
5
750
mairuでつくるクレデンシャルレス開発環境 / Credential-less development environment using Mailru
2025/12/16 IVRyエンジニア大忘年会LT
Issei Naruta
December 16, 2025
Tweet
Share
More Decks by Issei Naruta
See All by Issei Naruta
インフラからSREへ
mirakui
32
14k
データパイプラインをなんとかした話 / Improving the Data Pipeline in IVRy
mirakui
1
630
Cookpad TechConf 2022 Keynote
mirakui
0
4k
ドライイーストを使わずにパンを焼けるか? 〜天然酵母のパン作りを支える技術〜
mirakui
0
3.6k
関東積みについて/How to build Kanto-stacking
mirakui
0
760
先折りGTRについて/How to build left-GTR transitions
mirakui
3
1.1k
サービス開発速度に着目したソフトウェアアーキテクチャ/Software architecture for effective service development at Cookpad
mirakui
5
7.2k
Beyond the Boundaries
mirakui
1
1.4k
Cookpad Under a Microscope
mirakui
6
8.7k
Other Decks in Technology
See All in Technology
Escape from Excel方眼紙 ~マークダウンで繋ぐ、人とAIの架け橋~ /nikkei-tech-talk44
nikkei_engineer_recruiting
0
110
The_Evolution_of_Bits_AI_SRE.pdf
nulabinc
PRO
0
250
TinyTroupeで人狼ゲームやってみた!
ueponx
0
110
Phase03_ドキュメント管理
overflowinc
0
150
「通るまでRe-run」から卒業!落ちないテストを書く勘所
asumikam
2
410
20年以上続く PHP 大規模プロダクトを Kubernetes へ ── クラウド基盤刷新プロジェクトの4年間
oogfranz
PRO
0
130
Everything Claude Code を眺める
oikon48
13
8.7k
Phase07_実務適用
overflowinc
0
110
Phase02_AI座学_応用
overflowinc
0
170
欠陥分析(ODC分析)における生成AIの活用プロセスと実践事例 / 20260320 Suguru Ishii & Naoki Yamakoshi & Mayu Yoshizawa
shift_evolve
PRO
0
210
NewSQL_ ストレージ分離と分散合意を用いたスケーラブルアーキテクチャ
hacomono
PRO
4
420
GCASアップデート(202601-202603)
techniczna
0
240
Featured
See All Featured
Bash Introduction
62gerente
615
210k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
640
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
150
The Spectacular Lies of Maps
axbom
PRO
1
630
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
310
Information Architects: The Missing Link in Design Systems
soysaucechin
0
830
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.4k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
450
4 Signs Your Business is Dying
shpigford
187
22k
GraphQLの誤解/rethinking-graphql
sonatard
75
11k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
220
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.5k
Transcript
mairuでつくるクレデンシャルレス開発環境 Issei Naruta (mirakui) Principal Engineer / IVRy Inc. 2025/12/16
IVRyエンジニア大忘年会LT
Issei Naruta (mirakui) IVRy Inc. 2024/2- Principal Engineer Platform Engineering:
SRE, Data ex: Cookpad Inc. 2010-2023 CTO (2016-2022) 趣味 パン作り ルービックキューブ 深夜アニメ
最近作っているもの
最近作っているもの
mairuでつくるクレデンシャルレス開発環境 ローカル環境から AWS 上の開発環境へのアクセスの話
IVRy における AWS SSO 構成
開発者間の権限の差異問題
SRE にはできて他の開発者にはできないほうがいいことがある (破壊など)
Embedded SRE が Admin 権限で開発に参画すること の問題点 他の開発者にも Allow すべき権限を見逃しがち 自分は何でもできて困らないため
普段の開発 (ローカル開発環境の起動) に Admin 権限はそもそも必要無いはず 他プロジェクトのリソースすら破壊できてしまう
sorah/mairu https://github.com/sorah/mairu AWS SSO と連携し、指定した Role でスクリプト等を実行できるコマンドラインツー ル
mairuを使わない場合 Identity Center で Admin ロールが assume role されているユーザで AWS
CLI を使う例 $ aws sso login --session ... (ブラウザでログイン) $ aws ... # => Admin Role で実行 mairuを使う場合 mairu exec で指定した Role になれる (Identity Center で許可されたもののみ) $ mairu exec 123456/Developer aws ... (セッションがなければブラウザでログイン) # => Developer Role で実行
開発者間で Role を統一する Foo プロジェクトの開発者は FooDeveloper を使って開発をする # ~/projects/foo/.mairu.json {
"server": "ivry", "role": "123456/FooDeveloper" } .mairu.json をプロジェクトで共有しておくと mairu exec auto で参照される $ cd ~/projects/foo/ $ mairu exec auto aws ... # => FooDeveloper で実行
before mairu
after mairu
mairu で達成できたこと 開発に参画するメンバーは (たとえAdminを持っていても) プロジェクトの開発に必 要な Role に絞って開発できるようになった 環境変数にも ~/.aws/credentials
にもクレデンシャルを保存する必要が無い mairu agent プロセスが認証セッションを維持する 公式 AWS_PROFILE でも Role 切り替えはできるが? あくまで個人設定なので開発者間での統一が面倒、用途別の切り替えも面倒
まって
mairuでつくる クレデンシャルレス 開発環境
データベースへの接続にパスワードいるのでは? 開発用のパスワードをどうやって保存・共有するか? 1Password Environments? AWS Secrets Manager / Parameter Store?
RDS には IAM 認証がある! (1/2) PostgreSQL の場合 CREATE ROLE developer
WITH LOGIN; -- PASSWORD不要! GRANT ROLE rds_iam TO developer; Developer IAM Role の Policy に以下を追加 { "Action": "rds-db:connect", "Effect": "Allow", "Resource": "arn:aws:rds-db:<region>:<account>:dbuser:<cluster_name>/developer" }
RDS には IAM 認証がある! (2/2) rds generate-db-auth-token で15分間有効な one time
password が生成されるので それを使ってログイン $ PGPASSWORD=$(mairu exec auto rds generate-db-auth-token --username developer ...) \ psql -U developer ...
まって
DB は VPC 内にあるよね? どうやって到達するの? ssh 踏み台のためのクレデンシャル要るんじゃないの?
Twingate https://www.twingate.com/ L7 で動作する、名前解決ベースの VPN Alternative VPC 内に置いた Connector (EC2等)
経由でリソースにアクセスする "SSO 認証したユーザに VPC 内の特定リソースへ疎通させる" ができる 要は自宅や外出先からでもこれができる (要 Twingate アプリ) $ psql \ -h my-aurora.cluster-XXXXX.ap-northeast-1.rds.amazonaws.com \ ... これも Entra ID の認証で SSO できるためローカルにクレデンシャル必要無し
まとめ 1回の SSO 認証だけで VPC 内の DB アクセスまでできるのは 開発者体験としてもセキュリティとしても気持ちいい トークンや秘密鍵をファイルや環境変数に保持する必要がない
クレデンシャルを開発者に共有する手間もないので開発環境の展開が楽ちん
まとめ sorah/mairu 指定した Role に絞って AWS を使えるやつ Agentic Coding 向けのガードレールとしても◎
仕組みについては端折ったけど結構面白い設計なので見てみてほしい (宣伝) RDS IAM 認証 WiTH PASSWORD してない PostgreSQL ユーザに SSO 由来の認証でログインで きるの、新鮮な感覚 これが気持ちよかったので LT したいと思った流れ Twingate SSO できる VPN みたいなやつ 最高便利、導入不可避