Quantcast
Channel: MSDN Blogs
Viewing all 35736 articles
Browse latest View live

Office 365 CDN – Preview vs General Availability

$
0
0

Office 365 CDN

Preview vs General Availability

Preview General Availability
Link https://dev.office.com/blogs/office-365-public-cdn-developer-preview-release https://dev.office.com/blogs/general-availability-of-office-365-cdn
Enable CDN (Tenant level setting) Set-SPOTenant -PublicCdnEnabled $true

 

#NOTE: Public CDN is GA. Private CDN is in preview.

Set-SPOTenantCdnEnabled -CdnType Public   #-NoDefaultOrigins

Set-SPOTenantCdnEnabled -CdnType Private #-NoDefaultOrigins

#Alternatively enable both using below cmdlet

#Set-SPOTenantCdnEnabled -CdnType Both

Verify CDN Enabled Get-SPOTenant | FL *cdn*

 

Get-SPOTenantCdnEnabled -CdnType Public

Get-SPOTenantCdnEnabled -CdnType Private

Get CDN Policies Get-SPOTenant | Select PublicCdnAllowedFileTypes

 

Get-SPOTenantCdnPolicies -CdnType Private

Get-SPOTenantCdnPolicies -CdnType Public

Set CDN Policy Set-SPOTenant -PublicCdnAllowedFileTypes “CSS,EOT,GIF,ICO,JPEG,JPG,JS,MAP,PNG,TXT”

 

Set-SPOTenantCdnPolicy -PolicyType {IncludeFileExtensions | ExcludeRestrictedSiteClassifications | ExcludeIfNoScriptDisabled}

-PolicyValue <string> -CdnType

{Public | Private}

New CDN Origin New-SPOPublicCdnOrigin -Url “https://contoso.sharepoint.com/siteassets/folder1”

 

Add-SPOTenantCdnOrigin -CdnType Public -OriginUrl sites/dev/cdnlib

Add-SPOTenantCdnOrigin -CdnType Private -OriginUrl sites/pub/cdnlib

Add-SPOTenantCdnOrigin -CdnType Public -OriginUrl */imageassets

Add-SPOTenantCdnOrigin -CdnType Public -OriginUrl */photos

Get CDN Origins Get-SPOPublicCdnOrigins

 

Get-SPOTenantCdnOrigins -CdnType Public

Get-SPOTenantCdnOrigins -CdnType Private

Remove CDN Origins Remove-SPOPublicCdnOrigin -Identity 193700617159…

 

Remove-SPOTenantCdnOrigin -CdnType Public -OriginUrl sites/dev/cdnlib

Remove-SPOTenantCdnOrigin -CdnType Private -OriginUrl sites/pub/cdnlib

CDN Url Structure https://publiccdn.sharepointonline.com/<tenant host name>/<ID of the public CDN origin>/<sub-path under the origin>

 

E.g: https://publiccdn.sharepointonline.com/

contoso.sharepoint.com

/159..e352d/jigsaw.jpg

 

https://publiccdn.sharepointonline.com/<tenant host name>/sites/site/library

E.g:https://publiccdn.sharepointonline.com/contoso.sharepoint.com/sites/dev/photos/jigsaw.jpg

“https://privatecdn.sharepointonline.com/contoso.sharepoint.com/sites/pub/CDNLib/3.png?_eat_=1495567990_1130bbbb93becf13dd9ec288398ef3f53a8dd131d7f1116f9d3f0b89a5277b45

&_oat_=1495567990_de85e8d775578ba993690038577140247188eb5a69c7855ffffb89d5f8525519”

 

Generate CDN Url https://contoso.sharepoint.com/_vti_bin/publiccdn.ashx/

url?itemurl=https://contoso.sharepoint.com/

sites/Dev/SiteAssets/Photos/jigsaw.jpg

NOTE: This CDN Url generator is not working anymore since the GA. I am assuming this is to discourage using the Preview api. I will update this as I learn more about it.

See Vesa’s note here.

https://contoso.sharepoint.com/_vti_bin/publiccdn.ashx/url?itemurl=https:// contoso.sharepoint.com/sites/Dev/SiteAssets/Photos/jigsaw.jpg

 

CDN URL Validation in Fiddler Add header “Referer: https://contoso.sharepoint.com” to the GET request
Auto-Rewrite of URls Not Applicable Only in GA

 

 

 


Unable to Create New Classic Hybrid Connections

$
0
0

As you may already know, we recently released a change to Hybrid Connection integration with Web Apps in Azure App Service. Before this change, Hybrid Connections relied on BizTalk Services for connectivity. With the recent general availability of Azure Relay, we have changed the way Hybrid Connections work in Web Apps. Instead of using BizTalk Services for new Hybrid Connections, we now use the Azure Relay service for enhanced reliability and performance.

Note: The previous Hybrid Connections that relied on BizTalk Services used multiple TCP ports for connectivity and they were susceptible to firewall issues and performance issues. The new Azure Relay Hybrid Connections use web sockets and communication takes place over a single port; 443.

We don’t want this change to impact customers who are already using Hybrid Connections that rely on BizTalk Services, so if you have existing Hybrid Connections, they will continue to work and you can still configure a Web App to use those Hybrid Connections. (To differentiate them from new Hybrid Connections, BizTalk Hybrid Connections are now called Classic Hybrid Connections.)

One important thing to note about this change. You cannot create new Classic Hybrid Connections. When you are configuring Hybrid Connections, you’ll have the ability to add either an existing Hybrid Connection or an existing Classic Hybrid Connection as shown below.

Configuring Hybrid Connections

Hybrid Connections (Click for a larger image.)

If you click on Add hybrid connection, you’ll have the option to not only select an existing Hybrid Connection, but also to create new Hybrid Connections. However, if you click on Add classic hybrid connection, you’ll only have the option to add an existing Hybrid Connection. You will not be able to create any new Hybrid Connections. The reason for that is because we have deprecated the creation of new Classic Hybrid Connections in favor of the Hybrid Connections based on Azure Relay.

For more information on Hybrid Connections and Web Apps, see the official documentation.

 

OMS: Managing a hybrid cloud just got easier

$
0
0

Since hitting the tipping point a few years ago, public cloud use has experienced exponential growth. The cloud is now more affordable and accessible than ever before. Early concerns around security and privacy have been addressed, and the cloud is increasingly seen as a very viable and desirable alternative to running IT infrastructure on-premises. Cloud-based platforms are now firmly entrenched in corporate IT infrastructure across the globe and momentum behind the public cloud is only increasing.

However, a direct or total shift to the cloud may not always be pragmatic. It may be impossible to lift and shift all IT operations to the cloud in one go and you may want to have some on-premises footprint even in the long run.

Adopt a hybrid strategy for flexibility, affordability and efficiency

A hybrid strategy can bridge the gap between legacy technology and new innovations. It combines on-premises and public cloud deployments to allow businesses to reap the best of both worlds and unlock immense cost-savings. The cloud, in such scenarios, acts as a catalyst for efficiency.

Along with all its advantages, a hybrid cloud strategy presents a unique set of challenges too:

How do you uniformly manage infrastructure and applications running in different clouds?

How do you get a unified view of your organization’s IT?

How do you monitor, troubleshoot and remediate issues that happen anywhere in this complex setup?

How do you balance visibility, policy & security needs of central IT organizations with agility, choice & self-service needs of business groups?

At Microsoft, these questions, and more, made us realize that managing a hybrid organization needs a modern cloud management solution that is designed from the ground-up, and offers a unified solution across a hybrid and heterogeneous environment.

Microsoft Operations Management Suite (OMS) was built from the ground up to address these challenges. OMS is a native, born-in-the-cloud management solution that gives you visibility and control of your hybrid cloud with simplified management and security across your heterogeneous infrastructure.

Power your hybrid environment with insights, visibility and control

OMS is a suite of powerful management services that makes the hybrid cloud structure more visible and manageable.

1

  • Log Analytics lets you gain quick insights across your workloads. You can collect, correlate and act on data from multiple systems in a single view. Its flexible search and custom alert capabilities allow you to identify and troubleshoot incidents quickly.
  • Automation lets you deploy and patch your IT resources at scale using PowerShell scripts. With Desired State Configuration (DSC), you can configure and deploy services that meet your IT policies and ensure these always stay in the desired state.
  • With Application Insights, you get rich performance monitoring, powerful alerts, and the ability to detect trends in performance and behavior of your applications.
  • Network Performance Monitor allows you to monitor your network across public and hybrid clouds, and helps you proactively identify and resolve potential connectivity issues.
  • Azure Backup allows you to backup your Virtual Machines (VMs), files & folders, databases and other applications to the cloud, and quickly restore your data when you need it.
  • Site Recovery lets you be prepared for IT downtime by allowing you to bring up your applications within minutes in the cloud in the event of a disaster.

2

The OMS Dashboard

Perhaps the most important value of OMS is that it offers management-as-a-service.

Now what does that mean, and why is it important?

One of the core promises of the public cloud is that it relieves you of the burden of managing infrastructure. So, any cloud native solution needs to deliver on this promise.

Software-as-a-Service (SaaS) refers to the fact that the solution is hosted in the cloud and does not require you to deploy or manage or maintain any server infrastructure components. To give an analogy, this is the difference between buying and running a power generator in your house to get electricity (managing your own infrastructure) versus getting electricity by turning on a switch.

OMS is designed from the ground-up with the idea that one size doesn’t fit all. It’s a fluid and dynamic solution for corporations, regardless of whether they’ve completed the transition to the cloud or are just dipping their toes in the technology. With OMS, there’s no reason to manage infrastructure or maintain servers. Using the cloud is as easy as switching on a light bulb and only paying for what you consume.

3

An integrated backup experience – You can turn on backup with a single click

Offering management-as-a-service not only delivers these benefits, but also allows Microsoft to bring innovation to you at a rapid pace, and you get these new capabilities without the complexity of upgrading your software.

Our clients concur with this notion:

“By adopting a SaaS platform, we didn’t have to throw a bunch of people at managing the hardware, capacity, storage, and all the other things that come along with traditional IT infrastructure management,” says Dugan Sheehan, Principal Engineer on the cloud team at Rackspace, “OMS is able to ingest and index several gigabytes of data per day for our customers, but we’re abstracted from all the capacity management and the headaches that come along with that. There are no additional licensing, hardware, or training costs, and our customers pay for only what they use in terms of the streaming data.”

Chris Palmer, Solution Architect at PCL Construction, one of the largest construction companies in North America, says “Backing up data using Azure Backup doesn’t eliminate the issue of migrating long-term data backups from one medium to another, but we no longer have to deal with it—Microsoft does. This is a big operational benefit for us.”

To sum up

We noticed the adoption of hybrid computing was outpacing the tools developed to manage it. Microsoft OMS was born out of a need to simplify hybrid cloud management by consolidating all IT-related tasks in one cloud-based platform.

OMS is now used by over 50K public, private, and government organizations, and is available across 30 regions worldwide. With over 14 accreditations, including SOC, HIPAA, PCI and FedRamp, the suite is fully compliant with different organizational and regulatory policies.

As the hybrid cloud transitions from being a technical innovation to an absolute necessity, this ‘management-as-a-service’ platform should prove indispensable.

To get started with OMS, visit http://www.microsoft.com/en-us/cloud-platform/operations-management-suite

Skype for Business Server CU5 で Azure 上の Web App を利用できます。

$
0
0

こんばんは、UC サポートのワトソンです。

先日、Skype for Business Server 2015 の CU 5 がリリースされました。
それに伴い、会議リンクの URL の中で、Skype for Business のクライアントがインストールされているかどうかを判断するロジックを含み、
Skype Meeting App のダウンロード先を  Azure 上に指定する事が可能になりました。

それに伴い、Firefox/Chrome/IE/Edge のブラウザーの仕様変更により、突然会議に参加ができなくなるなど、
影響を受けやすい、オンプレミスの Skype for Business Web App を常に最新番がリリースされている、Microsoft のクラウド上のプラグインに差し替える事が可能となりました。
これには Hybrid 構成などは不要となり、コマンド一つで実施が可能です。

これにより、オンプレミス環境での更新プログラムの適用をしなくとも、エンドユーザーや外部組織のユーザーに常に最新のエクスペリエンスを提供する事が可能になりました。

この変更をしていただく事で、たとえば、先日 ESR 番ではない、Firefox にて NPAPI の無効化により Skype 会議に入れなくなっていた問題も解決する事が可能となります。

まず、前提条件としては、以下の URL から取得できる最新の Skype for Business Server 2015 CU5 がインストールされている必要がございます。

https://www.microsoft.com/en-us/download/details.aspx?id=47690

その後、Skype for Business Server 2015 の管理シェルより、以下の手順を実行します。

1.現在の設定を確認するため、Get-CsWebServiceConfiguration を実行します。

*上記の通り、MeetingUxUseCdn が False になっている事から、組織の会議に参加をした場合は、オンプレミスのサーバーから Skype for Business Meeting Plugin がダウンロードされます。
CU 5 のインストールにより、 JoinLauncherCdnConfigUri に https://meeting.sfbassets.com/joinux/proc/config.json ファイルが規定で入っております。

2. 次に、Set-CsWebServiceConfiguration -identity Global -meetingUxUseCDN $True を実行し、Join Launcher が Azure 上のコードが利用されるように設定します。

3. 最後に、再度、Get-CsWebServiceConfiguration を実行し、パラメターが変更されている事を確認します。

*上記の出力結果からも、MeetingUxUseCdn が True になっている事が分かります。

その後、会議に参加をする際、?sl=1 を URL の最後につける事で、Web App での参加を強制し、動作確認をします。

会議 URL にアクセスをすると、URL 自体は、Skype for Business オンプレミスのサーバーとなりますが、画面は Azure 上の CDN のページとなり、すぐに、Skype Meetings App のダウンロードが促されます。

ダウンロードをしインストールができましたら、[会議に参加] をクリックします。

ブラウザーによっては、今後、リンクの関連づけを自動化するため、以下のような画面が表示されますので、リンクを今後、Skype Meetings App で開くように操作をします。
このタイミングで別画面で会議のプラグインが起動しますが、こちらは IE のコンポーネントが利用される、ShellApp として起動し、各ブラウザーで統一された動作となります。

ゲスト参加をする場合には、ゲストの名前を入れ、参加をクリックします。 

ブラウザーによっては、さらに、Skype Meetings App の起動を許可する必要がありますので、適切な操作を実施します。

会議参加が完了しましたら、クラウド上から取得した、会議プラグインで、オンプレミスの会議への参加が完了です。

注意:
1. この設定を実施すると、ShellApp が利用されますが、裏では IE コンポーネントが利用されるため、IE はかならず、最新番 (IE 11) である必要があります。
2. プラグインを実施する際、エンドユーザーの端末では以下の URL へのアクセスが実施されます。
https://meeting.sfbassets.com
https://xxx.vo.msecnd.net

プロキシー経由もしくは直接上記 URL へのアクセスができるよう構成していただけますようお願いいたします。

引き続き、Microsoft UC 製品をどうぞよろしくお願いいたします。

 

 

ありがとうございました!

$
0
0

de:code 2017、大変多くのお客様にご来場いただき無事にメインの 2 日間を終了することができました。

関係者一同、御礼申し上げます。

ありがとうございました。

 

明日から2日間の Hack Days もありますので、Hack Days ご参加の皆様は引き続きお会いできることを楽しみにしております。

グローバルなオンライン経済に大きな役割をもたらす「信頼醸成措置」

$
0
0

2017 1 18 Paul Nicholas – Trustworthy Computing、シニア ディレクター

このポストは「Confidence building measures can make a huge difference to the global online economy 」の翻訳です。

インターネットと関連技術の継続的な進化は、政府、企業、および一般市民に新たな機会をもたらしましたが、同時にそれらを新しいリスクにさらすことにもなりました。しかし、インターネットはどこでも同じように採用されているのではなく、各国や経済はそれぞれ異なる方法、異なるペースでオンライン化されています。このため、サイバー リスクの認識とその管理アプローチは、管轄区域によって大きく異なる可能性があります。これは特に新興経済国の場合に顕著で、一般的にそうした国々は、ヨーロッパや米国の先進国市場とは大きく異なるオンライン化の過程をたどっています。このギャップを確実に解決できる方法の 1 つが、信頼醸成措置 (CBM) を使用することです。

CBM は、グローバルなオンライン経済全体に適切なサイバーセキュリティ プラクティスを浸透させることを目的としたもので、ある国がサイバースペースに登場する早期段階で実施可能な、サイバーセキュリティ上重要な作業に焦点を当てています。CBM は、インターネットに対する国のアプローチの根幹にベスト プラクティスを組み込むことにより、サイバー犯罪全般に対する脆弱性を軽減するのに役立つだけでなく、サイバーセキュリティの規範の目的を補完することもできます。なぜなら、CBM は、政府の行動の透明性を高め、共通の利害領域を軸に協力関係を推し進めることによって、オンラインでの国家間の対立が深刻化するリスクを軽減することを目指しているからです。CBM は、ベスト プラクティスを共有してサイバー能力強化を実現するための手段としても使用できます。これらが組み合わさると、CBM は一層注目に値するものになります。

CBM は特に、ごく最近のインターネットの急激な成長を経験した経済と深い関連があります。過去 20 年にわたってインターネットの段階的な成長を経験してきた先進経済国と異なり、新興経済国のユーザーには、その行動をオンラインで徐々に調整していく機会がほとんどありませんでした。一般的に、インターネット アクセスの増加と技術開発の成熟化は、サイバーセキュリティの向上と相関しています。しかし、マイクロソフトの調査によると、一部の新興経済国は、市民、企業、および政府自身によるコンピューター システムの使用増に見合った ICT インフラストラクチャ保護体制が整っていないことがわかっています。このようなサイバーセキュリティ ギャップは、関係諸国にとって極めて深刻な結果を招きかねません。しかし、それだけでなく、インターネットはグローバル レベルで相互に接続されているため、一部分の弱点がその他の部分にとって脅威となるおそれもあります。現在のオンライン ユーザーである 30 億人の大半はグローバル サウスに属しているため、このギャップから生じる問題は、地球の総合的なサイバーセキュリティの弱点になると同時に、サイバー紛争リスクの点から見ると現実世界のセキュリティの弱点にもなります。

政府は上述の課題に気付いていないわけではありません。サイバーセキュリティ ポリシー、ガイドライン、および規制の分布と経緯をざっと眺めると、世界の 60% 以上が、自国の重要なシステムの保護またはサイバー犯罪者の逮捕を支援する法律の策定を目的として、現在何らかのサイバーセキュリティ フレームワークの策定に取り組んでいます。ここがまさに、CBM の構想のように、サイバーセキュリティでのコラボレーションが特に有益だと考えられる部分です。さらに、CBM の効果はグローバルなオンライン エコシステムそのものにとっても現実のものです。政府はオンラインの犯罪活動を国境内に留めようとイニシアチブを取っているにもかかわらず、サイバースペースは今も変わらずグローバルな取り組みです。したがって、協力関係を向上させるだけでなく、サイバーセキュリティ プラクティスの全体的なレベルと一貫性も向上させることが、従来の国境を何とも思わないサイバー犯罪者に対処する最適な方法です。

また、相当な経済的利点も得られます。G20 GDP に対するデジタル経済の貢献額は、2010 年には 2 3,000 億ドル、2016 年には推定 4 兆ドルで、年率 10% で増加しています。新興市場の場合は、さらに大きい効果が見込めることが調査からわかっています。確かに、CBM とサイバーセキュリティ トレーニングによってローカルで育成されるスキルは、高額な外部の人材に頼ることなくローカル ビジネスが拡大、革新できるようにするために必要なスキルと一致します。

このような理由すべてから、CBM の事例は説得力があります。CBM によって、各国はグローバルなオンライン環境を進んでいく能力を身に付けることができるほか、国際的な支援要求に実際の業務で応えることもできるようになります。さらに CBM は、ある国の民間機関と公的機関がより幅広いセキュリティ専門家のコミュニティに参加する場合にも役立ち、保護から検出、対応、回復までの活動全体に全員が携わることができるようになります。しかし、実行は必ずしも容易ではありません。すべての人間がインターネットおよび生活の中心になりつつある技術を信用するために必要な信頼を実現するには、私たち全員がこの取り組みこの取り組みを通じて政府間、企業/政府間で一致協力し、効果的かつ実践的な CBM の国際的集大成の作成と促進にあたる必要があります。

Logic Apps, VNET and other network connectivity

$
0
0

As Logic Apps is a multi-tenant PaaS offering, there isn’t a server instance dedicated to you that you can host or connect to your own VNET. You do have multiple options for network connectivity of Logic Apps:

  • Use Azure API Management as it can be configured to work across VNET.
  • Proxy the calls from Logic Apps to an on-premises service via a API/Web App or Function. The API/Web App or Azure Function comes with an App Service plan which lets you associate it with a VNET.
  • Leverage the PowerBI On-premises data gateway for a number of popular services – file, SQL, SAP, Oracle, MySQL.

Related to this topic you may want to read Microsoft’s IT Showcase “Redesigning network topology for modern app architecture”.

 

DbMgrPartnerCommitPolicy::SetSyncState May Seem More Mysterious than It Actually Is

$
0
0

AlwaysOn has become a major SQL Server technology. In my own process of learning it, I have often wondered what this mysterious message means.

DbMgrPartnerCommitPolicy::SetSyncState: 00000026BD96D330:4

Decoding it may help others out there settle the fear of the unknown.

1. This message indicates the Synchronization state of an AlwaysOn partner: thus the ”  DbMgrPartnerCommitPolicy::SetSyncState

2. The long pointer-formatted hexadecimal number after the colon (:) is a pointer (memory address) to one of the AlwaysOn partners.
In the example above the value is 00000026BD96D330.
It certainly remains a mystery though which partner it is. This is not the GUID replica ID that is stored in many DMVs like sys.dm_hadr_database_replica_states. It is a memory address, so it is not particularly useful.

3. The last component is the integer value at the end (one following the second colon). In this case the number is 4.

Here are the possible states:

0 – Not Joined to AG
1 – Not Synchronized
2 – Suspended
4 – Synchronized
8 – Redo (redoing log)

Knowing all this, I personally don’t look at this message much, but prefer to look at the text message in the SQL Server Errorlog. Those message provide human-readable information that is more readily accessible to the user and allow for a smooth, albeit patience-filled examination of the sequence of events.

Examples of such messages include:

The availability group 'AG1' is being asked to stop the lease renewal because the availability group is going offline. This is an informational message only. No user action is required.

The availability group database "AG1" is changing roles from "PRIMARY" to "RESOLVING" because the mirroring session or availability group failed over due to role synchronization. This is an informational message only. No user action is required.

AlwaysOn Availability Groups connection with secondary database terminated for primary database 'AG1' on the availability replica 'SERVER1INSTA' with Replica ID: {80167511-8000-3687-adb4-6d7fe62faddD}. This is an informational message only. No user action is required.

Configuration Manager Updates and Servicing PowerShell automation coming to 1705 TP

$
0
0

By popular demand, we have added several new cmdlets in the 1705 TP for automating updates and servicing in Configuration Manager. Moving forward this should greatly simplify automated lab deployments and update scenarios.

These cmdlets allow you to do all of the same functionality that you can do in the UI: get updates, download updates, perform a prerequisite check, install updates, and monitor updates installation.

In this post, I will walk through a few scenarios and how you can now automate them in PowerShell.

New cmdlets for updates and servicing automation

The following new cmdlets have been created to automate updates and servicing scenarios:

  • Enable-CMSiteFeature – Used to enable a pre-release feature. Note that this is a one-way operation so there’s no corresponding Disable-CMSiteFeature cmdlet.
  • Get-CMSiteFeature – Gets the available features for the site.
  • Get-CMSiteUpdate – Gets the available updates for the site.
  • Get-CMSiteUpdateHistory – Gets the update history. This is only for informational purposes.
  • Get-CMSiteUpdateInstallStatus – Gets the install status for a particular update. This can be used for monitoring.
  • Install-CMSiteUpdate – Installs an update and allows for optionally skipping prerequisite checking and specifying a pre-release collection.
  • Invoke-CMSitePromotePreproductionClient – Promotes a pre-production client.
  • Invoke-CMSiteUpdateCheck – Checks with Microsoft for any updates to Configuration Manager.
  • Invoke-CMSiteUpdateDownload – Downloads an available update.
  • Invoke-CMSiteUpdatePrerequisiteCheck – Performs a prerequisite check for an update.

In addition to these new cmdlets, Set-CMHierarchySetting has been updated to allow for enabling pre-release features with the –EnablePrereleaseFeature parameter. Note that this is a one-way operation and once you enable pre-release features you cannot disable them.

We hope you find these new cmdlets useful for automating updates and servicing scenarios. Please report any bugs or issues you find with these new cmdlets on UserVoice or Connect.

Examples

Download an update and monitor its status

# Get the update object for the 1704 TP and invoke a download
$update = Get-CMSiteUpdate -Name "Configuration Manager Technical Preview 1704" -Fast
$update | Invoke-CMSiteUpdateDownload

# Now monitor the download status

while($true) {
    cls
   $update | Get-CMSiteUpdateInstallStatus  -Step Download | select orderid, progress, description | ft
    sleep 5
}

This will produce an output like this:

orderid progress description
------- -------- -----------
      0      100 Processing update package. Check dmpdownloader.log for details.
      1        0 If your service connection point is online, the update package cab is downloaded. If your service connection point is offline, this step ...
      2        0 Extracting update package payload. Check dmpdownloader.log for details.
      3        0 If redistributable files are required and not included with the update, they are downloaded.  If files do not need to be downloaded, this...
      4        0 The update package has been reported as downloaded. Check dmpdownloader.log and hman.log for details.

Perform a prerequisite check and monitor its status

$update = Get-CMSiteUpdate -Name "Configuration Manager Technical Preview 1704" -Fast
$update | Invoke-CMSiteUpdatePrerequisiteCheck

while($true) {
    cls
    $update | Get-CMSiteUpdateInstallStatus -Step Prerequisite | select orderid, progress, description | ft
    sleep 5
}

This will produce an output like this:

orderid progress description
------- -------- -----------
      0      100 Verifies that the logged on user account has administrative rights on the site system computer.
      0      100 Starting with version 1706, Upgrade Assessment Toolkit is no longer supported. https://go.microsoft.com/fwlink/?linkid=841654
      1      100 Verifies that the user running Setup has local administrator rights on the central administration site server.
      2      100 Checks if the user account running Setup has sysadmin rights on the SQL Server for the CAS.
      3      100 Check Server Service (LanmanServer) is running.
      4      100 Verifies that the computer specified for installation is a member of a Windows domain.
      5      100 Verify that the Active Directory domain functional level is Windows Server 2003 or later.
      6      100 Checks that the site server computer has sufficient available disk space to install the site server.
      7      100 Checks if a system restart is pending.
      8      100 Checking unsupported Read-Only Domain Controller on site server.
      9      100 Checking Site Server FQDN Length.
     10      100 Verifies that the Microsoft Core XML Services (MSXML) version 6.0 or later libraries are installed.
     11      100 Determines if the Windows Server 2003-based schannel hotfix is installed on the site server.
     12      100 Verifies that the Microsoft Remote Differential Compression (RDC) library is registered on the computer specified for Configuration Manag...
     13      100 Checking Windows Installer Version >= 4.5.
     14      100 Checks if the target site server computer already has existing Configuration Manager server components installed.
     15      100 Checks if the Windows Firewall is disabled or if a relevant Windows Firewall exception exists for SQL Server.
     16      100 Checks if the Windows Firewall is disabled or if a relevant Windows Firewall exception exists for SQL Server.
     17      100 Check SQL Server service running account.
     18      100 Check to see if the selected SQL Server instance is already in use by another Configuration Manager site
     19      100 Verifies that the site server's database collation matches the database collation of its parent site.
     20      100 Verifies that the Microsoft .NET Framework version 3.5 is installed on Configuration Manager central administration site servers, primary...
     21      100 Checks whether the Windows Deployment Tools component of Windows Assessment and Deployment Kit (ADK) for Windows 10 is installed.
     22      100 Checks whether the User State Migration Tool (USMT) component of Windows Assessment and Deployment Kit (ADK) for Windows 10 is installed.
     23      100 Checks if the FQDN provided for the site system uses the primary DNS hostname for the computer.
     24      100 Checks if the specified site code is already in use by another site in your hierarchy.
     25      100 Check the parent Central Administration Site has the same version.
     26      100 Verifies that the SQL Server instance and Configuration Manager site database (if present) are configured to use a supported collation.
     27      100 Verifies that the site server is processing critical inboxes in a timely fashion, and that inboxes do not contain files older than one day.
     29      100 Verifies that all distribution points in the site have the latest version of software distribution packages.
     30      100 Verifies that the SQL Server database collation settings of the tempdb database and site database to be upgraded are the same.
     31      100 Share Name in Package has invalid character: #.
     32      100 Verifies that SUM is not using any virtual locations for active SUPs.
     33      100 Verifies that no active source hierarchy is currently configured for migration.
     34      100 Verifies that all site servers in the hierarchy meet the Configuration Manager minimum version that is required for upgrade.
     35      100 No Active MP Replica detected
     36      100 Verifies that the replication status of the parent site is Replication Active (corresponds to status=125).
     37      100 Checking that the site system role 'Out of band service point' is not deployed.
     38      100 Checking whether the site system role 'System Health Validator' exists in the hierarchy.
     39      100 Checking whether there are software updates that are enabled for NAP
     40      100 Pre-requisite rule to verify database consistency
     41      100 Verifies that the user account running Configuration Manager Setup has been granted sysadmin SQL Server role permissions on the SQL Serve...
     42      100 Verifies that the user account running Configuration Manager Setup has been granted sysadmin SQL Server role permissions on the SQL Serve...
     43      100 Verifies that the site server computer account has administrative rights on the SQL Server and management point.
     44      100 Verifies that the version of Microsoft SQL Server installed on the computer selected to host the site database meets the minimum requirem...
     45      100 Checking the site SQL Server is not Express Edition.
     46      100 Checking the site SQL Server Tcp is enabled and set to Static port.
     47      100 Checks if the SQL Server hosting the Configuration Manager site database is using a case-insensitive collation.
     48      100 Check that the specified FQDN for the SQL Server computer is valid.
     49      100 Check target SDK machine is not Windows Cluster Node.
     50      100 Checks whether the Windows Preinstallation Environment component of Windows Assessment and Deployment Kit (ADK) for Windows 10 is installed.
     51      100 Checks if SMS Provider machine has same domain as site server.
     52      100 Checking whether there are custom Client Agent Settings that enable NAP
     53      100 Checking whether the default Client Agent Settings enable NAP
     54      100 Checking secondary read state of availability group replicas
     55      100 Checking failover state of availability group replicas
     56      100 Checking availability group replicas for instance configuration
     57      100 Checks if default value is set for SQL Index Create Memory
     58      100 Starting with version 1702, Configuration Manager does not support SQL Server 2008 R2. https://go.microsoft.com/fwlink/?linkid=841654. Th...
     59      100 Verifies that the site server operating system meets the minimum requirement of Windows Server 2008 R2 for site server installation.
     61      100 Starting with version 1702, Configuration Manager does not support Windows Server 2008 R2 operating system. https://go.microsoft.com/fwli...
     62      100 Verifies that the site system to be upgraded meets the minimum operating system requirement of Windows Server 2008 R2 for site system ins...
     63      100 Starting with version 1702, Configuration Manager does not support Windows Server 2008 R2 operating system. https://go.microsoft.com/fwli...
     64      100 Starting with version 1702, Configuration Manager does not support Software Update Points on Loadbalancers (NLB/HLB).

Install an update and monitor its status

$update = Get-CMSiteUpdate -Name "Configuration Manager Technical Preview 1704" -Fast
$update | Install-CMSiteUpdate -IgnorePrerequisiteWarning -Force

while($true) {
    cls
    $update | Get-CMSiteUpdateInstallStatus -Step All -Complete | select orderid, progress, description -Last 10 | ft
    sleep 5
}

This uses the –Complete parameter for Get-CMSiteUpdateInstallStatus and only displays the completed steps. This can be useful for monitoring of long running tasks like installation.

How Kerberos user-to-user authentication works?

$
0
0
The Kerberos user-to-user (U2U) authentication mechanism enables a client to authenticate to a service that is not in possession of the long-term secret key. U2U allows one principal to authenticate using a ticket encrypted with the session key from a TGT issued to another principal. This article discusses the messages involved in the mechanism. It illustrates various scenarios and applicability settings. It finally provides samples of packet exchanges.

Table of Contents

Preamble 2
Glossary 2
Refresher: Basic Kerberos authentication 2

The Authentication Service Exchange 2
The Ticket-Granting Service Exchange 3
The Client / Application Server Exchange 3
User-to-User Authentication Exchange 3
User-to-User Mechanism 3
User-to-User GSS-API messages 4
User-to-User tickets are not cached 5
How is U2U authentication initiated? 5
Deliberate client awareness 5
U2U via KDC policy 5
U2U via server policy 5
U2U illustrations 5
Deliberate Kerberos U2U from client: CredSSP in Remote Desktop Session 5
Kerberos U2U: Enabling SSO with NTLM for smart card sign-in 6
Kerberos U2U via KDC policy: Offering Remote Assistance 6
Conclusion 7
Appendix 1. Related Kerberos Error codes 7
Appendix 2. Steps of standard CredSSP’s Kerberos U2U from client 8
Appendix 3. Steps of Kerberos U2U via KDC policy in Offering Remote Assistance 24
References 48

Preamble

This article is not about Public Key Cryptography Based User-to-User (PKU2U). PKU2U is used in homegroup environments to authenticate peers by leveraging local certificates between peer computers.
This article is not about Service for User and Constrained Delegation, both referred to as S4U [MS-SFU]. S4U enables an application service to obtain a Kerberos service ticket on behalf of a user (S4U2Self, S4U2Proxy).
We assume the reader is familiar with Kerberos authentication [RFC4120] and GSS-API concepts [RFC2743]. We start the article with a terse overview of basic Kerberos authentication before elaborating on U2U.

Glossary

API – Application Program Interface
AP – Application server
AS – Authentication service
GSS – Generic Security Service
KDC – Key distribution center
PAC – Privilege Account Certificate
SPN – Service Principal Name
SPNEGO – Simple and Protected GSSAPI Negotiation Mechanism
TGT – Ticket granting ticket
TGS – Ticket granting service
U2U – User-to-user

Refresher: Basic Kerberos authentication

In its classic form, the Kerberos protocol supports authentication between a client and an application server. It consists of three main message exchanges.

The Authentication Service Exchange

The AS exchange consists of KRB_AS_REQ and KRB_AS_REP. In the KRB_AS_REQ, the client requests a TGT from the KDC’s Authentication Service (AS). In the KRB_AS_REP, the AS returns the TGT, which is the user’s initial ticket meant only for use by the TGS. The TGT includes a session key that the client can use to encrypt communication with the TGS.
The TGT is encrypted with a key only known by the KDC (the KDC key is shared by all KDCs in the realm). Thus, the TGT is opaque to all entities except the KDC itself. The TGT has a short validity time (typically 10 hours).
The encrypted part of AS exchange uses the key that the client shares with the KDC.

The Ticket-Granting Service Exchange

The TGS exchange involves KRB_TGS_REQ and KRB_TGS_REP. The client requests the TGS to issue a service ticket for the target service. In the KRB_TGS_REQ, the client presents the TGT, an authenticator, and identifies the target service by its SPN.
The TGS validates the TGT and the authenticator. It then issues a service ticket. It encrypts the ticket with the long-term key that is shared by the KDC and the target service. The ticket includes the client’s identity and a copy of the session key. The TGS encrypts the client’s copy of the session key with the key that the KDC shares with the client.

The Client / Application Server Exchange

To authenticate to the server, the client composes KRB_AP_REQ and sends the service ticket along with a new authenticator to the target server. The server decrypts the ticket with its long-term key and validates the authenticator. In Windows, the service also creates an access token based on the user’s PAC.
Optionally, the client might have requested mutual authentication with the target server. If so, the target server retrieves the client’s timestamp from the authenticator, encrypts it with the session key, and returns it to the client as part of the KRB_AP_REP.

User-to-User Authentication Exchange

U2U authentication provides a method to perform authentication when the verifier does not have access to the service’s long-term key. The basic form of Kerberos authentication is not suitable for peer-to-peer authentication. The U2U variant of Kerberos enables authentication of such peers. The idea is to obtain a TGS ticket encrypted with the session key from another TGT issued to another user, instead of the long-term server key that would have not be accessible in the acceptor’s context.
The following sections summarize the user-to-user authentication sequence.

User-to-User Mechanism

The OID for user-to-user mechanism is:

1.2.840.113554.1.2.2.3

It is a child OID of GSSAPI Kerberos OID 1.2.840.113554.1.2.2.
The U2U mech-type extends the conventional Kerberos GSS-API protocol and adds a round trip with the server to retrieve the TGT from the service.

User-to-User GSS-API messages

In the GSS-API encapsulated message exchange for U2U Kerberos, the request token has an innerContextToken with a 2-octet TOK_ID field containing 04 00 (KERB-TGT-REQUEST) followed by the message:

KERB-TGT-REQUEST ::= SEQUENCE {
pvno[0]                         INTEGER,
msg-type[1]                     INTEGER,
server-name[2]                  PrincipalName OPTIONAL,
realm[3]                        Realm OPTIONAL

All fields are defined in the Kerberos RFC4120 and informational RFC draft for U2U [U2UDraft].
msg-type is KRB_TGT_REQ (16).

The response message is a KERB_TGT_REPLY token which has an innerContextToken with a 2-octet TOK_ID field containing 04 01 (KERB-TGT-REPLY) followed by the message as follows:

KERB-TGT-REPLY ::= SEQUENCE {
pvno[0]                         INTEGER,
msg-type[1]                     INTEGER,
ticket[2]                       Ticket
}
msg-type is KRB_TGT_REP (17). The ticket contains the TGT for the service.

Upon receipt of the service TGT, the client initiator can now request the KDC to issue a service ticket by using a KERB-TGS-REQ with the KDC-Options ENC-TKT-IN-SKEY and the service TGT in the additional-tickets of the KDC-REQ-BODY.
Because ENC-TKT-IN-SKEY option is present in the KRB_KDC_REQ, the Sname may be absent. However, the Sname for U2U ticket is typically set to the principal name (i.e. user name) whose TGT the server supplied to the client. If Sname is absent, the KDC will use the name from the client in the additional ticket.
The TGS honors the request and issues the ticket (KERB-TGS-REP). It encrypts the ticket with the session key of the TGT in the additional ticket.
The client finally continues with the AP exchange. In the KERB-AP-REQ, the client sets USE-SESSION-KEY flag in the AP-Options to indicate to the server that U2U authentication is in use, and that the service ticket is encrypted in the session key from the server’s TGT rather than in the server’s long-term key.

User-to-User tickets are not cached

U2U service tickets are not cacheable. A U2U ticket is only usable to one instance of a client application. On the other hand, to cache a ticket, it must be valid to all instances of the service that share that SPN. Multiple authentications that share a cacheable service ticket will likewise share a session key.
How is U2U authentication initiated?
The Kerberos protocol does not specify the client’s trigger to U2U authentication. It is in the application protocol sequence that the client obtains the server’s TGT. Once this pre-requisite is fulfilled, the client can initiate user-to-user authentication as previously described.
U2U is often used in cases where SPNEGO starts Kerberos and then fails either with KDC_ERR_MUST_USE_USER2USER from the KDC or with KRB_AP_ERR_USER_TO_USER_REQUIRED from the server.

Deliberate client awareness

When the client is aware that the application server requires user-to-user authentication, it will explicitly request U2U mechanism in the first call to GSS_Init_Sec_Context.

U2U via KDC policy

The KDC may implement a policy on user accounts to reject conventional service ticket requests. When a KERB_TGS_REQ that does not include a second ticket with an ENC_TKT_IN_SKEY KDC Option, the KDC will respond with KDC_ERR_MUST_USE_USER2USER (0x1B).

U2U via server policy

When a client sends a conventional KRB_AP_REQ and the service requires U2U authentication, the server will respond with KRB_AP_ERR_USER_TO_USER_REQUIRED (0x45). The server may provide its TGT in the data of the error message.

U2U illustrations

Deliberate Kerberos U2U from client: CredSSP in Remote Desktop Session

For Kerberos under CredSSP, the client chooses to do U2U on its own without a prior error about U2U being required. The client initiates U2U because CredSSP calls InitializeSecurityContext with the ISC_REQ_USE_SESSION_KEY flag. That flag requires a new session key, which Kerberos honors by doing U2U.
When one observes network packets of Windows-based CredSPP, the Kerberos exchanges start with a conventional TGS ticket request, which is unexpected. This conventional TGS exchange could be explained by the fact that the code that forces to transition to U2U is emulating the reception of the user-to-user required error, and thus after the point where we get the normal ticket.  That initial TGS preceding the first CredSSP TSRequest is a useless ticket retrieval. Indeed, that ticket is not presented in the TSRequest. Instead the client deliberately decides to send a U2U inside an SPNEGO token of the TSRequest.
CredSSP resorts to U2U mechanism because U2U service tickets are not cacheable. When CredSSP uses U2U, it gets a unique session key to encrypt credentials and this remains private to the process instance. Had that connection used Kerberos without U2U, then the session key used to protect the credentials would have been available to any process running as the user that shares the user’s ticket cache.
Note that the SPNEGO token of the first CSSP TSRequest has UserToUserMechanism in the MechToken = InitialContextToken{ThisMech: UserToUserMechanism (1.2.840.113554.1.2.2.3) . . .}
Even though the MechTypes list contains:
MechTypes: {MsKerberosToken (1.2.840.48018.1.2.2); KerberosToken (1.2.840.113554.1.2.2); Negoex (1.3.6.1.4.1.311.2.2.30); NLMP (1.3.6.1.4.1.311.2.2.10)}
Here, the MechType is not really being negotiated.
In the appendix, we provide illustrative packets of the exchange. The outer TLS session of the CredSSP packets has been decrypted.

Kerberos U2U: Enabling SSO with NTLM for smart card sign-in

Kerberos U2U helps to provide single-sign-on (SSO) with NTLM for a smart card sign-in. When the user logs in a client with a smartcard, Kerberos U2U enables SSO to network services that require NTLM. One such scenario is a remote desktop connection to a non-domain-joined server where the client needs to delegate its credentials to the server which is not capable of Kerberos authentication.
The client uses Kerberos U2U to retrieve the NTOWF hash of the user’s password. It starts with a PKINIT exchange of KERB_AS_REQ / KERB_AS_REP with AS-PK-REQ / AS-PK-REP as specified in [MS-PKCA]. By using the PIN to unlock the smartcard, the client reads the principal name and certificate, then signs the AS-REQ which the KDC will validate before issuing the TGT.
The client then retrieves a U2U TGS with the user name as Sname. In the U2U TGS’s KDC-REQ-BODY, the client uses the ENC-TKT-IN-SKEY option and supplies its TGT in the additional tickets. This allows to decrypt the resulting PAC (with the session key) and get the NTOWF in NTLM_SUPPLEMENTAL_CREDENTIAL.
The encrypted NTOWF is part of the PAC and thus gets propagated to service tickets that the user acquires, but only the system to which the user logs on interactively can decrypt it. This allows a user that logs on with a smartcard to acquire credentials necessary to access resources that require NTLM.
Note that the encrypted NTOWF in the PAC is not due to U2U. The client uses Kerberos U2U because a U2U ticket is un-cacheable. The session key remains privy to that process instance. When another authentication is needed, there is a separate ticket request.

Kerberos U2U via KDC policy: Offering Remote Assistance

This example illustrates U2U authentication with the trigger via KDC policy. It uses the scenario of an Expert providing an unsolicited Remote Assistance (RA) to a Novice. The Expert initiates the RA offer with “msra /offerRA <Novice-FQDN>” command.
To establish the RA session to the host identified by the Novice-FQDN, the Expert needs to obtain a Kerberos ticket to the user account of the Novice.
First, the Expert’s computer tries to obtain a Kerberos ticket for the user account on the Novice’s computer. The user account does not have any service principal name (SPN) that is registered. Thus, the KDC service on the DC returns the error KDC_S_PRINCIPAL_UNKNOWN. The extended error information conveys the client should fall back to U2U authentication (the KDC reply indicates KDC_ERR_MUST_USE_USER2USER in its extended error information).
The Expert computer sends the U2U token to the Novice’s computer and obtain the user’s TGT. In this scenario, this U2U token exchange happens as part of the MSRPC Bind because the RA session goes over DCOM (MSRPC).
The Expert computer uses an SPN with “RestrictedKrbHost” service class because it has the server name but not the identity of the service. This SPN is meant to authenticate with the server and not the service.
Afterwards, it proceeds U2U authentication exchange, as previously described.
In the appendix, we show an example of parsed packets of the exchange.

Conclusion

In this article, we discussed how Kerberos user-to-user authentication works. It is often an unspoken extension to Kerberos. We described the message exchange and provided examples of applications. The appendixes provide samples of U2U authentication exchanges.

Appendix 1. Related Kerberos Error codes

Error code, Error macro, Description
0x6, KDC_ERR_C_PRINCIPAL_UNKNOWN, Client not found in Kerberos database
0x7, KDC_ERR_S_PRINCIPAL_UNKNOWN, Server not found in Kerberos database
0x1B, KDC_ERR_MUST_USE_USER2USER, Server principal valid for user2user only
0x45, KRB_AP_ERR_USER_TO_USER_REQUIRED, User-to-user authorization is required
A network packet capture generally shows the error codes in KERB-ERROR responses. To further diagnose, the Kerberos Event log can be useful, notably when there is extended error information.
For diagnostic purpose, you can set the following registry to enable Kerberos events. This should not be left enabled on live production, otherwise it will fill up unnecessary disk space.
https://support.microsoft.com/en-us/help/262177/how-to-enable-kerberos-event-logging
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlLsaKerberosParameters
Registry Value: LogLevel
Value Type: REG_DWORD
Value Data: 0x1

Appendix 2. Steps of standard CredSSP’s Kerberos U2U from client

This client’s TGT will be used later during U2U TGS.
KerberosV5 KerberosV5:AS Request Cname: Administrator Realm: contoso4 Sname: krbtgt/contoso4
KerberosV5 KerberosV5:KRB_ERROR  – KDC_ERR_PREAUTH_REQUIRED (25)
KerberosV5 KerberosV5:AS Request Cname: Administrator Realm: contoso4 Sname: krbtgt/contoso4
KerberosV5 KerberosV5:AS Response Ticket[Realm: CONTOSO4.COM, Sname: krbtgt/CONTOSO4.COM]
The following TGS ticket (to Sname: TERMSRV/sut01tp4.contoso4.com) will not be used, although it is retrieved.
KerberosV5 KerberosV5:TGS Request Realm: CONTOSO4.COM Sname: TERMSRV/sut01tp4.contoso4.com
KerberosV5 KerberosV5:TGS Response Cname: Administrator
The client initiates U2U.
CSSP CredSSP:TSRequest, Version: 3
  TLSSSLData: Transport Layer Security (TLS) Payload Data
+ TLS: TLS Rec Layer-1 SSL Application Data
– Cssp: CredSSP
– TsRequest:
+ SequenceHeader:
+ Tag0:
+ Version: 3
+ Tag1:
– NegoTokens:
+ SequenceOfHeader:
+ SequenceHeader:
+ Tag0:
+ AsnOctetStringHeader:
– NegoToken:
– InitialContextToken:
+ ApplicationHeader:
+ ThisMech: SpnegoToken (1.3.6.1.5.5.2)
– InnerContextToken: 0x1
– SpnegoToken: 0x1
+ ChoiceTag:
– NegTokenInit:
+ SequenceHeader:
+ Tag0:
– MechTypes: Prefer MsKerberosToken (1.2.840.48018.1.2.2)
+ SequenceHeader:
+ MechType: MsKerberosToken (1.2.840.48018.1.2.2)
+ MechType: KerberosToken (1.2.840.113554.1.2.2)
+ MechType: Negoex (1.3.6.1.4.1.311.2.2.30)
+ MechType: NLMP (1.3.6.1.4.1.311.2.2.10)
+ Tag2:
+ OctetStringHeader:
– MechToken: unused (0)
– MsKerberosToken: unused (0)
– KerberosInitToken:
+ ApplicationHeader:
+ ThisMech: UserToUserMechanism (1.2.840.113554.1.2.2.3)
– InnerContextToken: unused (0)
– KerberosToken: unused (0)
TokId: 0x400
– UsertoUserSessionReq: KRB_TGT_REQ (0x10)
+ SequenceHeader:
+ Tag0:
+ pvno: 5
+ Tag1:
+ MessageType: 16
+ Tag2:
+ ServerName: TERMSRV/sut01tp4.contoso4.com
the client receives the TGT form the server.
CSSP CredSSP:TSRequest, Version: 3
  TLSSSLData: Transport Layer Security (TLS) Payload Data
+ TLS: TLS Rec Layer-1 SSL Application Data
– Cssp: CredSSP
– TsRequest:
+ SequenceHeader:
+ Tag0:
+ Version: 3
+ Tag1:
– NegoTokens:
+ SequenceOfHeader:
+ SequenceHeader:
+ Tag0:
+ AsnOctetStringHeader:
– NegoToken:
– NegotiationToken:
+ ChoiceTag:
– NegTokenResp:
+ SequenceHeader:
+ Tag0:
+ NegState: accept-incomplete (1)
+ Tag1:
+ SupportedMech: MsKerberosToken (1.2.840.48018.1.2.2)
+ Tag2:
+ OctetStringHeader:
– ResponseToken: unused (0)
– MsKerberosToken: unused (0)
– KerberosInitToken:
+ ApplicationHeader:
+ ThisMech: UserToUserMechanism (1.2.840.113554.1.2.2.3)
– InnerContextToken: unused (0)
– KerberosToken: unused (0)
TokId: 0x401
– UsertoUserSessionRep: KRB_TGT_REP (0x11)
+ SequenceHeader:
+ Tag0:
+ pvno: 5
+ Tag1:
+ MessageType: 17
+ Tag2:
– Ticket: Realm: CONTOSO4.COM, Sname: krbtgt/CONTOSO4.COM
+ ApplicationTag:
+ SequenceHeader:
+ Tag0:
+ TktVno: 5
+ Tag1:
+ Realm: CONTOSO4.COM
+ Tag2: 0x1
+ Sname: krbtgt/CONTOSO4.COM
+ Tag3: 0x1
– EncPart:
+ SequenceHeader:
+ Tag0:
+ EType: aes256-cts-hmac-sha1-96 (18)
+ Tag1:
+ KvNo: 2
+ Tag2:
+ Cipher: h:̰a—————12Bz”?Uâ*sä‘:ñ‹?ç;†·8µFnDê1@ÈwÐV8–ÄÔ÷uÊdÈvqÙÜ0 —————/¤<ϼ»¢þkÎgÈmíXeðoôfòWòùÝ?$5.—————´äŒ^´ÛÝïcJõ@ûdY’.®?`Ä×53+iw˜
¿ÞFv´&q’`™Íü…01W
PÎø.ºOç3|+g`”CRaØ]#ÊñÞ(xªþ›•â¸ô屡MŠå.05HÓö“¶ZÆQ†·&————————————————————-¾}7^a•çúÅ£Ù.´sÕL†ÖãR1—————œ{íºÄ/)” Lò[áqœU
The client requests service ticket for U2U authentication.
KerberosV5 KerberosV5:TGS Request Realm: CONTOSO4.COM Sname: TERMSRV/sut01tp4.contoso4.com
– Kerberos: TGS Request Realm: CONTOSO4.COM Sname: TERMSRV/sut01tp4.contoso4.com
+ Length: Length = 2674
– TgsReq: Kerberos TGS Request
+ ApplicationTag:
– KdcReq: KRB_TGS_REQ (12)
+ SequenceHeader:
+ Tag1:
+ Pvno: 5
+ Tag2:
+ MsgType: KRB_TGS_REQ (12)
+ Tag3:
– PaData:
+ SequenceOfHeader:
– PaData: PA-TGS-REQ (1)
+ SequenceHeader:
+ Tag1:
+ PaDataType: PA-TGS-REQ (1)
+ Tag2:
+ OctetStringHeader:
– KrbApReq: KRB_AP_REQ (14)
+ ApplicationTag:
+ SequenceHeader:
+ Tag0:
+ PvNo: 5
+ Tag1:
+ MsgType: KRB_AP_REQ (14)
+ Tag2: 0x1
+ ApOptions:
+ Tag3:
– Ticket: Realm: CONTOSO4.COM, Sname: krbtgt/CONTOSO4.COM
+ ApplicationTag:
+ SequenceHeader:
+ Tag0:
+ TktVno: 5
+ Tag1:
+ Realm: CONTOSO4.COM
+ Tag2: 0x1
+ Sname: krbtgt/CONTOSO4.COM
+ Tag3: 0x1
– EncPart:
+ SequenceHeader:
+ Tag0:
+ EType: aes256-cts-hmac-sha1-96 (18)
+ Tag1:
+ KvNo: 2
+ Tag2:
+ Cipher: ¯++ä¨OQòåc ¦¹ÿÑãIªã<»Xðë.`¾bÌÎØI?N¦ÛIXzCXaº´Æ}±?­Õ6
›D£ði­ñËÕ?ÉeÕ?J0W¬šÚDÚù ¸aŠNxDÉ»’ÓQŠh øË˜öÕ¡¼wÊ?$挪ya}|^líà@—ÎëÚ÷.ê¯z™Ÿðîö¢N‡Ù†¥¦2l QÑ=úG²R¨Mj/lÕ¾­éŒL<?—·…¸Ñ=?ãšF;ùÿ\¸Ìr“ ”
ôägùÖ°k…ÐÈÜG.Qƒ¼»IÐG¼9˜‚yDÿx«åÿ[+H=Çýmù›QÐ
+ Tag4:
+ Authenticator:
+ PaData: PA-PAC-OPTIONS (167)
+ Tag4:
– ReqBody:
+ SequenceHeader:
+ Tag0:
– KdcOptions: 0x40810008
+ KerberosFlagsHeader:
+ Padding:
– KrbFlags: 0x40810008
Reserved:              (0………………………….)
Forwardable:           (.1…………………………) Ticket to be issued is to have its FORWARDABLE flag set
Forwarded:             (..0………………………..) This is not a request for forwarding
Proxiable:             (…0……………………….) Ticket to be issued is not to have its PROXIABLE flag set
Proxy:                 (….0………………………) This is not a request for a proxy
AllowPostDate:         (…..0……………………..) Ticket to be issued is not to have its MAY_POSTDATE flag set
PostDated:             (……0…………………….) This is not a request for a postdated ticket
Unused7:               (…….0……………………)
Renewable:             (……..1…………………..) Ticket to be issued is to have its RENEWABLE flag set
Unused9:               (………0………………….)
Unused10:              (……….0…………………)
OptHardwareAuth:       (………..0………………..)
Unused12:              (…………0……………….)
Unused13:              (………….0………………)
CnameInAddlTkt:        (…………..0……………..) This is not a request for S4U2proxy functionality
Canonicalize:          (……………1…………….)
Unused16:              (…………….0000000000……)
DisableTransitedCheck: (……………………..0…..) Checking of the transited field is enabled
RenewableOk:           (………………………0….) Renewable ticket is not acceptable
EncTktInSkey:          (……………………….1…) Indicates that the ticket for the end server is to be encrypted in the session key from the additional TGT provided
Unused29:              (………………………..0..)
Renew:                 (…………………………0.) Present request is not for a renewal
Validate:              (………………………….0) Request is not to validate a postdated ticket
+ Tag2: 0x1
+ Realm: CONTOSO4.COM
+ Tag3:
+ Sname: TERMSRV/sut01tp4.contoso4.com
+ Tag5: 0x1
+ Till: 09/13/2037 02:48:05 UTC
+ Tag7:
+ Nonce: 794422766 (0x2F59EDEE)
+ Tag8:
+ Etype:
+ TagA:
+ EncAuthorizationData:
+ TagB:
– AdditionalTickets:
+ SequenceOfHeader:
– Ticket: Realm: CONTOSO4.COM, Sname: krbtgt/CONTOSO4.COM
+ ApplicationTag:
+ SequenceHeader:
+ Tag0:
+ TktVno: 5
+ Tag1:
+ Realm: CONTOSO4.COM
+ Tag2: 0x1
+ Sname: krbtgt/CONTOSO4.COM
+ Tag3: 0x1
– EncPart:
+ SequenceHeader:
+ Tag0:
+ EType: aes256-cts-hmac-sha1-96 (18)
+ Tag1:
+ KvNo: 2
+ Tag2:
+ Cipher: h:̰a—————12Bz”?Uâ*sä‘:ñ‹?ç;†·8µFnDê1@ÈwÐV8–ÄÔ÷uÊdÈvqÙÜ0 —————/¤<ϼ»¢þkÎgÈmíXeðoôfòWòùÝ?$5.—————´äŒ^´ÛÝïcJõ@ûdY’.®?`Ä×53+iw˜
¿ÞFv´&q’`™Íü…01W
PÎø.ºOç3|+g`”CRaØ]#ÊñÞ(xªþ›•â¸ô屡MŠå.05HÓö“¶ZÆQ†·&————————————————————-¾}7^a•çúÅ£Ù.´sÕL†ÖãR1—————œ{íºÄ/)” Lò[áqœU
KerberosV5 KerberosV5:TGS Response Cname: Administrator
– Kerberos: TGS Response Cname: Administrator
+ Length: Length = 1638
– TgsRep: Kerberos TGS Response
+ ApplicationTag:
– KdcRep: KRB_TGS_REP (13)
+ SequenceHeader:
+ Tag0:
+ PvNo: 5
+ Tag1:
+ MsgType: KRB_TGS_REP (13)
+ Tag3:
+ Crealm: CONTOSO4.COM
+ Tag4:
+ Cname: Administrator
+ Tag5:
– Ticket: Realm: CONTOSO4.COM, Sname: TERMSRV/sut01tp4.contoso4.com
+ ApplicationTag:
+ SequenceHeader:
+ Tag0:
+ TktVno: 5
+ Tag1:
+ Realm: CONTOSO4.COM
+ Tag2: 0x1
+ Sname: TERMSRV/sut01tp4.contoso4.com
+ Tag3: 0x1
– EncPart:
+ SequenceHeader:
+ Tag0:
+ EType: aes256-cts-hmac-sha1-96 (18)
+ Tag2:
+ Cipher: ­[¼ˆÀfÙ÷&v.’æÿÒ~”´Ñ95D³3›Ø‹éæD@OÆæÆþ@œ¹oÙÁ}&&MáÛ`? ‘oh¼õÎýƒíˆû—————÷68”öR®˜ÏïV‹?ö5¾_ú>´I4˜
?ØDχɚ&”ù«yaøýª·mv?ïa%ß À
+ Tag6:
+ EncPart:
CSSP CredSSP:TSRequest, Version: 3
  TLSSSLData: Transport Layer Security (TLS) Payload Data
+ TLS: TLS Rec Layer-1 SSL Application Data
– Cssp: CredSSP
– TsRequest:
+ SequenceHeader:
+ Tag0:
+ Version: 3
+ Tag1:
– NegoTokens:
+ SequenceOfHeader:
+ SequenceHeader:
+ Tag0:
+ AsnOctetStringHeader:
– NegoToken:
– NegotiationToken:
+ ChoiceTag:
– NegTokenResp:
+ SequenceHeader:
+ Tag0:
+ NegState: accept-incomplete (1)
+ Tag2:
+ OctetStringHeader:
– ResponseToken: unused (0)
– KerberosToken: unused (0)
– KerberosInitToken:
+ ApplicationHeader:
+ ThisMech: UserToUserMechanism (1.2.840.113554.1.2.2.3)
– InnerContextToken: unused (0)
– KerberosToken: unused (0)
TokId: Krb5ApReq (0x100)
– ApReq: KRB_AP_REQ (14)
+ ApplicationTag:
+ SequenceHeader:
+ Tag0:
+ PvNo: 5
+ Tag1:
+ MsgType: KRB_AP_REQ (14)
+ Tag2: 0x1
– ApOptions:
+ KerberosFlagsHeader:
+ Padding:
– KrbFlags: 0x60000000
Reserved:       (0………………………….)
UseSessionKey:  (.1…………………………)
MutualRequired: (..1………………………..)
Unused:         (…00000000000000000000000000000)
+ Tag3:
– Ticket: Realm: CONTOSO4.COM, Sname: TERMSRV/sut01tp4.contoso4.com
+ ApplicationTag:
+ SequenceHeader:
+ Tag0:
+ TktVno: 5
+ Tag1:
+ Realm: CONTOSO4.COM
+ Tag2: 0x1
+ Sname: TERMSRV/sut01tp4.contoso4.com
+ Tag3: 0x1
– EncPart:
+ SequenceHeader:
+ Tag0:
+ EType: aes256-cts-hmac-sha1-96 (18)
+ Tag2:
+ Cipher: ­[¼ˆÀfÙ÷&v.’æÿÒ~”´Ñ95D³3›Ø‹éæD@OÆæÆþ@œ¹oÙÁ}&&MáÛ`? ‘oh¼õÎýƒíˆû—————÷68”öR®˜ÏïV‹?ö5¾_ú>´I4˜
?ØDχɚ&”ù«yaøýª·mv?ïa%ß À
+ Tag4:
+ Authenticator:
CSSP CredSSP:TSRequest, Version: 3
  TLSSSLData: Transport Layer Security (TLS) Payload Data
+ TLS: TLS Rec Layer-1 SSL Application Data
– Cssp: CredSSP
– TsRequest:
+ SequenceHeader:
+ Tag0:
+ Version: 3
+ Tag1:
– NegoTokens:
+ SequenceOfHeader:
+ SequenceHeader:
+ Tag0:
+ AsnOctetStringHeader:
– NegoToken:
– NegotiationToken:
+ ChoiceTag:
– NegTokenResp:
+ SequenceHeader:
+ Tag0:
+ NegState: accept-incomplete (1)
+ Tag2:
+ OctetStringHeader:
– ResponseToken: KRB_AP_REP (15)
– KerberosToken: KRB_AP_REP (15)
– KerberosInitToken:
+ ApplicationHeader:
+ ThisMech: UserToUserMechanism (1.2.840.113554.1.2.2.3)
– InnerContextToken: KRB_AP_REP (15)
– KerberosToken: KRB_AP_REP (15)
TokId: Krb5ApRep (0x200)
+ ApRep: KRB_AP_REP (15)
+ Tag3:
+ OctetStringHeader:
+ MechListMic: KRB_AP_REP (15)
CSSP CredSSP:TSRequest, Version: 3
  TLSSSLData: Transport Layer Security (TLS) Payload Data
+ TLS: TLS Rec Layer-1 SSL Application Data
– Cssp: CredSSP
– TsRequest:
+ SequenceHeader:
+ Tag0:
+ Version: 3
+ Tag1:
– NegoTokens:
+ SequenceOfHeader:
+ SequenceHeader:
+ Tag0:
+ AsnOctetStringHeader:
– NegoToken:
– NegotiationToken:
+ ChoiceTag:
– NegTokenResp:
+ SequenceHeader:
+ Tag0:
+ NegState: accept-completed (0)
+ Tag3:
+ OctetStringHeader:
– MechListMic: unused (0)
– KerberosToken: unused (0)
TokId: GSS_GetMIC (0x404)
– Krb5GssV2GetMic:
+ Flags: 4 (0x4)
Filler: Binary Large Object (5 Bytes)
SndSeq: 792999904 (0x2F4437E0)
SgnCksum: Binary Large Object (218 Bytes)
CSSP CredSSP:TSRequest, Version: 3
  TLSSSLData: Transport Layer Security (TLS) Payload Data
+ TLS: TLS Rec Layer-1 SSL Application Data
– Cssp: CredSSP
– TsRequest:
+ SequenceHeader:
+ Tag0:
+ Version: 3
+ Tag3:
+ PubKeyAuth: Encrypted
CSSP CredSSP:TSRequest, Version: 3
  TLSSSLData: Transport Layer Security (TLS) Payload Data
+ TLS: TLS Rec Layer-1 SSL Application Data
– Cssp: CredSSP
– TsRequest:
+ SequenceHeader:
+ Tag0:
+ Version: 3
+ Tag2:
+ AuthInfo: Encrypted

Appendix 3. Steps of Kerberos U2U via KDC policy in Offering Remote Assistance

KerberosV5:AS Request Cname: myuser01 Realm: CONTOSO.COM Sname: krbtgt/CONTOSO.COM
KerberosV5:KRB_ERROR  – KDC_ERR_PREAUTH_REQUIRED (25)
KerberosV5:AS Request Cname: myuser01 Realm: CONTOSO.COM Sname: krbtgt/CONTOSO.COM
KerberosV5:AS Response Ticket[Realm: CONTOSO.COM, Sname: krbtgt/CONTOSO.COM]
KerberosV5:TGS Request Realm: CONTOSO.COM Sname: RestrictedKrbHost/sut2016rs1.contoso.com
KerberosV5:TGS Response Cname: myuser01
. . .
KerberosV5:TGS Request Realm: CONTOSO.COM Sname: krbtgt/CONTOSO
KerberosV5:TGS Response Cname: myuser01
KerberosV5:TGS Request Realm: CONTOSO.COM Sname: Administrator
 – Kerberos: TGS Request Realm: CONTOSO.COM Sname: Administrator
+ Length: Length = 1542
– TgsReq: Kerberos TGS Request
+ ApplicationTag:
– KdcReq: KRB_TGS_REQ (12)
+ SequenceHeader:
+ Tag1:
+ Pvno: 5
+ Tag2:
+ MsgType: KRB_TGS_REQ (12)
+ Tag3:
– PaData:
+ SequenceOfHeader:
– PaData: PA-TGS-REQ (1)
+ SequenceHeader:
+ Tag1:
+ PaDataType: PA-TGS-REQ (1)
+ Tag2:
+ OctetStringHeader:
– KrbApReq: KRB_AP_REQ (14)
+ ApplicationTag:
+ SequenceHeader:
+ Tag0:
+ PvNo: 5
+ Tag1:
+ MsgType: KRB_AP_REQ (14)
+ Tag2: 0x1
+ ApOptions:
+ Tag3:
+ Ticket: Realm: CONTOSO.COM, Sname: krbtgt/CONTOSO.COM
+ Tag4:
+ Authenticator:
+ Tag4:
– ReqBody:
+ SequenceHeader:
+ Tag0:
+ KdcOptions: 0x40810000
+ Tag2: 0x1
+ Realm: CONTOSO.COM
+ Tag3:
+ Sname: Administrator
+ Tag5: 0x1
+ Till: 09/13/2037 02:48:05 UTC
+ Tag7:
+ Nonce: 1167598226 (0x45982292)
+ Tag8:
+ Etype:
+ TagA:
+ EncAuthorizationData:
KerberosV5:KRB_ERROR  – KDC_ERR_S_PRINCIPAL_UNKNOWN (7)
– Kerberos: KRB_ERROR  – KDC_ERR_S_PRINCIPAL_UNKNOWN (7)
+ Length: Length = 105
– KrbError: KRB_ERROR (30)
+ ApplicationTag:
+ SequenceHeader:
+ Tag0:
+ PvNo: 5
+ Tag1:
+ MsgType: KRB_ERROR (30)
+ Tag4:
+ Stime: 04/08/2017 06:06:33 UTC
+ Tag5:
+ SuSec: 429948
+ Tag6:
+ ErrorCode: KDC_ERR_S_PRINCIPAL_UNKNOWN (7)
+ Tag9:
+ Realm: CONTOSO.COM
+ TagA:
+ Sname: Administrator
+ TagC:
– EData:
– EData: 0
0  —————?¡————————————————————
+ AsnOctetStringHeader:
OctetStream: 04 0D 30 0B 30 09 A0 03 02 01 80 A1 02 04 00
In the Kerberos error message, the extended error data has
Error Code: 0x1b KDC_ERR_MUST_USE_USER2USER
The Kerberos event log entry looks like the following:
– <Event xmlns=”http://schemas.microsoft.com/win/2004/08/events/event”>
– <System>
<Provider Name=”Microsoft-Windows-Security-Kerberos” Guid=”{98E6CFCB-EE0A-41E0-A57B-622D4E1B30B1}” EventSourceName=”Kerberos” />
<EventID Qualifiers=”32768″>3</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime=”2017-04-08T06:06:33.640231200Z” />
<EventRecordID>8201</EventRecordID>
<Correlation />
<Execution ProcessID=”0″ ThreadID=”0″ />
<Channel>System</Channel>
<Computer>client2016rs1.contoso.com</Computer>
<Security />
</System>
– <EventData>
<Data Name=”LogonSession” />
<Data Name=”ClientTime” />
<Data Name=”ServerTime”>6:6:33.0000 4/8/2017 Z</Data>
<Data Name=”ErrorCode”>0x1b</Data>
<Data Name=”ErrorMessage”>Unknown Error</Data>
<Data Name=”ExtendedError” />
<Data Name=”ClientRealm” />
<Data Name=”ClientName” />
<Data Name=”ServerRealm”>CONTOSO.COM</Data>
<Data Name=”ServerName”>Administrator</Data>
<Data Name=”TargetName”>Administrator@CONTOSO.COM</Data>
<Data Name=”ErrorText” />
<Data Name=”File”>9</Data>
<Data Name=”Line”>11b8</Data>
<Binary>300B3009A003020180A1020400</Binary>
</EventData>
</Event>
the client sends UsertoUserSessionReq: KRB_TGT_REQ (0x10) to the server.
– MSRPC: c/o Bind: unknown UUID{00000001-0000-0000-C000-000000000046}  Call=0x2  Assoc Grp=0x0  Xmit=0x16D0  Recv=0x16D0
– Bind: {00000001-0000-0000-C000-000000000046} unknown
RpcVers: 5 (0x5)
RpcVersMinor: 0 (0x0)
PType: 0x0B – Bind
+ PfcFlags: 7 (0x7)
+ PackedDrep: 0x10
FragLength: 304 (0x130)
AuthLength: 136 (0x88)
CallId: 2 (0x2)
MaxXmitFrag: 5840 (0x16D0)
MaxRecvFrag: 5840 (0x16D0)
AssocGroupId: 0 (0x0)
+ PContextElem:
– AuthVerifier: 0x1
AuthType: RPC_C_AUTHN_GSS_NEGOTIATE – The Simple and Protected GSS-API Negotiation (SPNEGO) mechanism selects either NT LAN Manager (NTLM) or Kerberos authentication.
AuthLevel: dce_c_authn_level_pkt_integrity – This level offers the dce_c_authn_level_pkt services plus per-PDU modification and deletion detection.
AuthPadLength: 0 (0x0)
AuthReserved: 0 (0x0)
AuthContextId: 0 (0x0)
– AuthValue:
– GssApi:
– InitialContextToken:
+ ApplicationHeader:
+ ThisMech: SpnegoToken (1.3.6.1.5.5.2)
– InnerContextToken: 0x1
– SpnegoToken: 0x1
+ ChoiceTag:
– NegTokenInit:
+ SequenceHeader:
+ Tag0:
– MechTypes: Prefer MsKerberosToken (1.2.840.48018.1.2.2)
+ SequenceHeader:
+ MechType: MsKerberosToken (1.2.840.48018.1.2.2)
+ MechType: KerberosToken (1.2.840.113554.1.2.2)
+ MechType: Negoex (1.3.6.1.4.1.311.2.2.30)
+ MechType: NLMP (1.3.6.1.4.1.311.2.2.10)
+ Tag2:
+ OctetStringHeader:
– MechToken: unused (0)
– MsKerberosToken: unused (0)
– KerberosInitToken:
+ ApplicationHeader:
+ ThisMech: UserToUserMechanism (1.2.840.113554.1.2.2.3)
– InnerContextToken: unused (0)
– KerberosToken: unused (0)
TokId: 0x400
– UsertoUserSessionReq: KRB_TGT_REQ (0x10)
+ SequenceHeader:
+ Tag0:
+ pvno: 5
+ Tag1:
+ MessageType: 16
+ Tag2:
+ ServerName: Administrator
+ Tag3:
+ Realm: CONTOSO
The server requests TGT for the user from the KDC.
KerberosV5:AS Request Cname: Administrator Realm: CONTOSO.COM Sname: krbtgt/CONTOSO.COM
KerberosV5:KRB_ERROR  – KDC_ERR_PREAUTH_REQUIRED (25)
KerberosV5:AS Request Cname: Administrator Realm: CONTOSO.COM Sname: krbtgt/CONTOSO.COM
– Kerberos: AS Request Cname: Administrator Realm: CONTOSO.COM Sname: krbtgt/CONTOSO.COM
+ Length: Length = 312
– AsReq: Kerberos AS Request
+ ApplicationTag:
– KdcReq: KRB_AS_REQ (10)
+ SequenceHeader:
+ Tag1:
+ Pvno: 5
+ Tag2:
+ MsgType: KRB_AS_REQ (10)
+ Tag3:
+ PaData:
+ Tag4:
– ReqBody:
+ SequenceHeader:
+ Tag0:
+ KdcOptions: 0x40810010
+ Tag1:
+ Cname: Administrator
+ Tag2: 0x1
+ Realm: CONTOSO.COM
+ Tag3:
+ Sname: krbtgt/CONTOSO.COM
+ Tag5: 0x1
+ Till: 09/13/2037 02:48:05 UTC
+ Tag6:
+ Rtime: 09/13/2037 02:48:05 UTC
+ Tag7:
+ Nonce: 1118221639 (0x42A6B547)
+ Tag8:
+ Etype:
+ Tag9:
– Addresses:
+ SequenceOfHeader:
– Address: SUT2016RS1
+ SequenceHeader:
+ Tag0:
+ AddrType: Netbios address (20)
+ Tag1:
+ Address: SUT2016RS1
KerberosV5:AS Response Ticket[Realm: CONTOSO.COM, Sname: krbtgt/CONTOSO.COM]
 – Kerberos: AS Response Ticket[Realm: CONTOSO.COM, Sname: krbtgt/CONTOSO.COM]
+ Length: Length = 1583
– AsRep: Kerberos AS Response
+ ApplicationTag:
– KdcRep: KRB_AS_REP (11)
+ SequenceHeader:
+ Tag0:
+ PvNo: 5
+ Tag1:
+ MsgType: KRB_AS_REP (11)
+ Tag2:
+ Padata:
+ Tag3:
+ Crealm: CONTOSO.COM
+ Tag4:
+ Cname: Administrator
+ Tag5:
+ Ticket: Realm: CONTOSO.COM, Sname: krbtgt/CONTOSO.COM
+ Tag6:
+ EncPart:
the client receives UsertoUserSessionRep: KRB_TGT_REP (0x11) from the server
– MSRPC: c/o Bind Ack: unknown UUID{00000001-0000-0000-C000-000000000046} Call=0x2  Assoc Grp=0x55A4AC30  Xmit=0x16D0  Recv=0x16D0
– BindAck:
RpcVers: 5 (0x5)
RpcVersMinor: 0 (0x0)
PType: 0x0C – Bind Ack
+ PfcFlags: 7 (0x7)
+ PackedDrep: 0x10
FragLength: 1303 (0x517)
AuthLength: 1187 (0x4A3)
CallId: 2 (0x2)
MaxXmitFrag: 5840 (0x16D0)
MaxRecvFrag: 5840 (0x16D0)
AssocGroupId: 1436855344 (0x55A4AC30)
+ SecAddr: 54390
Pad2: 0x1
+ PResultList:
– AuthVerifier:
AuthType: RPC_C_AUTHN_GSS_NEGOTIATE – The Simple and Protected GSS-API Negotiation (SPNEGO) mechanism selects either NT LAN Manager (NTLM) or Kerberos authentication.
AuthLevel: dce_c_authn_level_pkt_integrity – This level offers the dce_c_authn_level_pkt services plus per-PDU modification and deletion detection.
AuthPadLength: 0 (0x0)
AuthReserved: 0 (0x0)
AuthContextId: 0 (0x0)
– AuthValue:
– GssApi:
– NegotiationToken:
+ ChoiceTag:
– NegTokenResp:
+ SequenceHeader:
+ Tag0:
+ NegState: accept-incomplete (1)
+ Tag1:
+ SupportedMech: MsKerberosToken (1.2.840.48018.1.2.2)
+ Tag2:
+ OctetStringHeader:
– ResponseToken: unused (0)
– MsKerberosToken: unused (0)
– KerberosInitToken:
+ ApplicationHeader:
+ ThisMech: UserToUserMechanism (1.2.840.113554.1.2.2.3)
– InnerContextToken: unused (0)
– KerberosToken: unused (0)
TokId: 0x401
– UsertoUserSessionRep: KRB_TGT_REP (0x11)
+ SequenceHeader:
+ Tag0:
+ pvno: 5
+ Tag1:
+ MessageType: 17
+ Tag2:
– Ticket: Realm: CONTOSO.COM, Sname: krbtgt/CONTOSO.COM
+ ApplicationTag:
+ SequenceHeader:
+ Tag0:
+ TktVno: 5
+ Tag1:
+ Realm: CONTOSO.COM
+ Tag2: 0x1
+ Sname: krbtgt/CONTOSO.COM
+ Tag3: 0x1
+ EncPart:
The client request TGS from the KDC for the service’s user.
KerberosV5:TGS Request Realm: CONTOSO.COM Sname: Administrator
– Kerberos: TGS Request Realm: CONTOSO.COM Sname: Administrator
+ Length: Length = 2692
– TgsReq: Kerberos TGS Request
+ ApplicationTag:
– KdcReq: KRB_TGS_REQ (12)
+ SequenceHeader:
+ Tag1:
+ Pvno: 5
+ Tag2:
+ MsgType: KRB_TGS_REQ (12)
+ Tag3:
– PaData:
+ SequenceOfHeader:
– PaData: PA-TGS-REQ (1)
+ SequenceHeader:
+ Tag1:
+ PaDataType: PA-TGS-REQ (1)
+ Tag2:
+ OctetStringHeader:
– KrbApReq: KRB_AP_REQ (14)
+ ApplicationTag:
+ SequenceHeader:
+ Tag0:
+ PvNo: 5
+ Tag1:
+ MsgType: KRB_AP_REQ (14)
+ Tag2: 0x1
+ ApOptions:
+ Tag3:
+ Ticket: Realm: CONTOSO.COM, Sname: krbtgt/CONTOSO.COM
+ Tag4:
+ Authenticator:
+ PaData: PA-PAC-OPTIONS (167)
+ Tag4:
– ReqBody:
+ SequenceHeader:
+ Tag0:
– KdcOptions: 0x40810008
+ KerberosFlagsHeader:
+ Padding:
– KrbFlags: 0x40810008
Reserved:              (0………………………….)
Forwardable:           (.1…………………………) Ticket to be issued is to have its FORWARDABLE flag set
Forwarded:             (..0………………………..) This is not a request for forwarding
Proxiable:             (…0……………………….) Ticket to be issued is not to have its PROXIABLE flag set
Proxy:                 (….0………………………) This is not a request for a proxy
AllowPostDate:         (…..0……………………..) Ticket to be issued is not to have its MAY_POSTDATE flag set
PostDated:             (……0…………………….) This is not a request for a postdated ticket
Unused7:               (…….0……………………)
Renewable:             (……..1…………………..) Ticket to be issued is to have its RENEWABLE flag set
Unused9:               (………0………………….)
Unused10:              (……….0…………………)
OptHardwareAuth:       (………..0………………..)
Unused12:              (…………0……………….)
Unused13:              (………….0………………)
CnameInAddlTkt:        (…………..0……………..) This is not a request for S4U2proxy functionality
Canonicalize:          (……………1…………….)
Unused16:              (…………….0000000000……)
DisableTransitedCheck: (……………………..0…..) Checking of the transited field is enabled
RenewableOk:           (………………………0….) Renewable ticket is not acceptable
EncTktInSkey:          (……………………….1…) Indicates that the ticket for the end server is to be encrypted in the session key from the additional TGT provided
Unused29:              (………………………..0..)
Renew:                 (…………………………0.) Present request is not for a renewal
Validate:              (………………………….0) Request is not to validate a postdated ticket
+ Tag2: 0x1
+ Realm: CONTOSO.COM
+ Tag3:
+ Sname: Administrator
+ Tag5: 0x1
+ Till: 09/13/2037 02:48:05 UTC
+ Tag7:
+ Nonce: 1181218830 (0x4667F80E)
+ Tag8:
+ Etype:
+ TagA:
+ EncAuthorizationData:
+ TagB:
– AdditionalTickets:
+ SequenceOfHeader:
– Ticket: Realm: CONTOSO.COM, Sname: krbtgt/CONTOSO.COM
+ ApplicationTag:
+ SequenceHeader:
+ Tag0:
+ TktVno: 5
+ Tag1:
+ Realm: CONTOSO.COM
+ Tag2: 0x1
+ Sname: krbtgt/CONTOSO.COM
+ Tag3: 0x1
+ EncPart:
KerberosV5:TGS Response Cname: myuser01
– Kerberos: TGS Response Cname: myuser01
+ Length: Length = 1528
– TgsRep: Kerberos TGS Response
+ ApplicationTag:
– KdcRep: KRB_TGS_REP (13)
+ SequenceHeader:
+ Tag0:
+ PvNo: 5
+ Tag1:
+ MsgType: KRB_TGS_REP (13)
+ Tag3:
+ Crealm: CONTOSO.COM
+ Tag4:
+ Cname: myuser01
+ Tag5:
– Ticket: Realm: CONTOSO.COM, Sname: Administrator
+ ApplicationTag:
+ SequenceHeader:
+ Tag0:
+ TktVno: 5
+ Tag1:
+ Realm: CONTOSO.COM
+ Tag2: 0x1
+ Sname: Administrator
+ Tag3: 0x1
– EncPart:
+ SequenceHeader:
+ Tag0:
+ EType: aes256-cts-hmac-sha1-96 (18)
+ Tag2:
+ Cipher: ©lELY³’Ç·ÝÁò·¸@»^_”@}?WSÀ|hÖ÷FÃrÑ«g†á†ü%º÷ ¢$ÌÿSÖŸ?×íEïB£_†¤tólëÄU
+ Tag6:
– EncPart:
+ SequenceHeader:
+ Tag0:
+ EType: aes256-cts-hmac-sha1-96 (18)
+ Tag2:
+ Cipher: À{ÙcBØP}½§WcæT%3ׄ·îç”mù×v-=Y¹A%1šãˆr_·âh
the client does the AP exchange of Kerberos token with the server, and indicates in the APOptions USE-SESSION-KEY flag that the ticket is encrypted with the session key from the server’s TGT.
– MSRPC: c/o Alter Cont: unknown  UUID{00000001-0000-0000-C000-000000000046}  Call=0x2
– AlterContext:
RpcVers: 5 (0x5)
RpcVersMinor: 0 (0x0)
PType: 0x0E – Alter Context
+ PfcFlags: 7 (0x7)
+ PackedDrep: 0x10
FragLength: 1659 (0x67B)
AuthLength: 1579 (0x62B)
CallId: 2 (0x2)
MaxXmitFrag: ignored
MaxRecvFrag: ignored
AssocGroupId: ignored
+ PContextElem:
– AuthVerifier: 0x1
AuthType: RPC_C_AUTHN_GSS_NEGOTIATE – The Simple and Protected GSS-API Negotiation (SPNEGO) mechanism selects either NT LAN Manager (NTLM) or Kerberos authentication.
AuthLevel: dce_c_authn_level_pkt_integrity – This level offers the dce_c_authn_level_pkt services plus per-PDU modification and deletion detection.
AuthPadLength: 0 (0x0)
AuthReserved: 0 (0x0)
AuthContextId: 0 (0x0)
– AuthValue:
– GssApi:
– NegotiationToken:
+ ChoiceTag:
– NegTokenResp:
+ SequenceHeader:
+ Tag0:
+ NegState: accept-incomplete (1)
+ Tag2:
+ OctetStringHeader:
– ResponseToken: unused (0)
– KerberosToken: unused (0)
– Kerberos: AP Request Ticket[Realm: CONTOSO.COM, Sname: Administrator]
– ApReq: KRB_AP_REQ (14)
+ ApplicationTag:
+ SequenceHeader:
+ Tag0:
+ PvNo: 5
+ Tag1:
+ MsgType: KRB_AP_REQ (14)
+ Tag2: 0x1
– ApOptions:
+ KerberosFlagsHeader:
+ Padding:
– KrbFlags: 0x60000000
Reserved:       (0………………………….)
UseSessionKey:  (.1…………………………)
MutualRequired: (..1………………………..)
Unused:         (…00000000000000000000000000000)
+ Tag3:
– Ticket: Realm: CONTOSO.COM, Sname: Administrator
+ ApplicationTag:
+ SequenceHeader:
+ Tag0:
+ TktVno: 5
+ Tag1:
+ Realm: CONTOSO.COM
+ Tag2: 0x1
+ Sname: Administrator
+ Tag3: 0x1
– EncPart:
+ SequenceHeader:
+ Tag0:
+ EType: aes256-cts-hmac-sha1-96 (18)
+ Tag2:
+ Cipher: ©lELY³’Ç·ÝÁò·¸@»^_”@}?WSÀ|hÖ÷FÃrÑ«g†á†ü%º÷ ¢$ÌÿSÖŸ?×íEïB£_†¤tólëÄU
+ Tag4:
+ Authenticator:
Because MUTUAL-REQUIRED flag was set in AP-Options, the server includes KRB-AP-REP in its response.
– MSRPC: c/o Alter Cont Resp: unknown UUID{00000001-0000-0000-C000-000000000046} Call=0x2  Assoc Grp=0x55A4AC30  Xmit=0x16D0  Recv=0x16D0
– AlterContextResponse:
RpcVers: 5 (0x5)
RpcVersMinor: 0 (0x0)
PType: 0x0F – Alter Context Resp
+ PfcFlags: 7 (0x7)
+ PackedDrep: 0x10
FragLength: 216 (0xD8)
AuthLength: 152 (0x98)
CallId: 2 (0x2)
MaxXmitFrag: ignored
MaxRecvFrag: ignored
AssocGroupId: ignored
+ SecAddr:
+ Pad2: 0x1
+ PResultList:
– AuthVerifier:
AuthType: RPC_C_AUTHN_GSS_NEGOTIATE – The Simple and Protected GSS-API Negotiation (SPNEGO) mechanism selects either NT LAN Manager (NTLM) or Kerberos authentication.
AuthLevel: dce_c_authn_level_pkt_integrity – This level offers the dce_c_authn_level_pkt services plus per-PDU modification and deletion detection.
AuthPadLength: 0 (0x0)
AuthReserved: 0 (0x0)
AuthContextId: 0 (0x0)
– AuthValue:
– GssApi:
– NegotiationToken:
+ ChoiceTag:
– NegTokenResp:
+ SequenceHeader:
+ Tag0:
+ NegState: accept-incomplete (1)
+ Tag2:
+ OctetStringHeader:
– ResponseToken: KRB_AP_REP (15)
– KerberosToken: KRB_AP_REP (15)
– Kerberos: AP Response
– ApRep: KRB_AP_REP (15)
+ ApplicationTag:
+ SequenceHeader:
+ Tag0:
+ PvNo: 5
+ Tag1:
+ MsgType: KRB_AP_REP (15)
+ Tag2: 0x1
– AuthorizationData:
+ SequenceHeader:
+ Tag0:
+ EType: rc4-hmac (23)
+ Tag2:
+ Cipher: Uàs5˜3(,S
¥Ç×Ñ•Kìd/aò—————Ã/}¦Œ«—ƒm–„Fzº4@¬q1[«u,OCÿ¦ÇŠ}µ˜?D¸j¹šÚÜ|!»[ç¤|/öon‡ˆ=i+ï†(šPpãúN….¼wȆ‚™vºÉWõ
– MSRPC: c/o Alter Cont: unknown  UUID{00000001-0000-0000-C000-000000000046}  Call=0x2
– AlterContext:
RpcVers: 5 (0x5)
RpcVersMinor: 0 (0x0)
PType: 0x0E – Alter Context
+ PfcFlags: 7 (0x7)
+ PackedDrep: 0x10
FragLength: 216 (0xD8)
AuthLength: 136 (0x88)
CallId: 2 (0x2)
MaxXmitFrag: ignored
MaxRecvFrag: ignored
AssocGroupId: ignored
+ PContextElem:
– AuthVerifier: 0x1
AuthType: RPC_C_AUTHN_GSS_NEGOTIATE – The Simple and Protected GSS-API Negotiation (SPNEGO) mechanism selects either NT LAN Manager (NTLM) or Kerberos authentication.
AuthLevel: dce_c_authn_level_pkt_integrity – This level offers the dce_c_authn_level_pkt services plus per-PDU modification and deletion detection.
AuthPadLength: 0 (0x0)
AuthReserved: 0 (0x0)
AuthContextId: 0 (0x0)
– AuthValue:
– GssApi:
– NegotiationToken:
+ ChoiceTag:
– NegTokenResp:
+ SequenceHeader:
+ Tag0:
+ NegState: accept-incomplete (1)
+ Tag2:
+ OctetStringHeader:
– ResponseToken: KRB_AP_REP (15)
– KerberosToken: KRB_AP_REP (15)
– Kerberos: AP Response
– ApRep: KRB_AP_REP (15)
+ ApplicationTag:
+ SequenceHeader:
+ Tag0:
+ PvNo: 5
+ Tag1:
+ MsgType: KRB_AP_REP (15)
+ Tag2: 0x1
– AuthorizationData:
+ SequenceHeader:
+ Tag0:
+ EType: rc4-hmac (23)
+ Tag2:
+ Cipher: ówûdf__ÇßMk†¦;N”ß³“ºãu:ïýVwhû™F0ÔuDš>©×¤‡Ÿ7@Pü¤º8MÚ­Ü 4H
+ Tag3:
+ OctetStringHeader:
– MechListMic: KRB_AP_REP (15)
– KerberosToken: KRB_AP_REP (15)
TokId: GSS_GetMIC (0x404)
– Krb5GssV2GetMic:
+ Flags: 4 (0x4)
Filler: Binary Large Object (5 Bytes)
SndSeq: 1181218827 (0x4667F80B)
SgnCksum: Binary Large Object (12 Bytes)
– MSRPC: c/o Alter Cont Resp: unknown UUID{00000001-0000-0000-C000-000000000046} Call=0x2  Assoc Grp=0x55A4AC30  Xmit=0x16D0  Recv=0x16D0
– AlterContextResponse:
RpcVers: 5 (0x5)
RpcVersMinor: 0 (0x0)
PType: 0x0F – Alter Context Resp
+ PfcFlags: 7 (0x7)
+ PackedDrep: 0x10
FragLength: 105 (0x69)
AuthLength: 41 (0x29)
CallId: 2 (0x2)
MaxXmitFrag: ignored
MaxRecvFrag: ignored
AssocGroupId: ignored
+ SecAddr:
+ Pad2: 0x1
+ PResultList:
– AuthVerifier:
AuthType: RPC_C_AUTHN_GSS_NEGOTIATE – The Simple and Protected GSS-API Negotiation (SPNEGO) mechanism selects either NT LAN Manager (NTLM) or Kerberos authentication.
AuthLevel: dce_c_authn_level_pkt_integrity – This level offers the dce_c_authn_level_pkt services plus per-PDU modification and deletion detection.
AuthPadLength: 0 (0x0)
AuthReserved: 0 (0x0)
AuthContextId: 0 (0x0)
– AuthValue:
– GssApi:
– NegotiationToken:
+ ChoiceTag:
– NegTokenResp:
+ SequenceHeader:
+ Tag0:
+ NegState: accept-completed (0)
+ Tag3:
+ OctetStringHeader:
– MechListMic: unused (0)
– KerberosToken: unused (0)
TokId: GSS_GetMIC (0x404)
– Krb5GssV2GetMic:
+ Flags: 5 (0x5)
Filler: Binary Large Object (5 Bytes)
SndSeq: 1096155632 (0x415601F0)
SgnCksum: Binary Large Object (12 Bytes)

References

[RFC4120] The Kerberos Network Authentication Service (V5)
https://tools.ietf.org/rfc/rfc4120.txt
[U2UDraft] User to User Kerberos Authentication using GSS-API
https://tools.ietf.org/html/draft-swift-win2k-krb-user2user-03
[RFC2743] “Generic Security Service Application Program Interface Version 2, Update 1”
https://tools.ietf.org/rfc/rfc2743.txt
[MS-CSSP]: Credential Security Support Provider (CredSSP) Protocol
https://msdn.microsoft.com/en-us/library/cc226764.aspx
[MS-SPNG]: Simple and Protected GSS-API Negotiation Mechanism (SPNEGO) Extension
https://msdn.microsoft.com/en-us/library/cc247021.aspx
[MS-RA]: Remote Assistance Protocol
https://msdn.microsoft.com/en-us/library/cc240013.aspx
[MS-PKCA]: Public Key Cryptography for Initial Authentication (PKINIT) in Kerberos Protocol
https://msdn.microsoft.com/en-us/library/cc238455.aspx
[PKU2U] Introducing PKU2U in Windows
https://technet.microsoft.com/en-us/library/dd560634(v=ws.10).aspx
[MS-SFU]: Kerberos Protocol Extensions: Service for User and Constrained Delegation Protocol
https://msdn.microsoft.com/en-us/library/cc246071.aspx

Last Week on DirectX Shader Compiler (2017-05-24)

$
0
0

Last week we had bug fixes as codegen cleanup as pretty much every week, including a bunch of work on ViewID.

We also improved support for external libraries, which you can now configure in dndxc via the Tools | Options menu, as well as specify via command-line arguments to dxopt.

Two other interesting changes are an implementation for old-style expansion for trig intrinsics that weren’t supported as first-class things at the bytecode level in DXBC, which isn’t in use but might come in handy to downstream consumers, and our first feature for HLSL 2017: support for enums.

Note the keyword colorization and the reference highlight in the UI, as well as the “/HV 2017” switch to enable the new language features (still in its early days, so please be gentle).

Enjoy!

Create Secondary Tiles from your Desktop Application

$
0
0

Starting from the Insider Preview Build 16199 you can create SecondaryTiles directly from your desktop application by leveraging the Desktop Bridge.

A secondary tile provides a consistent, efficient way for users to directly access specific areas within a packaged app from the Start screen. Although a user chooses whether or not to “pin” a secondary tile to the Start screen, the pinnable areas in an app are determined by the developer.
Adding a Secondary tile from your WPF or Winforms is very similar to a pure UWP application, however there are few things to remember;
If you have a Win32 desktop application or a desktop application you need to specify your main window handle (HWND) in the API. The SecondaryTile displays a modal dialog to the user to get a confirmation from the user. If a desktop application does not configure the SecondaryTile object to specify the owner window for modal dialogs, this object will return inaccurate data or errors.

SecondaryTile

To configure a SecondaryTile object in a desktop application that uses the Desktop Bridge, follow these steps;

1. Do one of the following to enable your app to access the IInitializeWithWindow interface:
o If your application is written in a managed language such as C# or Visual Basic, declare the IInitializeWithWindow interface in your app’s code with the ComImport attribute as shown in the following C# example. This example assumes that your code file has a using statement for the System.Runtime.InteropServices namespace.

[ComImport]
[Guid("3E68D4BD-7135-4D10-8018-9FB6D9F33FA1")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IInitializeWithWindow
{
  void Initialize(IntPtr hwnd);
}

o If your application is written in C++, add a reference to the shobjidl.h header file in your code. This header file contains the declaration of the IInitializeWithWindow interface.

2. Create the secondary tile (it is the same code you will write in UWP);

Uri square150x150Logo = new Uri("ms-appx:///Assets/square150x150Tile-sdk.png");
SecondaryTile tile = new SecondaryTile("SecondaryTileId" + PhotoListBox.SelectedIndex,
                                                            displayName,
                                                            tileActivationArguments,
                                                            square150x150Logo,
                                                            TileSize.Default);

3. Cast the object to an IInitializeWithWindow object. Then, call the IInitializeWithWindow.Initialize method, and pass the handle of the window that you want to be the owner for the modal dialog. The following C# example shows how to pass the handle of your app’s main window to the method.

IInitializeWithWindow initWindow = (IInitializeWithWindow)(object)tile;
initWindow.Initialize(System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle);
tile.RequestCreateAsync();

The full sample is available on GitHub, here.
To learn more about Secondary tiles and the Desktop Bridge, check out the resources below;

Resources

 

Any questions? Leave them in the comments!

Enjoy!
Vladimir Postel, Program Manager – Windows Developer Platform

VPN Gateways con TP-Link AC3200

$
0
0

Después de un pequeño accidente con mi blog donde perdí muchos artículos, intento nuevamente traerles un poco de información interesante 🙂

Hace unos meses atrás, actualicé mi router a un TP-Link Archer AC3200, una de las cosas que más me llamaba la atención era la capacidad de crear VPNs basadas en IPsec que es el protocolo utilizado por Azure para las conexiones de sitio a sitio… Finalmente tuve un poco de tiempo disponible y me propuse a hacer la conexión!

Acá empezaron los problemas! Busqué en la documentación de Azure y mi router no aparece dentro de los dispositivos probados, empecé a buscar algún ejemplo en algún otro sitio y lamentablemente no pude encontrar nada 🙁 después de algún tiempo logré hacerlo funcionar gracias a los parámetros del siguiente enlace.

Les comparto la configuración necesaria para conectar un AC3200 con Azure, este artículo se enfoca en los pasos específicos al router, para la configuración en el portal puede seguirse la siguiente guía: https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-site-to-site-resource-manager-portal.

En mi caso, yo no logré hacerlo funcionar con una VPN RouteBased, utilizando los mismos parámetros una VPN RouteBased entrará en una especie de ciclo infinito entre la validación de la configuración y el intento de la conexión, asegúrense de seleccionar una VPN de tipo PolicyBased.

VPN ConfigA continuación la configuración del router, los parámetros básicoa incluyen la IP del gateway, las subredes y la clave que será usada para la conexión, es importante deshabilitar la opción Perfect Forward Secrecy, este es el único cambio necesario en esta área.

TP-Link 3200Después es necesario ingresar a la configuración avanzada de la conexión, esta es la sección que requiere más modificaciones, los algoritmos de cifrado, integridad y el tiempo de vida (este último sólo en la fase 1) deben ser modificados como se muestra en la imagen:

Advanced Config

Finalmente, se debe deshabilitar la opción Dead Peer Detection; dentro de un par de minutos, el estado de la conexión cambiará a “Up”.ConnectionEl portal también reflejará el estado “Connected” en pocos minutos y con esto será posible empezar a utilizar nuestra conexión de sitio a sitio.

VPN Connection

Espero que les sea útil esta información.
Hasta la próxima!
–Rp

Improve Windows Update Performance for New Windows Embedded Image Deployments

$
0
0

Occasionally, the Windows Update (WU) process can take significantly longer than expected for new image deployments on Windows Embedded Standard 7 SP1, POSReady7, and ThinPC. To help speed up this process, you need to install three specific KB packages, and you must stop the Windows Update service before each installation. The packages are:

  1. Open an administrator command prompt. Click the Start menu, right-click Command Prompt, and then click Run as Administrator.
  2. Stop the Windows Update service using the net stop wuauserv
  3. After the service stops, immediately install a KB package. This will automatically restart the WU service.
  4. Repeat steps 2 and 3 until all three packages listed above are installed.
  5. Close the Command Prompt window, and run Windows Update from within Control Panel to check for any additional updates.

SQL Server Integration Services ( SSIS ) Scale Out

$
0
0

Microsoft Japan Data Platform Tech Sales Team

中川

SQL Server の ETL ツールとして提供してきました SQL Server Integration Services (以降 SSIS と称す) ですが、SQL Server 2017 にて Scale Out という機能拡張が行われました。今回はその Scale Out という機能についてご紹介します。

SQL Server 2017 の SSIS では Scale Out Master (以降 Master と称す) と Scale Out Worker (以降 Worker と称す) というサービスに分離されます。 これにより ETL ジョブの管理は Master にて、ジョブの実行は Worker にてといった役割の分離が可能となり、Worker を複数マシン構成にすることにより、ジョブを複数マシンで実行することもできるようになります。つまり処理を “Scale Out” 可能にする構成となります。

image

図1 SQL Server 2017 SSIS の構成

image

image

図2 Windows サービス

 

Scale Out Master

SSIS ジョブなどの一元管理を行うためのサービスです。 HTTPS で Worker と通信し、実行可能状態のジョブを Worker に渡したり、ジョブの実行状況を Worker より受け付けて SSISDB カタログ(後述) に格納する役割などを担っています。

Scale Out Worker

ジョブを Master より pull で取得・実行し、実行状況を Master にレポートする役割を担っています。

SSISDB カタログ

どの Worker が Master の管理下にあるのかや、Worker から上がってきたジョブの実行状況といった情報を Master 経由で格納するためのデータベースです。

なお、Master, Worker はそれぞれを認証するために SSL 証明書を使用しますので、Worker をホストしているマシンの SSL 証明書を Master をホストしているマシンに、Master をホストしているマシンの SSL 証明書を Worker をホストしているマシンにインポートする必要があります。

マニュアル ”Integration Services (SSIS) Scale Out” をご参照の上、Master, Worker をインストールし SSL 証明書を Master、および Worker をホストしているマシンにインポートすると、Worker は自身の “WokerAgentId” を Master に通知します。正常に通知された場合には SSISDB の [catalog].[worker_agents]で確認することができます。

image

ただ、この状態ではまだ Master は 各マシンを Worker の一員とはみなしません。この状態では、IsEnabled 列は 0 になっています。

以下を実行して Scale Out の Worker として有効化する必要があります。

EXEC [catalog].[enable_worker_agent] '<WorkerAgentId>'
GO

すると、IsEnabled列の値が 0 –> 1 と変わります。これにより各 Worker は Master の管理下に置かれることになります。

image

 

ここで SSIS のパッケージを二つ登録し、スケールアウト実行してみます。

1. 実行するパッケージを選択。今回は登録した二つ。

image

2. 実行するマシンを選択。Worker をホストしているどのマシンで動いてもよいということであれば ”Allow any machine execute the selected packages” のチェックボックスをオン。

image

3. キューに登録された後、各ジョブがどのマシンで実行されるかが決定されます。

image

4.  各ジョブの詳細も確認できます。

image

 

[Appendix]

SSISDB のインスタンスですが、デフォルトのインスタンス名 “MYSQLSERVER” であればセットアップ後、特別な作業は必要ありませんが、名前付きインスタンスの場合には Master の設定を変更する必要があります。

具体的には “<driver>:Program FilesMicrosoft SQL Server140DTSBinnMasterSettings.config” の “InstanceName” を変更します。なお、ここは設定名の通り、”host1instanceA” といったサーバー名ではなく、あくまでもインスタンス名を指定してください。また、設定変更を反映させるために Master サービスを再起動する必要もあります。

 

以上、今回は SQL Server 2017 の SSIS 新機能である Scale Out についてご紹介しました。 CTP 2.0 時点 (2017/5/18) の情報ですので、正式リリース時点では変更されている点もあるかもしれませんが、ご興味持っていただけたなら幸いです。


Easy image classification and image search with pre-trained model on R

$
0
0

In my previous post, I described about featurizing (vectorizing) text with the sentiment analysis example.
In this post, I describe about the featurizing (vectorizing) image using useful sample code in GitHub, and explain how you can use in your real application.

What is “featurizeImage” transformation

The latest Microsoft R Client and Server (version 9.1 and later) with MicrosoftML package includes some new functionalities by the pre-trained models. The new transform named “featurizeImage” is one of these.

This “featurizeImage” vectorizes (featurizes) the image by the model which is trained by the famous ImageNet dataset. As you know, the ImageNet is the huge image dataset including the labels of so many features like the name of objectives with boundary boxes, gestures, species, and other annotations. When using “featurizeImage”, the residual network (ResNet) or convolutional network (AlexNet) can be used for this pre-trained model. (I note that you cannot analyze with the labels or attributes which is not in ImageNet dataset. For example, facial recognition with some specific faces, etc)

You can download the very nice example for this “featurizeImage” transformation from the GitHub (see here), and here I show you how you can use along with this GitHub sample code. (But I changed several lines of code for my example …)

Our Sample

Here we use the following pictures which I’ve taken during my vacations before.
The picture #1 and #5 are the landmarks of ancient Greece. #4 and #7 are the house in shiny Santorini island. #2, #3, and #6 are the animals in the zoological park (in Tokyo) near my home town.

Vectorizing (Featurizing) Images

First, let’s just see the vectorized (featurized) results of these images. (In new MicrosoftML package, you can just transform and see the result with the data frame.)
Please see the following code.

library("MicrosoftML")

orgdat <- data.frame(
  Image = c(
    "C:\tmp\001.JPG",
    "C:\tmp\002.JPG",
    "C:\tmp\003.JPG",
    "C:\tmp\004.JPG",
    "C:\tmp\005.JPG",
    "C:\tmp\006.JPG",
    "C:\tmp\007.JPG"),
  stringsAsFactors = FALSE)

vecdat <- rxFeaturize(
  data = orgdat,
  mlTransforms = list(
    loadImage(vars = list(Features = "Image")),
    resizeImage(vars = "Features", width = 224, height = 224),
    extractPixels(vars = "Features"),
    featurizeImage(var = "Features", dnnModel = "resnet101")
  ))

As you can see, transformation steps are the followings :

  1. loadImage – loading images from each path name (in “Image” column)
  2. resizeImage – resizing all images to 244 X 244. Later I explain this background.
  3. extractPixels – extracting pixels (vector of number) from the loaded binary images.
  4. featurizeImage – vectorizing with pre-trained model. (CNTK wrapper seems to be used in the model evaluation.)

The result (data frame “vecdat”) is having 2048 featurized columns (vectors), and the values are the numeric like following.

Here we use ResNet-101 network for the pre-trained model. In this case, the image size must be 244 X 244.
You can see the table of the input image size for each available networks in the blog post “Microsoft R blog : Image featurization with a pre-trained deep neural network model“, and please see the details.

ResNet-18 224 X 224
ResNet-50 224 X 224
ResNet-101 224 X 224
AlexNet 227 X 227

(See “Microsoft R blog : Image featurization with a pre-trained deep neural network model“)

Image Classification with unsupervised classifier

You can use this featurized image vector for the various learning. One good example is image classification.

The GitHub example (ImageFeaturizer_TrainAndClassifyImage.R) is labeling images (for example, “Fish”, “Helicopter”, etc) and training.
But here, we now classify images without any labeling or training using k-means. That is, the unsupervised classifying approach. (We just use the previous vectorized features.)

Let’s see the following example.
This code classifies by 3 classes depending on the distance of each image vectors (features).

library("MicrosoftML")

orgdat <- data.frame(
  Image = c(
    "C:\tmp\001.JPG",
    "C:\tmp\002.JPG",
    "C:\tmp\003.JPG",
    "C:\tmp\004.JPG",
    "C:\tmp\005.JPG",
    "C:\tmp\006.JPG",
    "C:\tmp\007.JPG"),
  stringsAsFactors = FALSE)

vecdat <- rxFeaturize(
  data = orgdat,
  mlTransforms = list(
    loadImage(vars = list(Features = "Image")),
    resizeImage(vars = "Features", width = 224, height = 224),
    extractPixels(vars = "Features"),
    featurizeImage(var = "Features", dnnModel = "resnet101")
  ))

result <- kmeans(vecdat[, -1], 3, nstart = 20)

The result is as follows.
As you can see, each images are fairly well-classified along with your willings. (class #1 = ancient Greek landmarks, class #2 = the house of Santorini, class #3 = animals)

Let’s classify your albums (your real photos) with this program. (No labeling is needed !)

Image Matching (Image Search)

The GitHub example (ImageFeaturizer_FindMatchingImage.Ris also executing matching (search) for the resembling images.
Let’s follow this sample code.

Before running, we prepare another Parthenon photo for search target.

First, we use “dist” function and calculate the euclidean distance for each other.

library("MicrosoftML")

orgdat <- data.frame(
  Image = c(
    "C:\tmp\001.JPG",
    "C:\tmp\002.JPG",
    "C:\tmp\003.JPG",
    "C:\tmp\004.JPG",
    "C:\tmp\005.JPG",
    "C:\tmp\006.JPG",
    "C:\tmp\007.JPG"),
  stringsAsFactors = FALSE)

vecdat <- rxFeaturize(
  data = orgdat,
  mlTransforms = list(
    loadImage(vars = list(Features = "Image")),
    resizeImage(vars = "Features", width = 224, height = 224),
    extractPixels(vars = "Features"),
    featurizeImage(var = "Features", dnnModel = "resnet101")
  ))

fnddat <- data.frame(
  Image = c("C:\Users\tsmatsuz\Desktop\searching.JPG"),
  stringsAsFactors = FALSE)

vec2dat <- rxFeaturize(
  data = fnddat,
  mlTransforms = list(
    loadImage(vars = list(Features = "Image")),
    resizeImage(vars = "Features", width = 224, height = 224),
    extractPixels(vars = "Features"),
    featurizeImage(var = "Features", dnnModel = "resnet101")
  ))

distVals <- dist(
  rbind(vecdat, vec2dat)[,-1],
  "euclidean")

The result (distVals) is like following. This result is including all distance for 8 images (7 original images + 1 search target) each other. :

Here we just want the result of comparison with the search target (“searching.JPG”). That is, we need the result only on 8th row.

i <- attr(distVals, "Size") # value of "Size" must be 8
eucDist <- as.matrix(distVals)[i, -i]

The result (“eucDist”) is like following :

As you can see, the photo #1 (the following photo) is having the minimum distance with the search target (“searching.JPG”), because these 2 photos are resembling several features.

Adding External contacts to a Distribution List in Office365

$
0
0

As a community person i run a lot of discussion lists (in Exchange called distribution list) and always adding new people to these lists.

In the Exchange Admin interface this takes to separate steps and filling out several fields of metadata . The two separate steps are:

1.  Adding the contact

image

2.  Adding that contact to the distribution group

 

These two steps can easily take 2-3 minutes and if you have 100 people to  add……..

Turns out Exchange doesn’t need the contacts added, just an email address but the Exchange Admin UI does allow this…Luckily their PowerShell cmdlet does!

The script is really easy too!

 

 

$credential = get-credential

#Creates an Exchange Online session
$ExchangeSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $credential -Authentication Basic -AllowRedirection

#Import session commands
Import-PSSession $ExchangeSession

Add-DistributionGroupMember -Identity "PUG" -Member chass@messengeruser.com

 

 

Of course this could be written  as a for-each loop reading a CSV file,  but i found in many cases using Excel to create the Command works better for trouble shooting etc.

Since there are only two parameters the Excel function is very straight forward:

 

=”Add-DistributionGroupMember -Identity “& B2 & ” -Member ” & A2

image

All i have to do is paste in the email address I want to add and autofill the rest!

 

 

 

h

Visual Studio中支持的CMake—在2017 15.3 update版本中有哪些更新

$
0
0

[原文发表地址] CMake support in Visual Studio – what’s new in 2017 15.3 update

[原文发表时间] 2017/05/10

我们很激动地宣布Visual Studio 2017 15.3 update 的第一个预览版和我们的 Build 2017 大会同一时间发布了。这次的预览版包括两个新功能,使用CMake的开发者都会对这两个功能感兴趣的。。包括开始支持CMake Ninja 生成器和在IDECMake CTest的集成。

请下载预览版本并试用最新的CMake功能。如果你刚刚开始使用CMake,可以通过博客 Visual Studio中学习更多CMake支持功能 进行学习。我们期待你的反馈。

使用Ninja 生成器生成

你们反馈说希望可以支持更多的CMake build 生成器,我们采纳了。Visual Studio最新的预览版本中的CMake tools支持Ninja生成系统。请注意,这是一个预览版本所以还存在一些限制。Visual Studio中的CMake 工具当前只支持x86的生成并且和CTest是不兼容的。另外,Ninja 生成器现在只支持64位的OS。不过不用担心,这些限制都将会在15.3正式发布版本中被解决。

在使用Ninja 生成器之前,你需要编辑CMakeSettings.json 文件。如果你的文件夹中没有CMakeSettings.json文件,你可以右击CMakeLists.txt文件然后选择更改CMake设置打开或者创建CMakeSettings.json文件:

Edit CMake Settings

如果你的文件夹中还没有添加一个CMakeSettings.json文件,你将看到下面的情形:CMake Settings JSON

如果你想使用Ninja 生成器,你可以在每一个配置里的“generator”设置中选择Ninja 生成器。如果你的文件夹中已经存在CMakeSettings.json文件,你需要将生成器从 “Visual Studio 15 2017”更新到 “Ninja”。注意,这里也仍然不支持x64配置。

15.3预览版本中,x86的生成是默认选择Ninja 生成器,但是一旦在公开路径发布后这个也将被改变。

CTest集成

新的生成器是很强大的,但是要让开发者确信他们代码的质量也是很重要的。对于CMake 项目,解决这个问题比较推荐的方法来是使用CTest。有一个好消息,如果你已经使用了CTest,你将不需要做其他任何事。Visual Studio最新的预览版本应该检测到测试而不需要你做任何事情。

CTest Run Tests

如果你在CMake主菜单下没有看见 Run Tests” ,请先确保你的CMakeSettings.json文件正在使用Visual Studio CMake生成器 。这个限制也将会在后面的发布版本中被解决。

 一旦你从CMake主菜单下选择“Run Tests”或者在CMakeLists.txt文件上右击选择“Run Tests”,你的项目将会自动生成,测试将会运行。输出将会在CMake 输出窗口显示—Ctest还没有和Test Explorer整合。

给我们发送反馈

请试用最新的最强大的CMake功能,并且及时给我们发送反馈,请下载并安装最新的Visual Studio 2017 Preview。一如往常地,我们欢迎你的反馈。你可以通过邮箱visualcpp@microsoft.comTwitter @visualc或是Facebook Microsoft Visual Cpp发送任何评价。

如果你在使用Visual Studio 2017的过程中遇到了任何问题,无论是安装问题或是IDE本身问题,都可以通过Report a Problem让我们知道,如果有任何建议,可以通过UserVoice让我们知道。我们期待你的反馈!

拝啓『変わらない開発現場』を嘆く皆様へ ~変わっていくエンタープライズ系業務システム開発とマイクロソフトエンタープライズサービスの取り組み~

$
0
0

image

 昨年、今年と 2 回に渡って de:code にてエンプラ系 SIer さんの PL, PM, SE を対象としたセッションを担当しました。エンプラ系 SIer の『闇』はかなり深いものがあり、現場担当の方々はそれを改善すべく日々奮闘されていると思うのですが、その一方で、全体論としての捉え方が正しくないが故に、アプローチが誤っていたり掛け声だけで終わってしまっているケースも少なくありません。例えばエンプラ系開発現場でも最近はトップダウンで DevOps に取り組め、なんていう指示が出たりすることもあるのですが、実際にそれがうまくいっているお客様をほとんど見かけないのも事実です。

 こうした背景があり、de:code 2017 ではセッションを担当すると同時に、参加者全員に配布するマーケティングのリーフレットを使って、筆者赤間の所属するマイクロソフト エンタープライズサービス(有償サービス部門)での最近のコンサルティングの取り組みをいくつかご紹介するという試みをしてみました。マーケティング部門の費用を使っている関係で、弊社サービス部門の営業色が入った内容にはなってしまっているのですが、その一方で、この情報は(特にエンプラ系 SIer のマネジメント層の方々にとって)組織やチームをどういった方向に導いていけばよいのかの指針になる、とも考えています。実際、いくつかのお客様でこの取り組みを私からご紹介したのですが、自組織の今後の方向性を整理する上で非常に参考になった、という F/B が多かったです。

 個々の皆様の事情はそれぞれ違えど、多少でも参考になる部分があればと思い、blog 化してこちらのサイトにも掲載することにしました(基本的な骨子はリーフレットと同じですが、ページ数の関係で書ききれなかったことを加筆修正しています)。よろしければぜひご覧いただければ幸いです。


■ エンプラ系 業務システム開発を俯瞰する

 クラウドに代表される昨今の技術革新は、業務システム開発の在り方に大きな影響を与えてきました。インフラ、アプリ、運用などの領域に分けてみると、以下のような変化が起きています。

image

 これらの中でも特に重要なのが、「アプリ特性に応じた開発のやり方をする」という考え方です。様々な分類方法が提唱されているのですが、ここではシンプルでわかりやすい、SoE(System of Engagement / お客様との絆を強めるためのシステム)SoR (System of Record / 事実を記録していくためのシステム)という分類を取り上げてみます。SoE 型システムとは「コンシューマ向け、フロントエンド、オープン、B2C」といった特性を持つシステムで、代表例としてはコンシューマ向け Web サイトやゲームアプリ。一方、SoR 型システムとは「エンタープライズ系、バックエンド、基幹系、B2B/B2E」といった作成を持つシステムで、代表例としては金融系勘定システムのようなものが挙げられます。

image

 並べてみると明らかなように、これらはシステム開発としての基本的な特性が大きく異なります。例えば SoE 型システムはページ数や業務数は少なめですが、かわりに極めて先進的な技術が投入されます。一方、SoR 型システムは、一つ一つのロジックはさほど難しくないものの膨大な数の業務が存在し、品質の安定性重視のために枯れた技術が好まれる傾向にあります。

 また、開発特性が異なれば、求められる開発文化も当然異なります。例えば SoE 型システムでは「素早くリリースして素早く軌道修正していく」という Try & Error の文化が重視されますし、SoR 型システムでは「大規模システムを早く・安く・上手く作るためにいかにプロジェクトやメンバーを制御するのか」といった点が重視されます。

 もちろん実際の個々のシステムはここまで両極端ではないでしょうが、この分類に従って考えてみると、いろいろ考えやすくなるのも事実です。例えば日本のシステム開発市場に関して考えてみると、

  • いわゆるエンプラ系 SIer での業務システム開発は SoR 型システムが圧倒的多数。(この傾向は今後もおそらく変わらない)
  • アジャイルやDevOps プラクティスは SoE 型システム開発界隈から生まれてきた手法であり、エンプラ系 SIer の SoR 型システム開発には単純適用できないことが多い。
  • 最近ではお客様が新規性の高いビジネスを模索していることも多く、エンプラ系 SIer といえど SoE 型システムの開発に取り組まねばならないことが多くなってきている。

といった実情があるのですが、こうした状況が整理されないまま、DevOps やアジャイルは日本に定着するのか? 的な議論が数多くなされています。こうしたことが、日本の開発現場の改善に向けた建設的な議論が進みにくいことの一因ではないかと私は考えています。

 また加えて言うのであれば、私は日本と欧米とでは随分と状況が異なると考えています。

  • 例えば、「欧米では Scrum が基本で DevOps が当たり前」と言われるが、そもそも欧米で 2000 年代にオフショア化が非常に進んだことを考えると、欧米の国内に残った「高付加価値 SI」は、必然的に内製でも成立するような(内製でないと成立しないような) SoE 型のような先進性を求めたものになる。よって、そこでアジャイルや DevOps などのプラクティスが進化・発展するのはある意味当たり前。
  • その一方、日本は世界中でも言語障壁が特に高い国であり、欧米のように大規模 SoR 型システム開発をうまくオフショアできていないのが実態。結果として、国内には Web サービス系企業やゲーム業界のように積極的に DevOps プラクティスを活用する企業と、確実性をなにより重視し、膨大なドキュメントに基づく大規模な SoR 型システム開発を実施するエンプラ系 SIer 企業とがごった煮で共存している形となっている。

 よく、「システム開発に関して日本はガラパゴスだ」と言われるのですが、むしろこれは逆で、実際には欧米(特にアメリカ)のシステム開発の方がある意味よっぽどガラパゴスなのではないかと思うのです。というのも、アメリカにおけるオフショア先であるインドや中国などにおいて大規模開発が行われる場合は当然受託開発であり、そこではやはりウォーターフォール的な開発文化が強いらしく(私の見聞きしている範囲なのでバイアスはあるかもしれませんが)、その部分に関しては、日本の SIer とあまり状況は変わらないように見えるのです。……と考えると、おそらく日本のシステム開発の市場というのは、簡単に言えば「世界の縮図」ではないかと思うのです。

 しかしここで勘違いして欲しくないのは、仮に欧米のシステム開発がガラパゴス化していたとしても、そこからエンプラ系 SIer の SoR 型システム開発が学ぶべきこと・学べることはたくさんある、という点です。「ガラパゴス化」というのはあまりいい意味で使われない言葉ですが、最先端を突っ走ることによって多数の様々なプラクティス(実践的手法)が生み出されていることも事実であり、こうした内容は開発文化の違いを意識ししつつ(=きちんと取捨選択しながら)積極的に取り入れていく必要があります。

image

 こうした背景を元にすると、私を含めた、エンプラ系 SI 界隈に携わる人々が取り組まなければならない課題は主に以下の 2 つであると考えています。

  • ① SoR 型システム開発における、更なる開発生産性の改善
  • ② 先進的ビジネスのための SoE 型システム開発への取り組み

 以降では、これらに関する私の考えと、マイクロソフト エンタープライズサービスによるコンサルティングの取り組みや事例をご紹介していきます。


■ ① SoR 型システム開発における開発生産性の改善 ~開発近代化コンサルティングサービス~

 開発技術の進化があれば、その恩恵により開発生産性は改善されるはずです。……にもかかわらず、実際のエンプラ系システム開発現場ではその進化の恩恵を受けられていないことが多いのではないでしょうか? これには様々な理由があると思いますが、中でも大きな理由のひとつとして、日本の SI 商慣習(多重請負構造)における『上流』の仕事のやり方が、10 年以上も変化していない(ような現場が多い)ことが挙げられると私は考えています。

image

 当たり前のことですが、モノづくりのやり方が変われば、設計手法やプロマネ手法もそれに合わせた見直しが必要になります。この点は、私が昨年・今年と de:code で一貫して取り上げてきたテーマで、実践論として具体的なレベルまで踏み込んで解説しています(仔細は以下の ppt やビデオをご覧ください)。

  • de:code 2016 CLT-016 拝啓『変わらない開発現場』を嘆く皆様へ ~エンプラ系 SI 開発現場の「今」を変えていくために~
    https://channel9.msdn.com/Events/de-code/2016/CLT-016
    https://docs.com/decode2016/9106
  • de:code 2017 DO-08 『変わらない開発現場』を変えていくために ~エンプラ系レガシー SIer のための DevOps 再入門~
    (ppt, ビデオは後日公開予定)

 しかし上記のセッションで説明されているような「ベストプラクティス」がすでに存在するにもかかわらず、 Excel 設計書に代表されるように、日本の開発現場は昔ながらのやり方を淡々と続けていることが少なくありません。実際の開発現場を数多く訪問している私の肌感覚ですが、その最大の理由は、IT 部門や SI 関連会社、あるいは SIer のプロパーが、最新の開発技術やモノづくりのやり方を単に「知らない」、そしてその結果、それに併せた最適な SI のやり方を考えられなかったり、改善の打ち手を考えられなかったりすることが多いためだと考えています。

 これは、SIer のプロパーが怠けている、ということではありません。いやむしろ、SIer のプロパーさんほど身を粉にして働いている方々はいないでしょう。にもかかわらずなぜこのような状況が発生するのか? その原因の一つに、私は IT 部門や SIer における過度な外注やアウトソーシングがあると考えています。

image

 上図に示したのはシステム開発の業務遂行に必要な「5 つの専門性」です(仔細はこちらのエントリを参照)。こうした役割を、SIer のプロパーさんと、協力会社の方々によって分担していくわけですが、このアウトソースの仕方に問題がある場合が少なくありません。通常、SIer のコアコンピタンス は「プロマネ」「業務」「技術」の 3 つですが、 行き過ぎたアウトソースや協力会社への依存により、 社内にアーキテクトがいなくなっているケースが非常に多いです。その結果、現場あるあるとして以下のようなことが起こります。……というよりホントにこんな現場ばっかです;(涙)。

  • プロマネや業務 SE に対して 技術的視点から下支えする人材がおらず、技術的に正しい開発方針を取れていない
  • ベンダーや協力会社に対して不適切な指示を出してしまう。
  • 技術がわからないので協力会社の成果物を全くレビューできない。
  • 意味のない・効果の薄いドキュメントや報告書を大量に作らせてしまったりしている。

 このアーキテクト不在問題は SoR 型システム開発の改善を考えていく上で極めて根深い問題です。これについては、de:code 2017 DO-08 セッションにて詳細に取り扱っているのでご確認いただければと思うのですが、こうした状況を改善していくための基本的な手立ては以下の 2 つです。

  • 現在のプロマネや業務 SE の使っている、10 年前から進化していない SI 方法論を、近代的なものにリニューアルしていく。
  • 社内に技術がわかるアーキテクトを育てて保有していく。

 これらに関するマイクロソフト エンタープライズサービスの取り組みを私は「開発近代化サービス」と銘打っているのですが、具体的には以下のようなコンサルティングをお客様向けに実施しています。

  • A. 中堅層のプロマネ・業務 SE の再教育プログラム
  • B. アーキテクト育成プログラム

 以下に順に解説します。

[A. 中堅層のプロマネ・業務 SE の再教育プログラム]

 前述したように、モノづくりのやり方が変われば、設計手法やプロマネ手法もそれに合わせた見直しが必要になります。だからこそ、手持ちの仕事で忙殺されている業務 SE やプロマネの方々を、アーキテクトが技術面から下支えし、近代的な SI を実践していくことが必要なのですが、現状を踏まえると、以下の 2 つの問題があります。

  • そもそもアーキテクトが SIer の中にいない(or 不足している)
  • そもそも SoR 型システム開発における、「近代的な SI 手法」が(世の中的に)十分に整備されていない

 これらのうち、後者は非常に大きな問題です。先に述べたように、欧米は内製ベースの SoE 型システム開発を前提として、アジャイルや DevOps といった手法・プラクティス群を開発・整備し続けてきました。しかしその一方で、受発注ベースの SoR 型システム開発に関する「近代的な SI 手法」の改善に関しては手つかずで放置されており、全体としてはほとんど進化していません。私見ですが、おそらくこの問題は日本固有の問題ではなくグローバル共通の課題であり、これに対するソリューションは誰かが先陣を切って新しく作っていかなければならない状況である、と思います。そしてその先陣を切れるのは、SoE/SoR 型システム開発が共存する国である日本をおいて他にないだろう、とも考えています。

 なぜかというと、先に述べたように、SoR 型システム開発手法を進化させていく際には、SoE 型システム開発向けとして開発された各種の DevOps 系プラクティス群が参考になります。右から左に導入することはできませんが、本質論を踏まえて取捨選択しながら取り込んだり融合させていくことは十分にできるわけで(具体的な手法は de:code イベントセッションを参照)、こうした「SoR 型システム開発向けの近代的な SI 手法」を、自社の状況に併せて作り上げていくことが、SIer や IT 子会社の多くに求められている、と考えています。そしてこうした「他国/他社のいいところを参考にして、自分たちのやり方を上手に進化させていく」ことは、もともと日本のお家芸、だったのではないでしょうか?

 幸い、私はマイクロソフトというグローバル企業に所属しており本社の R&D 部門の手法の話やDevOps 系プラクティスについて聞く機会が多いこと、また日本のいわゆるエンプラ系システム開発現場に向けたコンサルティングサービスを 15 年以上手掛けていること、そしてこの領域をなんとかしたいという思いがあり、日本独自のソリューションとして開発近代化サービスを開発し、展開しています。具体的には、主に現場経験 10 年程度のプロマネ・業務 SE を対象として、V 字型モデル開発の基本を、現在の開発技術やトレンドに沿った実践的手法と共に学び直す、という再教育プログラムを開発・デリバリしています(実は de:code の昨年・今年の私のセッションは、この再教育プログラムからごく一部を切り出したものです)。

image

 内容としては、開発プロセス、チーム編成、外部設計、内部設計、ソフトウェアテストなどについて、日本の現状や欧米でのベストプラクティス、また日本の様々な現場に見られる課題の解決のヒントなどをひたすら紹介していく、というものになっています。実装方法を解説するものではないので、コードはほとんど出てこず、それ故に特にマイクロソフト技術に縛られる内容にもなっていません。実際の開発現場において「なぜそれをしなければならないのか」というところに踏み込むことで、プロマネ・業務 SE として外してはならない要点、SI において『幹』となる考え方やタスクをきちんと理解・習得していただくことを目的としています。

 また、こちらは単発トレーニングとして実施することも多いのですが、より踏み込んだお客様では、この内容を元に実際のお客様プロジェクトにおける設計・テストドキュメントの改善レビューを行い、より一層深い理解・改善をしていただいていることもあります。

[B. アーキテクト育成プログラム]

 もう 1 つは、そもそもの問題の根幹であるアーキテクト不足を解消するために、社内アーキテクトを育成していくプログラムです。アーキテクト育成のための設計・実装技術のスキルトランスファーといった昔ながらのサービスも手掛けていますが、アーキテクトとしての重要スキルの一つであるコンサルテーションスキルについても OJT での育成サービスを行っています。

 もう少し具体的に書くと、SIer や IT 子会社におけるアーキテクトは非常に貴重な人材であるため、共通部門(CoE, Center of Excellence)に集約され、下図のような様々なミッションを担っていることがよくあります。こうした人材はアーキテクトとしての活動を通して、究極的には現場向けの社内コンサルタントになっていくことが望ましいのですが、一朝一夕にコンサルタントとしての立ち振る舞いができるようになるわけでもありません。そこで弊社コンサルタントが『お手本』となって、ガイドラインの作成支援や実際の現場プロジェクト支援などに参画し、メンバーを育てていくといったこともしています。

image


■ ② 先進的ビジネスのための SoE 型開発への取り組み ~PoC ラボによるアイディアの早期具現化~

 さてここまで述べてきたように、SoR 型システム開発の改善は、従来のやり方の延長線で考えていくことが可能です。しかし SoE 型システム開発への取り組みに関しては、全く異なる発想とアプローチが必要になります。これについて、ビジネス的な背景も含めて少し掘り下げます。

 ご存じのように、昨今の IT(デジタル)は人々の生活(アナログ)をあらゆる面で支え、よりよいものにしています。このような変化は「デジタル変革」(デジタルトランスフォーメーション)と呼ばれていますが、このデジタル変革は極めて急激に進むという特徴を持っています。具体的に言うと、ひと昔前であれば Facebook や Google、そして最近であれば Uber や Airbnb などといった、いわゆるスタートアップと呼ばれる企業は、恐るべき速度でサービスを拡大してきました。そして既存企業がその速度についていけず、あっという間に既存ビジネスが破壊されるということが現実のものとなっています。

 この既存ビジネスの破壊において重要なポイントの一つは、そこで使われている技術は必ずしも新しいものではない、という点です。よく語られることですが、例えば 2007 年に発売された iPhone は、当時の既存技術を組み合わせて作られており、iPhone のために何か全く新しい技術が発明されたというわけではありません。この例からわかるように、現代は、すでに多数の「発明」(AI や VR などの革新的技術)が存在しており、それが「ユースケース」(使い方・ニーズ)の発見を待っている、そしてそれを最初に見つけてビジネス化できた人がイノベーションを起こす、という形になっているわけです。

image

 こうした「ニーズ」の発見には Try & Error による試行錯誤が欠かせませんが、昨今はクラウドの登場、デバイスのコモディティ化などによって IT 技術の利用コストが大幅に低減しており、挑戦のためのハードルが昔に比べて圧倒的に下がっています。その結果、数多のスタートアップ企業がリスクをどんどん取って、イノベーションへの挑戦(簡単に言えば「一発当てる」ための挑戦)を繰り返している、という状況が生まれています。米国におけるスタートアップブームの背景にはこうした IT 環境の変化があるわけです(このあたりは馬田さんの良著「逆説のスタートアップ思考」にて詳細に解説されていますので、興味がある方はご一読いただくとよいと思います)。

 上記のような状況を元に考えると、先進的テクノロジを使った新しいビジネスの取り組みに必要なポイントは以下の 3 つであり、マイクロソフト エンタープライズサービスではこれらに対応するサービスをそれぞれ展開しています。

image

 以下に順に解説します。

[A. 最新テクノロジの理解(インベンションの理解)]

 革新的なサービスを考える際、シーズ(種)となる最新技術を知ることは極めて重要です。特に事業部門のお客様に近ければ近いほど、ビジネスに深い造詣がある一方、最新技術を知らないことが多くなるため、こうした最前線の方々の業務知識と、最新技術とを突き合わせてみることがより重要になってきます。

 とはいえ数多の技術をすべて把握することは非現実的でもあります。こうしたことから、弊社では定着期に入りつつある技術を効率的に把握するための最新技術セミナーを用意しています。このセミナーによって、ビジネスアイディアとマッチングできる最新技術を探っていくわけです。

image

[B. ビジネスニーズの深掘り(ユースケースの模索)]

 2000 年以降に成人になった若者の方々をミレニアル世代と呼びますが、消費世代に差し掛かってきたミレニアル世代の人々の考え方は、旧世代の人たちとは大きく異なることが知られています。よく言われることとして、デジタルネイティブである、所有欲がない(シェア・利用)、出世よりワークライフバランス、自分が納得したものを消費する、ソーシャルで緩く繋がる、といったことが挙げられますが、こうした価値観の変化にうまく追随できていない既存企業が増えつつあります。

 実はこの問題はミレニアル世代に限った話ではなく、リーマンショック以降の生活様式の変化や人々の価値観の変化といったものに追随できないことで、新しい企業にお客様を奪われていくことがしばしば発生します。その大きな理由の一つとして、「従来型のビジネスを熟知していること」、すなわち過去の成功体験が発想・思考の妨げになることが挙げられます。こうした課題を解決していくためには、なによりお客様を深く理解すること、そしてそこから隠れたビジネスニーズを深掘り・発見していくことが必要になりますが、そのための手法として最近着目されているのが、デザイン思考(Design Thinking)と呼ばれる手法です。

 本論から逸れるため、ここではデザイン思考の詳細に立ち入ることは避けますが、もともとデザイン思考は優秀なデザイナさんによる物事の「思考方法」「考え方」を真似るところからスタートしており、下図に示すような発展の経緯を辿ってビジネスの世界へと入ってきています。このことからもわかるように、デザイン思考そのものは必ずしも IT に限定されるものではないのですが、近年では、こうした「優秀なデザイナさんによる物事の思考方法」を、各業界に特化した形で進化・発展させ、より使いやすい手法(プロセス)としたものが各社から提唱・提供されているようになってきました。

image

 マイクロソフトでもこうした流れを受け、デジタルエンビジョニングワークショップ(DEWS)という手法を開発し、サービスを提供しています。これはお客様への深い洞察を元に、新たなイノベーションを IT 技術との組み合わせにより生み出していくビジネスデザイン手法を体系化したもので、デジタルトランスフォーメーションへの足掛かりとして、現在マイクロソフト エンタープライズサービスよりサービスを提供しています。

image

[C. プロトタイプによる PoC 検証(Try & Error による模索)]

 さて、最新技術とユーザニーズの掛け合わせから生まれたアイディアは、PoC (Proof of Concept、プロトタイピングによる概念検証)により素早く具現化・検証していくことが必要です。前述したように、今日では IT 実現コストの低減により「まずは試してみる」ことが昔に比べて圧倒的に容易化しています。アイディアを素早く形にして試しいみることで、お客様からの F/B を早期に得ることができ、より優れたアイディアやビジネスに昇華させていくことができるわけです。

 こうしたアイディアの素早い具現化のためには、以下の 2 つが必要不可欠です。

  • 社内 PoC ラボセンターの設置
    アイディアの具現化は素早く社内で行うことが必要であり、いちいち請負型でベンダーに発注することは非現実的です。このため、PoC アプリ開発チームは社内に持つ必要があります。(社内アーキテクトは SoR 型システム開発におけるアーキテクトロールだけでなく、こうした取り組みでも活躍してもらう(=アーキテクトの人たちが先端技術を使って直接プロトタイプを実装していってもらう)ことになります。)
  • 高速開発基盤の整備
    Azure などのクラウドをフル活用した開発基盤を整備し、PoC アプリ開発チームが作成したプロトタイプをすぐさま配置してテストできる環境を整えておく必要があります。

 なおこれらの取り組みは、SoE 型システム開発における PoC 検証はもとより、従来の SoR 型システム開発においても有効性が高いです。なぜなら PoC によるプロトタイピングで十分に UI などの要件を煮詰めたうえでベンダーに発注することにより、見積もりブレや手戻りなどのプロジェクトリスクを極小化することができるためです。

image

 弊社マイクロソフト エンタープライズサービスでは、上に示したような取り組みをしやすくするため、以下のようなサービスを展開しています。

  • PoC ラボセンターの提供
    弊社コンサルタントチームが(場合によってはお客様先に常駐して)実際に PoC を回し、高速にお客様アイディアを具現化していく。
  • Azure PaaS 開発基盤の整備
    Azure を利用する場合のリファレンスアーキテクチャガイドの整備などを実施する。

■ マネジメント層に求められる役割

 さて、ここまでマイクロソフト エンタープライズサービスが手掛けてきているエンプラ系 SIer 向けの取り組みをご紹介してきましたが、こうした取り組みを実際に進める際には、マネジメント層にも重要な役割を担っていただく必要が出てきます。それは、SoR 型システム開発と SoE 型システム開発とを分離し、そこに適切な経営レベルの判断を入れる、という点なのですが、このポイントは非常に重要なため、最後に解説して締めくくっていきたいと思います。

 前述した SoR 型システム開発への取り組みは漸進的アプローチ、すなわち従来の取り組みを改善していくアプローチである、ということができます。一方で、SoE 型システム開発への取り組みは革新的アプローチであり、リスクを取って進めていくべき性格が強いものです。このため、適用対象となるプロジェクトも違えば、個々の社員の向き不向きも異なってきます。もちろんノウハウを交換しあうことは重要ですが、全社一律のルールで管理しようとすると、様々なところに無理が生じます。故に、会社の中で、SoR 型システム開発への取り組みと、SoE 型システム開発への取り組みとをきちんと分けてそれぞれ考えることがまず重要になるわけです。

 また、特に SoE 型システム開発でイノベーションへ取り組む場合には、マネジメント層の『投資判断』が必要になることもしばしば発生します。イノベーションに必要なユースケースの発見には、相当な Try & Error が求められるのですが、実際のスタートアップ企業の打率はかなり低く(例えば 100 社に投資しても 1 社成功するかどうか、しかしその成功する 1 社は 1 万倍のリターンがある、といった具合)、ハイリスク・ハイリターンの博打的な側面があります。こうしたところに企業としての合理的な判断(例えば ROI や短期的なリターンなど)を求めると、イノベーションへの取り組みは必然的に失敗します(これをイノベーションのジレンマと呼びます)。

 こうした問題から最近着目されているのが「バーベル戦略」という考え方です。これは大半のリソースは従来通り安全牌にかけておき、一定のリソースをハイリスク・ハイリターンに賭けてイノベーションを目指す、というものです。先に述べたように、スタートアップ的な領域への投資では一発の大当たりが他のすべての失敗を帳消しにするものの、実際には「全部失敗することもありうる」わけで、余剰体力が残っているうちに、余剰体力で新しいビジネスの芽を見つけるために頑張るわけです。

image

 マネジメントは何かと現場に ROI を求める傾向がありますが、ROI が算出できるのであれば、マネジメントの判断など不要です原理的に白黒が付けられない投資(リソース投入など)に対して、自らの裁量、そして KKD (勘と経験と度胸)で判断をすることこそがマネジメントの仕事である、私はそう考えています。(← KKD はそういうところで使うべきものだと私は思います)

 本 blog で解説したような取り組みでは、必ず投資モードで行う作業が発生すると思います……が、そうした取り組みをいつ、どの程度、どのような形でやるのか。それを判断しサポートするのはマネジメント層の役割であり、経営判断がどうしても必要な領域になります。マネジメント層の方々には、ぜひ現場メンバーの積極的な姿勢や取り組みをサポートし、会社やチームの活性化につなげていただければと思います。


■ まとめ

 本 blog では、私が所属するエンタープライズサービス統括本部のコンサルティングの取り組みのご紹介を通して、『変わらない開発現場』に苦しむ IT 子会社さんや SIer さんの改善の取り組みのヒントになる情報を執筆してみました。要点をまとめると、以下の通りとなります。

  • システム開発の改善を考える場合には、SoE 型システム開発と SoR 型システム開発とに分けて考える。
    • SoE 型システム = 「コンシューマ向け、フロントエンド、オープン、B2C」といった特性を持つシステム、コンシューマ向け Web サイトやゲームアプリなど
    • SoR 型システム = 「エンタープライズ系、バックエンド、基幹系、B2B/B2E」といった特性を持つシステム、金融系勘定システムなど
    • これら 2 つは開発特性が全く異なるため、分けて考える必要がある
  • 欧米の手法を右から左に導入するのではなく、システム開発特性を意識した上で導入する。
    • アジャイルや DevOps などの手法は、SoE 型システム開発の文化の中で進化・発展してきたもの。
    • 日本国内には SoE 型システム開発と SoR 型システム開発の両方が共存している。このため、SoR 型システム開発へ欧米の手法を導入する際には、各種プラクティスを取捨選択しながら段階的に導入し、現場改善につなげていく必要がある。
  • SoR 型システム開発の改善は、以下の 2 軸で考えていくとよい。
    • 現在のプロマネや業務 SE の使っている、10 年前から変わらない SI 方法論を、近代的な SI 方法論にリニューアルしていく。
    • 社内に技術がわかるアーキテクトを育てて保有していく。
  • SoE 型システム開発の改善は、以下の 3 軸で考えていくとよい。
    • 最新テクノロジの理解(インベンションの理解)
    • ビジネスニーズの深掘り(ユースケースの模索)
    • プロトタイプによる PoC 検証(Try & Error による模索)

 システム開発現場の悩みは、SIer ごと、開発現場ごとにそれぞれ異なると思います。本エントリの解説を参考にしていただいて、現場改善のための具体的な戦略立案、そして実行へとつなげていただければ幸いです。

[Sample Of May. 25] How to Create Master-Detail ListBox in a universal Windows app

$
0
0
image
May.
25
image
image

Sample : https://code.msdn.microsoft.com/How-to-create-detail-b87a60fa

This sample demonstrates how to create master-detail ListBox in a universal Windows app.

image

You can find more code samples that demonstrate the most typical programming scenarios by using Microsoft All-In-One Code Framework Sample Browser or Sample Browser Visual Studio extension. They give you the flexibility to search samples, download samples on demand, manage the downloaded samples in a centralized place, and automatically be notified about sample updates. If it is the first time that you hear about Microsoft All-In-One Code Framework, please watch the introduction video on Microsoft Showcase, or read the introduction on our homepage http://1code.codeplex.com/.

Viewing all 35736 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>