• 検索結果がありません。

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(

new OpenIdConnectAuthenticationOptions() {

ClientId = "f4b98e1d-7b5d-47d3-85fe-bb17cef425a4", Authority = "https://login.windows.net/azlab01.asia/"

});

}

テナント名部分は適宜変更

クライアント ID を指定

(登録したアプリの構成タブから取得)

WS-Federation 構成サンプル

<configuration>

<configSections>

<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>

WIF の有効化

認証されてないユーザーを拒否

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>

<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>

認証クッキーの暗号化 方式を指定

アプリ ID

ログイン URL 等のメタデー タを取得する URL

アプリ ID

マルチフォレスト統合( AAD Sync

AD DS AD DS AD DS AD DS

AAD AAD

AAD Sync

DirSync

1:1

構成

N:1

構成

AD DS : Active Directory Directory Services

シングルサインオン( AAD + ADFS AAD

AD FS

AD DS

WAP

クラウド上の

Web システム

信頼関係

社内設置型の

Web システム

イントラネット インターネット

要パスワード

+多要素認証

D irS yn c / A AD Sy nc

パスワード 入力不要

( SSO )

AD FS : Active Directory Federation Services WAP : Web Application Proxy

ネイティブアプリ認証 ( OAuth 2.0 )

ネイティブアプリ ADAL

Web サービス

(ASP.NET Web API 等 ) Azure Active Directory

認証ダイアログ

O Au th 2.0

ADAL : Active Directory Authentication Libraries

ネイティブアプリの登録

API 側とは別に登録 アクセス先の API を指定

ネイティブアプリ認証サンプル

public static void ConfigureOAuth2(IAppBuilder app) {

app.UseWindowsAzureActiveDirectoryBearerAuthentication(

new WindowsAzureActiveDirectoryBearerAuthenticationOptions() {

Audience = "http://appid.azlab01.asia/MSC2014.Demo.Web.Api", Tennant = “azlab01.asia"

});

}

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");

API 側の認証設定

ネイティブアプリ側のアクセスコード

関連したドキュメント