Beta

Create a tenant

A new tenant starts with its own users, OAuth settings, audit history and logs. You are its first Tenant Admin.

Connecting a directory to cloud sign-in

Cedar Inc. is moving its expense reporting to a cloud application, and Riley's account lives in Cedar's Active Directory. This lesson keeps apart the two connections that make that work, provisioning and sign-in, compares three places Riley's password can be checked, and plans for leavers, outages and a careful migration.

Two connections to reason about

Cedar Inc. is moving its expense reporting to a cloud application. Riley and the rest of the finance team will use it first. The application relies on a cloud directory, and Cedar's people already have accounts in Cedar's Active Directory. Getting Riley from one to the other takes two separate connections, and most of the trouble in hybrid setups comes from treating them as one.

The first connection is provisioning, often called synchronization. It moves selected account data from Cedar's directory into the cloud directory: who exists, their names and email addresses, which groups they are in, and whether their account is active. The second is authentication: when Riley signs in to the expense application, some party has to check Riley's password or other credential. Provisioning an account answers neither "how does Riley sign in?" nor "what may Riley do in the expense application?".

Provisioning starts with deciding which system is the source for each field and how accounts on the two sides are matched. Cedar uses each directory account's permanent identifier as the anchor, so the match survives a change of name or email address. Here is the cloud directory receiving Riley's account over SCIM, the provisioning protocol introduced in SCIM requests and responses:

POST /scim/v2/Users HTTP/1.1
Host: directory.cloudsuite.example
Authorization: Bearer demo-provisioning-token-3
Content-Type: application/scim+json

{
  "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
  "externalId": "0f6c2b8e-41d3-4a7e-9b52-7d1e3c9a0f64",
  "userName": "[email protected]",
  "displayName": "Riley",
  "emails": [{ "value": "[email protected]", "primary": true }],
  "active": true
}

The externalId is the anchor taken from Cedar's directory. The request creates an account and nothing else. It does not give Riley a way to sign in, and it does not give Riley any permission in the expense application. All names, hosts, identifiers and tokens in these examples are fictional.

Where is the password checked?

Riley's password lives in Cedar's Active Directory. When Riley signs in to the cloud application, there are three common ways to decide whether it is right, and each puts the check in a different place.

With password hash synchronization, the provisioning connection also sends a further-hashed form of each directory password hash to the cloud directory, which then checks Riley's password itself. The cloud directory never receives the password, and what it stores is not the NT hash Active Directory uses, so it cannot be used for pass-the-hash against Cedar's own servers. With pass-through authentication, the cloud directory takes the password Riley typed and passes it, encrypted, to an agent running inside Cedar's network, which checks it against a domain controller and returns the answer. With federation, the cloud directory never sees the password at all. It sends Riley to Cedar's own sign-in service, login.cedar.example, which checks the password and returns a signed statement that the cloud directory verifies.

Three ways to check Riley's password for a cloud sign-in (illustrative)
QuestionPassword hash synchronizationPass-through authenticationFederation
Where the password is checkedIn the cloud directoryAt Cedar's domain controller, by an on-premises agentAt login.cedar.example
What the cloud directory holdsA derived hash of each passwordNo password dataNo password data, and the certificate it trusts for Cedar's signatures
If Cedar's network is downSign-in still worksSign-in fails unless a fallback is set upSign-in fails unless a fallback is set up
After Riley changes the passwordThe old password works in the cloud until the next sync, usually minutesThe new password works at onceThe new password works at once
Parts to protectThe sync connection and its account, which can read password dataThe agents and their serversThe sign-in service and its signing key

Federation has one more step worth following. When login.cedar.example vouches for Riley, the cloud directory has to decide which account that statement is about. It matches the trusted issuer and the subject identifier in the statement, which Cedar sets from the same directory anchor used in provisioning. It does not match on email address, because an email in a sign-in statement is a claim about the person, and matching on it is how accounts get taken over, as Abusing federation and account linking shows. When an existing cloud account has to be connected to a new sign-in source for the first time, the person proves they control that account before the link is made.

Cedar chooses federation, with provisioning over SCIM. A clean provisioning run proves none of the sign-in path: not the federation certificate, not login.cedar.example, and not the link between Riley's sign-in and Riley's account. Each needs its own test.

Changes and outages need explicit behavior

Because there are two connections, events at Cedar reach the cloud by different routes. When an accountant leaves on a Friday, Cedar disables the directory account at 17:02. Federation refuses new sign-ins immediately, because login.cedar.example checks the directory. The provisioning connection sends the change to the cloud directory a few minutes later:

PATCH /scim/v2/Users/7c41e0a2-93b5-4d8f-a1c6-58e2f9b03d17 HTTP/1.1
Host: directory.cloudsuite.example
Authorization: Bearer demo-provisioning-token-3
Content-Type: application/scim+json
If-Match: W/"4"

{
  "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
  "Operations": [{ "op": "replace", "path": "active", "value": false }]
}

Both routes matter. Suppose some sign-in path still accepted the accountant's password, because a fallback method had been switched on or a misconfigured sign-in service had not seen the change. The cloud directory would still refuse, because the account itself is disabled. A sign-in that succeeds at the identity provider does not override the account's own state. Sessions the person already had in the expense application are a third matter: they last until they expire or are ended, as Revoking access and sharing security events explains. If the accountant returns as a contractor, a narrow update setting active back to true restores the same account and its history instead of creating a second one.

Outages need the same explicit thinking. If login.cedar.example goes down on Monday morning, nobody at Cedar can sign in to the cloud application. Some organizations keep password hash synchronization running as a fallback they can switch to, but that is a decision with its own consequences: it changes where passwords are checked and what the cloud directory stores. It works only if it was configured and tested before the outage. Nothing switches over by itself.

The parts that make these connections work are powerful in their own right. The provisioning connection can create and disable every account, and a synchronization account that reads password data can read it for everyone. The federation signing key lets its holder vouch for any Cedar user. These deserve the protection given to administrator credentials, with every change to them recorded. Cedar also keeps an emergency administrator account that exists only in the cloud directory and depends on neither connection, so a broken certificate or a failed agent cannot lock everyone out, as Protecting privileged access describes.

Migrate with a healthy control

Cedar starts with the twelve people in finance rather than the whole company. For each test account the team checks four things separately: the account arrived with the right anchor and fields, Riley's sign-in went through login.cedar.example and landed in Riley's own account, the expense application gave Riley the access the finance role allows and no more, and a disabled test account was refused. The team also watches one account it deliberately left alone, a colleague outside the pilot who signs in the old way. If that colleague's sign-in breaks, the change reached further than intended.

A provisioning run can also be interrupted halfway. A request that timed out may or may not have created an account, so the provisioning service looks the person up by anchor before trying again, instead of creating a duplicate, as Keeping systems in sync describes. A sign-in page that says "Welcome, Riley" means something only when it belongs to the right person, reached through the intended sign-in path, in the account matched by the intended anchor, with access that comes from a current grant.

Check your understanding

Try these questions before moving on. If an answer isn't right, use the feedback and try again.

Riley's account arrives in the cloud directory through a SCIM create. What has that shown? 1 of 3

Choose one answer.

Provisioning has disabled a departing accountant's cloud account, but a fallback sign-in path still accepts their password. What happens? 2 of 3

Choose one answer.

Cedar uses federation for the expense application, with no fallback configured, and login.cedar.example goes down on Monday morning. What happens to sign-ins? 3 of 3

Choose one answer.

Try it in the Lab

We value your privacy

We use cookies and similar technologies to enhance your browsing experience, and analytics to understand our traffic. By clicking "Allow all", you consent to optional analytics. Cookie Policy

Learn identity