iCloud two-factor authentication on OS X Yosemite
As outlined in the Apple support document, Availability of two-factor authentication for Apple ID:


  Two-factor authentication is available to iCloud users with at least one device that's using iOS 9 or OS X El Capitan or later.


Since your iOS devices are running iOS 11, you should be covered.