The Microsoft Conference 2014 ROOMC
改善のための要件 : ソリューション Azure Active Directory (AD) Premium で複数のクラウドと社内の ID を統合 EMS は Azure AD Premium を包含 Office 365 などの SaaS アプリや社内アプリをシングルサインオンで利用可能 Office 365 など 他社クラウド BitLocker でサーバーやクライアントのディスクを保護 OS がインストールされたドライブ 固定ドライブ リムーバブルドライブを暗号化で保護 ディスク全体または使用領域のみを暗号化して保護 PC やディスクの紛失 盗難時に機密を維持 SaaS アプリ シングルサインオンで利用可能 社内アプリ 25
Agenda イントロダクションエンタープライズ IT の変化とユーザー認証のトレンド AAD を利用した安全なユーザー認証社内 AD と AAD のアカウント同期 AAD を利用したユーザー認証多要素認証の追加 まとめ Appendix
The Microsoft Conference 2014
エンタープライズ IT 環境の拡大 PC タブレットスマートフォン イントラネット インターネット オンプレミス クラウド SaaS 型サービス
パスワード管理の問題 SaaS 型サービス クラウド上のシステム ユーザー認証は大丈夫? インターネット
さてどうしましょう?
イントラネットは良かった イントラネット 内部設置型のシステム 内部設置型のシステム Active Directory 内部設置型のシステム
その頃インターネットでは
フェデレーション認証で楽ちん マイクロソフト ID ( 認証処理を委譲 ) 2 ユーザー ID / パスワード 3 セキュリティトークン 1 トークンを要求 4 セキュリティトークン セキュリティトークン セキュリティトークン OneDrive Outlook.com Skype
多要素認証で安心 ワンタイムトークン ユーザー ID パスワード 3 1 システム ユーザー ID & パスワード + ワンタイムパスワード ワンタイムトークン 12:38 2
エンタープライズは?
エンタープライズなら AAD インターネット イントラネット SaaS 型サービス クラウド上のシステム 内部設置型のシステム Azure Active Directory 同期 Active Directory
The Microsoft Conference 2014
Azure Active Directory Active Directory とのアカウント同期 クラウドアプリも社内アカウントで利用可能 多要素認証によるセキュリティの強化
パスワードが覚えきれない! パスワードパスワードパスワードパスワードパスワードパスワード パスワード インターネット イントラネット パスワード SaaS 型サービス クラウド上のシステム 内部設置型のシステム アカウントデータベース アカウントデータベース Active Directory
AAD へのアカウント同期 インターネットパスワード イントラネット SaaS 型サービス クラウド上のシステム 内部設置型のシステム Azure Active Directory 同期 Active Directory
アカウント同期の構成 IT 管理者 AAD ディレクトリの作成 カスタムドメインの指定 AAD Sync or DirSync を実行
AAD Sync / DirSync で同期
The Microsoft Conference 2014 DEMO AD AAD のアカウント同期
アプリ個別の作りこみは面倒で危険 SaaS 型サービス アカウントデータベース インターネット イントラネット クラウド上のシステム 内部設置型のシステム アカウントデータベース Active Directory
標準プロトコルによる認証連携 インターネット イントラネット SaaS 型サービス クラウド上のシステム Azure WS-Federation, OpenID Connect, etc Active Directory 同期 内部設置型のシステム Active Directory
Web アプリへの組込み IT 管理者 開発者 Azure Active Directory にアプリを登録 Windows Identity Foundation による組込み or ASP.NET Identity による組込み
AAD へアプリを登録 アプリの名前 サインオン URL アプリケーション ID
ASP.NET Web アプリへの組込み OpenID Connect WS-Federation ASP.NET Identity [ assembly: OwinStartup ( typeof ( Samples.Startup1 ) ) ] public class Startup1 { public void Configuration ( IAppBuilder app ) { // コードで組み込む } } Windows Identity Foundation <configuration> <system.identitymodel> <!-- 構成ファイルで組み込む --> </system.identitymodel> </configuration>
AAD サインインが要求される リダイレクト サインイン
The Microsoft Conference 2014 DEMO アプリケーションへの組込
SaaS 型サービスの登録 IT 管理者 Azure Active Directory にアプリを登録 ユーザ権限の 割り当て
SaaS 型サービスの登録
The Microsoft Conference 2014 DEMO SaaS サービスと認証連携
テキストパスワードは危険! インターネット イントラネット SaaS 型サービス クラウド上のシステム 内部設置型のシステム Azure Active Directory 同期 あぶない! Active Directory
多要素認証による強化 パスワードデバイスインターネットイントラネット SaaS 型サービス クラウド上のシステム 内部設置型のシステム Azure Active Directory 同期 Active Directory
多要素認証の構成 IT 管理者開発者ユーザー 多要素認証の有効化 追加情報を登録
IT 管理者が MFA を有効化
ユーザーが追加情報を登録 http://aka.ms/mfasetup スマホアプリ 音声メッセージ ( 電話 ) テキストメッセージ (SMS)
以降は多要素認証が要求される まずはユーザー ID とパスワードでサインイン ワンタイムパスワードも必要になる
The Microsoft Conference 2014 DEMO 多要素認証の有効化
まとめ ユーザー 慣れ親しんだアカウントが 外でも使えます 開発者 面倒な認証機構はお任せです IT 管理者 従来同様の ID 管理 運用と 多要素認証による強化
リファレンス MSDN http://msdn.microsoft.com/library/azure/jj673460.aspx TechNet http://technet.microsoft.com/ja-jp/library/hh967619.aspx Cloud Identity (Blog) http://www.cloudidentity.com
関連セッション MN-242 Dynamic Identity Framework ~ クラウド時代適応のための ID 管理手法 ~ MN-271 多要素認証 Deep Dive ~ ハイブリット認証基盤だからこそ実現できる柔軟で高機能な多要素認証 ~
もしかして Office 365 をご利用いただいていますか? 既に Azure Active Directory のユーザーです あとは利用するだけ!!!
The Microsoft Conference 2014
WS-Federation サンプルコード public static void ConfigureWsFederation(IAppBuilder app) { // 認証の種類を設定 app.setdefaultsigninasauthenticationtype( WsFederationAuthenticationDefaults.AuthenticationType); // クッキー認証を有効化 app.usecookieauthentication( new CookieAuthenticationOptions() { AuthenticationType = WsFederationAuthenticationDefaults.AuthenticationType }); // WS-Federation の組込み app.usewsfederationauthentication( new WsFederationAuthenticationOptions() { Wtrealm = "http://appid.azlab01.asia/msc2014.demo.web.mvc", MetadataAddress = "https://login.windows.net/azlab01.asia/" + "federationmetadata/2007-06/federationmetadata.xml" }); } アプリケーション ID を指定 テナント名部分は適宜変更
OpenID Connect サンプルコード public static void ConfigureOpenIdConnect(IAppBuilder app) { // 認証の種類を設定 app.setdefaultsigninasauthenticationtype( OpenIdConnectAuthenticationDefaults.AuthenticationType); // クッキー認証を有効化 app.usecookieauthentication( new CookieAuthenticationOptions() { AuthenticationType = OpenIdConnectAuthenticationDefaults.AuthenticationType }); // OpenID Connect の組込み app.useopenidconnectauthentication( クライアント ID を指定 new OpenIdConnectAuthenticationOptions() ( 登録したアプリの構成タブから取得 ) { ClientId = "f4b98e1d-7b5d-47d3-85fe-bb17cef425a4", Authority = "https://login.windows.net/azlab01.asia/" }); } テナント名部分は適宜変更
WS-Federation 構成サンプル <configuration> <configsections> WIF の有効化 <section name="system.identitymodel" type="system.identitymodel.configuration.systemidentitymodelsection, System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <section name= system.identitymodel.services" type="system.identitymodel.services.configuration.systemidentitymodelservicessection, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> </configsections> <system.web> <authorization> <deny users="?" /> </authorization> </system.web> 認証されてないユーザーを拒否 <system.webserver> <modules> <add name="wsfederationauthenticationmodule" type="system.identitymodel.services.wsfederationauthenticationmodule, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" precondition="managedhandler" /> <add name="sessionauthenticationmodule" type="system.identitymodel.services.sessionauthenticationmodule, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" precondition="managedhandler" /> </modules> </system.webserver> WS-Federation およびセッション認証モジュールを追加
WS-Federation 構成サンプル <system.identitymodel> <identityconfiguration> <securitytokenhandlers> <add type="system.identitymodel.services.tokens.machinekeysessionsecuritytokenhandler, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <remove type="system.identitymodel.tokens.sessionsecuritytokenhandler, System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> </securitytokenhandlers> <issuernameregistry type="aadstudy.webforms.utils.databaseissuernameregistry, AADStudy.WebForms" /> <audienceuris> <add value="https://appid.azlab01.asia/msc2014.demo.web.mvc" /> </audienceuris> <certificatevalidation certificatevalidationmode="none" /> </identityconfiguration> </system.identitymodel> アプリ ID 認証クッキーの暗号化方式を指定 <system.identitymodel.services> <federationconfiguration> <cookiehandler requiressl="true" /> <wsfederation passiveredirectenabled="true" issuer="https://login.windows.net/azlab01.asia/wsfed" realm="https://appid.azlab01.asia/msc2014.demo.web.mvc" requirehttps="true" /> </federationconfiguration> </system.identitymodel.services> ログイン URL 等のメタデータを取得する URL アプリ ID
マルチフォレスト統合 (AAD Sync) 1:1 構成 N:1 構成 AAD AAD DirSync AAD Sync AD DS AD DS 1 AD DS 2 AD DS 3 AD DS : Active Directory Directory Services
シングルサインオン (AAD + ADFS) 要パスワード + 多要素認証 クラウド上の Web システム AAD インターネット イントラネット WAP 信頼関係 AD FS DirSync / AAD Sync パスワード入力不要 (SSO) 社内設置型の Web システム AD DS AD FS : Active Directory Federation Services WAP : Web Application Proxy
ネイティブアプリ認証 (OAuth 2.0) ADAL ADAL : Active Directory Authentication Libraries Azure Active Directory 認証ダイアログ OAuth 2.0 ネイティブアプリ Web サービス (ASP.NET Web API 等 )
ネイティブアプリの登録 API 側とは別に登録 アクセス先の API を指定
ネイティブアプリ認証サンプル public static void ConfigureOAuth2(IAppBuilder app) { app.usewindowsazureactivedirectorybearerauthentication( new WindowsAzureActiveDirectoryBearerAuthenticationOptions() { Audience = "http://appid.azlab01.asia/msc2014.demo.web.api", Tennant = azlab01.asia" }); } API 側の認証設定 ネイティブアプリ側のアクセスコード public async void Run() { var acx = new AuthenticationContext("https://login.windows.net/azlab01.asia"); var token = await acx.acquiretokenasync("http://appid.azlab01.asia/msc2014.demo.web.api", "d8fed4c3-73a7-44a7-af82-65c7983d245a", new Uri("https://localhost:44302/redirecturi")); var client = new HttpClient(); client.defaultrequestheaders.authorization = new AuthenticationHeaderValue( "Bearer", token.accesstoken); client.baseaddress = new Uri("https://localhost:44302/api/"); var response = await client.getasync("helloworld");
2014 Microsoft Corporation. All rights reserved. Microsoft, Windows and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.