Implementing Device AuthN & Conformity at Pinterest|by Pinterest Design|Pinterest Design Blog Site|Jan, 2023 

Armen Tashjian|Safety Designer, Corporate Safety

Flow map from User to Okta to External Identity Provider to Device Compliance Check with an arrow back to Okta “User redirected back to Okta to proceed with authentication.”

Pinterest has actually imposed making use of handled and also certified tools in our Okta verification circulation, making use of a passwordless execution, to make sure that accessibility to our devices constantly needs a healthy and balanced Pinterest tool.

Complying with the phishing-based strikes versus our peers in the technology sector, Pinterest chose to take a 2 pronged technique to prevent comparable strikes. We chose to:

  1. Call for a handled and also healthy and balanced Pinterest tool be made use of to access all Pinterest sources, also when in the belongings of legitimate qualifications
  2. Call for FIDO2 qualifications for customer verification

In this message, we’ll be concentrating on exactly how we needed making use of Pinterest handled tools in our Okta verification circulation.

Photo 1: An individual on an Android tool is protected against from confirming. Photo 2: An individual on macOS is cautioned concerning some conformity failings.

There are a couple of driving pressures behind this effort:

  • With the intro of our PinFlex WFH plan, we anticipated an enhanced variety of workers communicating with Pinterest devices and also solutions beyond the workplace.
  • For staff member encountering devices, Pinterest is a SaaS-first firm, which indicates that the substantial bulk of our devices are web obtainable. These devices will certainly stay internet-accessible either voluntarily, or as a result of the absence of indigenous IP-based allowlisting capacities.
  • Our cravings for network-centric safety and security controls has actually decreased. While that does not imply that VPN or on-premise network-based accessibility will certainly be completely vanishing, we acknowledge that our default setting will not be to require individuals to be on a certain network in order to accessibility sources, specifically a SaaS device.
  • We have a collection of essential safety and security manages that just feed on company-managed tools and/or Mobile BYOD with MDM.

We really feel that calling for a handled and also healthy and balanced tool for verification minimizes a few of the shed safety and security limits explained over, by making sure that:

  • Phished customer qualifications (whether password, OTP, or press notice) will certainly not cause accessibility to Pinterest sources.
  • Internet-accessible Pinterest devices, consisting of those that might include delicate information, can not be accessed from unidentified or unmanaged tools.
  • Handled tools will certainly remain in a hard state, making it harder for enemies to acquire a grip.

While looking into the various combination choices within Okta, a couple of points emerged for Okta Standard clients:

  1. The existing bespoke tool relevant assimilations that do exist in between MDM suppliers and also Okta, such as Tool Trust Fund with Jamf or WS1, do not offer extensive services to clients.
  2. If an Okta consumer or a prospective supplier intends to incorporate with Okta to do something “fascinating” with the verification circulation, the only method for doing so is to develop common count on with some outside identification supplier (IdP), where those “fascinating” points can occur.

As A Result, we really did not have much of an option however to construct and also path individuals to our very own custom-made identification supplier. Zuul (apologies Netflix) is an OIDC identification supplier that the Pinterest safety and security group developed, in order to include our tool auth and also conformity demands right into the Okta verification circulation.

Flow map from User to Okta to External Identity Provider to Device Compliance Check with an arrow back to Okta “User redirected back to Okta to proceed with authentication.”
Photo 3: High degree circulation representation of Okta verification with idP Routing/Discovery

Like a few of the suppliers in this area, we incorporate our IdP with Okta making use of IdP Routing/Discovery, where our IdP serves as a relied on outside identification supplier. We incorporate with Okta making use of the “IdP as SSO” technique, instead of the “IdP as a Factor/MFA” technique, as the last disputes with our FIDO2 execution.

At its core, and also from Okta’s point of view, our IdP is absolutely nothing greater than a certified OIDC IdP. Currently that we are in the crucial course for SSO verification, the whole experience, as well as the success of the verification demand, can be boosted to implement the usage of a handled and also certified tool.

Among the difficulties that requires to be gotten over with any type of device-based service is having the ability to link a verification effort with a particular tool. This need is why a certificate-based technique was an appealing alternative.

We provide certifications to all handled tools, consisting of desktop computer and also mobile systems, with our MDM service, which needs individuals to validate in order for a credential to be released to the tool. This permits us to:

  1. Identify the customer identification prior to communicating with them (e.g. FIDO2) by inscribing the customer identification in the PKI certification released to the tool throughout MDM registration
  2. Connect a verification effort with a physical tool, as the certification was released to that tool throughout registration
  3. Stay clear of platform-specific representatives, as certificate-based verification is natively sustained on the systems that we sustain at Pinterest, so we have the ability to benefit from a platform-agnostic technique to verification

Our custom-made IdP just sustains mTLS verification with customer certifications, making use of certifications that are connected both to a customer and also tool. Without a legitimate customer certification, which is just dispersed to handled tools, verification to our IdP is not feasible.

For applications that do not sustain Common TLS verification, for the factors explained in the followup post, a workaround exists to change back to password-based verification.

One more obstacle to get over is Okta’s absence of “enforcement” of an exterior identification supplier. We can path individuals to an exterior identification supplier, Okta does not offer the devices required to appropriately implement the usage of an identification supplier.

Okta plainly shows that making use of IdP Routing, and also matching IdP Directing Guidelines, is not a protection control:

Directing policies boost the end-user sign-in experience, however they do not offer safety and security improvements. You require to set up customer verification plans for your IdPs individually of your directing policies.

This successfully indicates that we can not count on outside IdP as being anything greater than an “optional” kind of verification. Without taking any type of added actions to implement making use of an exterior IdP, it is minor to bypass making use of an exterior IdP by returning back to Okta username/password-based verification.

In the quote over, Okta mentions “customer verification plans” as an approach of enforcement. Had actually these referenced plans been real “application sign-on plans,” enforcement would certainly have been a non-issue. The only Okta plans that exist are “international sign-on” plans, which can not account for the unpreventable application exemptions that you will likely run right into, and also are consequently not functional to utilize.

SAML Inline Hooks enable an exterior solution to customize a SAML assertion prior to that SAML Assertion is authorized by Okta. Externally, that’s not truly pertinent to a tool verification service, however there is one remarkable return kind that stimulated our rate of interest: the capability to deny a gain access to effort by returning a mistake.

The demands sent out by Okta in a SAML Inline Hook include some pertinent details concerning an application accessibility effort, consisting of:

  1. The application that is being accessed
  2. The customer trying to access the application
  3. Exactly how the customer’s Okta session was developed

In the instances listed below, keep in mind the distinction in between the “sessions” in these 2 application accessibility efforts.

Gain access to effort to deny (outside IdP not made use of)

" context":
" procedure":
" company":
" id": "app_id",
" name": "application_name",
" uri": ""
" session":
" idp":
" id": "okta_idp_id",
" kind": "OKTA"

Gain access to effort to enable (outside IdP made use of)

" context":
" procedure":
" company":
" id": "app_id",
" name": "application_name",
" uri": ""
" session":
" idp":
" id": "zuul_idp_id",
" kind": "SOCIAL"

This indicates that we can programmatically make an access-based choice for every single solitary application accessibility effort. For a gain access to effort that must continue, we return a vacant action. For accessibility efforts that require to be denied, we toss a mistake. To put it simply, we can get over whatever restrictions exist in Okta application sign-on plans by bolting on our very own custom-made application sign-on plan making use of an inline hook.

To boost the customer experience, we additionally withdraw a customer’s Okta session when this mistake is emerged.

In the instance listed below, a customer has actually developed an Okta session with among the lots of manner ins which IdP directing can be bypassed, in an effort to bypass our tool demands. They still can not access an application that needs our outside IdP.

User is directed to a 400 bad request screen and has to be redirected back to the hompage.
Photo 4: SAML Inline Hook obstructs an application accessibility effort, as a result of an Okta session that was not developed with the appropriate idP

Although SAML Inline Hooks stand for an excellent momentary service for us, this is never optimal. SAML Inline Hooks need to be made it possible for on a per application basis and also can just be made it possible for on applications that are by hand set up in Okta, so some reconfiguration of applications could be required. We are preparing to reconfigure applications that were downloaded and install from the Okta Combination Network for the single objective of allowing our SAML Inline Hook on those applications.

We are confident that Okta will certainly launch something, in either Okta Standard or OIE, that enables us to natively implement an IdP on a per application basis, with a setup that additionally permits FIDO2 enforcement. An “Inline Hook” for basic verification that can be globally used to every Okta application would certainly additionally be an intriguing choice.

Since every Okta verification effort needs individuals to validate versus our IdP, we have the possibility to examine the health and wellness of a tool. The intent of our conformity plans is to implement our safety and security setting standards to guarantee that the fleet of tools that can accessing our devices remain in conformity and also in a hard state.

On the occasion that a tool with conformity failings tries to validate, we can take a couple of activities, consisting of offering an alerting to the customer, or for some plans, obstructing the verification effort completely.

User is directed to a screen that reads “There are one or more issues with your device. Warnings: chrome_running_versions and uptime.”
Photo 5: An individual on macOS is cautioned concerning some conformity failings.

Our conformity structure enables some capacities that was necessary to us and also are not generally seen in various other services. This consists of:

  1. Plans that are specified as code, enabling us to develop complicated plans if required
  2. Plans that can take into consideration information from as lots of information resources as required. We presently incorporate with Splunk, Cook, Work Space One, and also osquery, with even more assimilations prepared.
  3. ” Activities” that are implemented upon the failing of a plan, 2 of which we receive this post (Block/Warn)
  4. The capability to gradually shard a brand-new plan throughout the fleet, utilizing our existing manufacturing structure for releasing experiments

Listed below we have actually produced an instance plan to guarantee that a customer confirming to Okta is doing so from a tool that is possessed by them and also visited on that particular tool with a coordinating username.

Photo 6: An individual on macOS is protected against from confirming as their tool is falling short the instance plan “username_mismatch”.

Below is the code connected with this instance plan. In order to execute this examination, we take information gathered from 2 various information resources (Airwatch MDM and also osquery), and also contrast the usernames with the individual trying to validate to Okta.

name=" username_mismatch",
decider=" zuul_device_policy_username_mismatch",
activities =[PolicyAction.BLOCK],
individuals =["atashjian"],
tools =[PolicyScope.ALL_DEVICES],
user_exception =[],
device_exception =[],
resources =[DataSource.OSQUERY, DataSource.AIRWATCH],
staleness_threshold= 2400,
systems =[DevicePlatform.MACOS],
remediation_message=" The customer trying to auth, the neighborhood username on the tool, "
" and also the tool proprietor, need to all match."
def username_mismatch( tool):
"' guarantee that the customer that's confirming, the customer visited on the tool, and also the tool proprietor suit.
authenticating_user = device.username
device_logged_in_user = device.collected _ information[DataSource.OSQUERY] information['results']['data']['logged_in_user']['username']
airwatch_device_owner = device.collected _ information[DataSource.AIRWATCH] information['UserName']
if authenticating_user == device_logged_in_user == airwatch_device_owner:
return PolicyResult( outcome= PolicyEval.PASS)
return PolicyResult( outcome= PolicyEval.FAIL,
information= f" Customer Authenticating: {authenticating_user}, "
f" Tool Proprietor: {airwatch_device_owner}, "
f" Visited Customer: {device_logged_in_user} ")

Prospective future conformity plans could take into consideration:

  1. Spot standing
  2. Malware discovery
  3. Safety and security representative health and wellness
  4. Log consumption health and wellness
  5. Application/browser expansions
  6. Kernel/system expansions
  7. Origin CAs
  8. CIS setting standards
  9. And also great deals of various other points!

We have actually just started our tool conformity trip, and also an excellent quantity of job exists in advance, consisting of:

  • Constantly ordering tool conformity plans
  • Added assimilations, for both gathering information, along with executing activities in case of failings
  • Assessing tool conformity not simply at verification time, however on a continual basis
  • Closing the Okta enforcement spaces by allowing SAML Inline Hooks throughout all applications

A huge thanks to our companions in IT and also Website traffic Design, for aiding Company Safety and security to execute this, and also an unique reference mosts likely to Jason Craig, a human.

Remain tuned for some followup article, consisting of:

  • Our FIDO2 execution
  • An extra extensive check out tool conformity

For any type of ideas or responses, do not hesitate to connect to zuul[at]

Intrigued in discovering more concerning this subject? Look into the 2nd component of this blog site post below: Employee-facing Common TLS.

To find out more concerning design at Pinterest, look into the remainder of our Design Blog Site and also see our Pinterest Labs website. To discover life at Pinterest, see our Jobs web page.