SharePoint, Office 365, Azure, and Front end JS geek. – Chicago IL
SharePoint, Office 365, Azure, and Front end JS geek. – Chicago IL

October 2017

VIDEO – HTTP Header Client Secret protected Web API

Watch the video below to see a demo of protecting WebAPI with HTTP header and a Client Secret.    By default, new Web API projects lack any security mechanism and are open to any anonymous user.    Protecting Dot Net methods with an IF() statement condition provides a simple security mechanism to ensure only users who know the Client Secret are able to run the API and execute the method.

NOTE – Check out http://www.spjeff.com/2017/10/05/video-azure-ad-protected-web-api-in-an-angularjs-spa/ for more complete WebAPI security with Azure AD.

Cheers!

shades_smile

Video

Screenshots

image

Code

References

VIDEO – Azure AD protected Web API in an AngularJS SPA

Recently I walked through an Azure AD Web API sample project on GitHub at https://github.com/Azure-Samples/active-directory-angularjs-singlepageapp-dotnet-webapi and recorded a brief 14 minute video of the install and deployment steps.   Watch below and enjoy.  Cheers! 

shades_smile

Video

Screenshots

image
image

image
image

Error Message

Could not load type ‘System.IdentityModel.Tokens.TokenValidationParameters’ from assembly ‘System.IdentityModel.Tokens.Jwt, Version=5.0.0.127, Culture=neutral, PublicKeyToken=31bf3856ad364e35’.
( others at IdentityServer3#3017 saw the same with JWT breaking change)

Extra NuGet Package Step

References

FIXED – Workflow 2013 Suspended (Event ID 563) – No valid outbound signing keys were found

Recently I came across a condition where Workflow 2013 instance were not running.   Root cause was a missing outbound certificate.   Below are screenshots and PowerShell steps to resolve.  No Windows service restart, reboot, or IISRESET was needed.   Just apply config and test again.  Cheers!

shades_smile

Resolution Steps

1) Verify outbound certificate missing.  Expect $oc to be null.

2) Locate thumbprint of certificate with most forward expiration

3) Apply thumbprint and certificate

4) Test by running Workflow 2013.  Open web browser and click WF2013 test to run again.   Verify completed without errors.  Bonus points if the workflow has an email step and you receive the email OK.

Errors

  • EventID 563: Private key certificate with thumbprint ‘F4545D83AE81EBA21996B139BB44E614145F9057’ could not be found in the local machine certificate store. This may cause failures for running workflows which depend on this certificate.
  • Details: An unhandled exception occurred during the execution of the workflow instance.  Exception details: System.InvalidOperationexception: No valid outbound signing keys were found. at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute (ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.Execute.ActivityWorkItem.ExecuteBody (ActivityExecutor exectore, BookmarkManager bookManager, Location resultLocation)

Screenshots

clip_image001
clip_image001[6]
image
clip_image001[8]
image
image

References

© Copyright 2016
@ SPJeff

Return to Top ▲Return to Top ▲