Showing posts with label Azure. Show all posts
Showing posts with label Azure. Show all posts

Monday 6 June 2016

Hybrid SharePoint and Office 365 Authentication Thoughts

Overview: Hybrid scenarios allow enterprise users to seamlessly interact between SP Online and SP on-prem instances, provide search across on-prem and online sites, access data on-prem. while using Office365/SP Online, use Office 365 apps like Flow, Video, Graph and utilise OneDrive.  Picking the right authentication allows users to have a seamless high-value experience bringing together secure access quickly.  Pretty important and to make this happen you need to deal with access.

Organisations have internal authentication mechanisms such as Microsoft's Active Directory.  Large organisations have a tough time migrating to the cloud and with the rapid changes in Security and the cloud this post aims to broadly define paths or options for architects such as myself to follow.

Options 1. Do nothing.
The 1st option is to ignore the cloud but I am going to presume you want to take advantage of Office 365.

Options 2.  Only use the cloud/O365.
Office 365 is huge and for a small or new business, I would strongly look at only using O365 using Azure AD (AAD) credentials.  This means no or little management of Active Directory (AD) and you can pretty much connect to the whole Microsoft SaaS offering quickly.  Most large SaaS offering can work with Microsoft AAD.  Generally, this option is not suitable for large enterprises.

Option 3.  Internal AD and externally use Office 365 Azure AD.
Easy to implement as the internal and external credentials do not link.  Your users do not get a single sign-on (SSO) experience.  Users use the Azure AD credentials when working with Office 365 and your internal credentials when working on the internal network.  The user needs two accounts and to know when to use them.

Option 4.  Internal AD synchronized and creates similar accounts on Azure AD.
Pretty much the same option as option 3 but the usernames appear to be the same to the end users. There are a few variations in this space, you can simply create the accounts with the same name either manually, using a CSV import or using Directory Sync (DirSync).  At this stage, the passwords and accounts are managed separately, the DirSync reduces effort and provisions and removes accounts in Azure AD to match the companies on-prem. AD.  DirSync will reach the end of support in April 2017.

Option 5.  Internal AD automatically syncronises with Azure AD including password sync.
You still have 2 accounts but the accounts on both sides are kept aligned using DirSync and password synchronization.  The same password is stored both in your on-prem. AD and in Microsoft's Azure AD for each user.  The advantage here is that the user name and password for a user is the same if using internal or external applications secured by on-prem. AD or AAD.  This is not SSO enabled, the user needs to login to both AD's separately.

Option 6.  Azure Active Directory Connect.
Similar to option 5 but the Azure AD Connect tooling does all the synchronization of accounts between on-prem. AD and AAD.  This option/method is easier than option 5 and the latest approach but fundamentally it is the same approach with 2 identical accounts for each user.
Note: Only 1 AAD Connect per AAD B2C tenant.  If you have multiple AD's (e.g. AD forest), you use a single instance of AAD connect to grab each AD's objects.
Note: AAD Connect can write back properties to AD on-prem. but it can't create objects/account.
Note: AAD Connect can selectively grab accounts e.g. exclude some OU's.
Note: Default replication is every 30 minutes, but he pswd hash syncs every 2 min, you can config Azure password rest to push back to on-prem. AD if you use password hash sync.

Options 7.  Federate (ADFS)
Active Directory Federation Service (ADFS) provides an Identify Provider and can pass claims based authentication between a trusted Identity Provider.  This post does not explain passive Identity authentication but this is the more advanced option.  There are a lot of federation services but ADFS tends to be the most common (ThinkTexture, Ping, SiteMinder).




Home Realm Discovery (HRD)

When accessing SharePoint Online, you go to AAD as each SPO has it's own AAD.  On AAD you may have ADFS, partners Ping Federation service, other organisations AAD to actually authenticate the user.  So the login experience needs to know where to authenticate the user.  To do this use MS and you can also build custom HRD.  When the user enters the username or email, they are forwarded onto the appropriate ADFS or Federation service to authenticate the user.

Ariel Gordon describes HRD at Microsoft below: 
"How does Home Realm Discovery work?
In the cases above, apps direct users to Azure AD's common endpoint, and Azure AD shows a generic sign-in page. This page waits for users to enter their username then, as soon as the focus moves away from the username field, it makes a server call to look up the configuration for the user's domain. In case of a federated domain, the login page then initiates a redirect to the federation server, such as ADFS. Users then enter their credentials on the federation server's own login page which displays their organization's branding.
When we introduced Company Branding last year, we mimicked this UX behaviour: the Azure AD sign-in page starts off with generic branding then looks up the organization's branding elements after the server call is made. In both cases (federation and company branding) the goal is to ensure that users enter their credentials on a page that reflects their organization's brand.
When does it make sense to bypass Home Realm Discovery?
If your application targets users in a single organization, there's no need to use Azure AD's Home Realm Discovery and you can "accelerate" users to their organization's sign-in page. To do this, your application needs to pass a domain hint to Azure AD, effectively stating "I've already established that the user who's about to sign in is from <this organization>."
When Azure AD receives such a hint, it performs Home Realm Discovery on the domain name hint before rendering a single pixel. If the domain is federated, Azure AD immediately redirects users to the federation server. If the domain is managed, it checks whether Company Branding has been configured for the domain and displays it when found."

Sunday 3 January 2016

Azure Virtual Machine Basics

Azure Virtual Machine Basics
Windows Azure Virtual Machines
  • Azure charges per minute pro-rated
  • Disks explained:
    • C: OS disk
    • D: Temp Cache such as Page File (won't be persisted in a disaster)
    • F: ... Persist disk storage (Add disks as shown below)
  • Access the VM by default RDP sessions and remote PS are allowed.  








  • Need to add endpoints to allow other means of access e.g. 443 for https traffic.







  • Availability Sets are used to to load balance with more than 1 VM
  • Add a new F drive to the VM




Saturday 25 April 2015

DevOps Tooling

DevOps Tooling Notes

DevOps Tooling is broken down into the following areas, note the tools often overlap in function.  The list is not exhaustive but these are the more common tools I have come across.
  1. Version Control: TFS, Git, SVN, ...
  2. Bug Tracking: ServiceNow, Jira, ZenDesk
  3. Continuous Testing: Selenium, Jasmin or Mocha or Unit.js (JavaScript testing), NUnit, Web Tests (Visual Studio), SpecFlow
  4. Continuous Integration (CI)TeamCity, Jenkins, Azure DevOps (bigger) 
  5. Configuration Management and Deployment:  Puppet, Chef, ANSIBLE, SALT  (all installed on Linux, obviously work on Windows environments)
  6. Containers: Docker, Kubernetes, Microsoft Containers. I think the Azure AKS is pretty much containers for Azure now.
  7. Other:  PowerShell, VMWare, HyperV
RESTful API Tooling
  1. Swagger - awesome.  Swagger is a set of tools that help document, build and test your API  (Your API conforms to the OpenAPI specification or Swagger specification).  Great way to get a contract for users of the API early on.  Updated 2019/11/25Link to Swagger post
  2. Swagger UI, Swagger Integrator,...
  3. Apiary - UI to create an API and publish with mocks.  I prefer Swagger or on simple projects APIM.
  4. API Management (APIM) - flexible Azure service for bring together multiple API securely.  Same as MuleSoft.  Can import OpenAPI's v2 or v3 to create a hosted API.  Can mock and built in test tool.
  5. RAML is an alternative to Swagger and Apiary (never used)
  6. Blueprint - API documentation tool.  Pretty simple and nice results.
  7. Postman - send http requests to the API.  Postman is a REST client useful to check your API.  This is my main tool for testing, exploring REST based API's.  
  8. SoapUI - if working with SOAP/XML.
  9. Slate - API documentation - I always use OAS/OpenAPI/Swagger.
  10. Fiddler - I'm old school and still love Fiddler and it's capabilities.  Fiddler is a great HTTP debugger.  
  11. BURP - an HTTP debugger to review traffic.  I've used BURP for security testing and it is great for API debugging.  
  12. Charles is another HTTP debugger (never used).
  13. cURL - Cmd line to test API's using HTTP, separate exe to run on Windows, Windows 10 has cURL built in.
  14. Visual Studio
  15. Wireshark - Over the years I have needed packet sniffing to fix issues and always go to Wireshark, I used the tool in the 90's but it had a different name.  Extremely useful for issues relating to firewalls, especially when an environment reacts differently to another working DTAP environment.
  16. Tcpdump is another packet sniffer
Testing:
http://www.incyclesoftware.com/2014/02/executing-selenium-ui-tests-release-management/

More Info:
http://blog.sharepointsite.co.uk/2014/02/devops-and-sharepoint.html
http://www.networkworld.com/article/2172097/virtualization/puppet-vs--chef-vs--ansible-vs--salt.html
http://blog.sharepointsite.co.uk/2013/11/iac-presentation-for-sharepoint.html


Sunday 1 July 2012

Azure Web Sites

Overview:  I love Azure.  There is just so much we can now do and a new feature released in June 1012.  The "web sites" function in Windows Azure (WA) are extremely flexible and this post shows how you can create a website using various templates in my case a Joomla CMS web site complete with a My SQL database.

There are a lot of options for using Azure web sites such as creating your own web sites in Visual Studio and uploading them to the Web Site role (all for free).  In this post I'm looking at leveraging a CMS to create a web site.  Windows Azure offers up to 10 free web site roles.  There are a lot of templates in the gallery so I feel this is a great place for design agencies and small business that need commercial web sites such as CMS, blogs ect.  They even have the WordPress template.

Steps to get Joomla working:
You will need a Windows Azure (WA) account, you get a free 90 day trial and if you hook your MSDN to it you get a decent amount of extra cloud computing hours thrown in. But for the 10 free "web sites" you don't use your cloud hours - it's free!

Once you are logged into the portal click the Add (+ button on the bottom left of the screen to add new services.  In this case select "Web Site" > "From Gallery" as show below.
Select the "CMS" tab and in my case I chose the "Joomla" template.
 Add the site name and login credentials as prompted (you can add a CName record later).
 The web site is created that backs onto my MySQL database.
Check the url and build your site.
Summary:  Web sites in Azure are easy, they are backed up by MS, there are tons of templates or build your own options, it free.  Microsoft is adding functionality and new services to Azure quickly and is easy to use.    

Friday 29 June 2012

Azure WCF Role - url issue

Problem:  Created a WCF service using Visual Studio (VS) 2010, I called my endpoint TimesheetBOL.svc.  This WCF worked perfectly when deployed locally but then I used the Azure emulator or the Azure Service role, the scv endoint was pointing to the local machine and not using the host header.
Here is the issue. I have a simple service that I deployed to Azure. It is accessible via:
http://tspaulbeck.cloudapp.net/TimesheetBOL.svc but the link to the wsdl uses the internal machine name instead of the host header, like this:
svcutil.exe http://rd006123e/TimesheetBOL.svc?wsdl Obviously, the wsdl is not accessible.

WCF test util throws the following error:
The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.
Server stack trace: at System.ServiceModel.Channels.CommunicationObject.ThrowIfDisposedOrNotOpen()

Resolution:  Us an attribute supported in .NET 4, "useRequestHeadersForMetadataAddress".




Saturday 23 June 2012

Windows Azure SDK update

Problem: I want to ensure I have the latest Visual Studio 2010 .NET SDK for Windows Azure.

Initial Hypothesis: Check the version of Visual Studio (VS) by open VS click > Help > About Microsoft Visual Studio.


I know version 1.7 is the current release as of 23/06/2012.
Update 27 October 2012 - The latest version is 1.8 released in October 2012.

Resolution:

Unlike the extension manager that can check for updates, I don't think this is an option with the Windows Azure SDK.  I manaually installed the latest SDK (version 1.7).  https://www.windowsazure.com/en-us/develop/downloads/



Verify that the WA SDK has been updated for VS2010.


Note: At the time of this post Visual Studio 2012 RC is available I am using VS2010 to do my Windows Azure dev.