Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Set a Data Product's runtime identity

Give a deployed Data Product a stable runtime identity. An ApplicationUser referenced through runAsUser reaches its Depots, Secrets, Compute, and Cluster without depending on one person's access.

Overview

A Data Product that reads from a Snowflake Depot, runs on a shared Compute, and queries through a Cluster needs access to all of those while it runs. If it runs under the identity of the developer who built it, the product breaks when that person changes teams or loses a grant. A production dependency should not rely on one individual.

Instead, give the product its own runtime identity: an ApplicationUser that holds the Can Use grants itself, referenced from the manifest through the runAsUser field. The product then executes under that identity and inherits its permissions. No consumer or developer needs individual grants for the product's dependencies at runtime.

This recipe spans three roles: the Data Developer decides the product needs a runtime identity, the Tenant Admin creates the ApplicationUser and grants it access, and the Operator authorizes the developer to run resources as that identity.

By the end of this recipe, an ApplicationUser holds Can Use on the product's dependencies, the developer is authorized to run resources as that identity, and the deployed product runs under it. It survives changes to the developer's personal access.

Before you begin

  • You can involve all three roles this recipe needs: a Tenant Admin (to create the ApplicationUser and grant it access), an Operator (the only role that can authorize runAsUser), and the Data Developer who owns the manifest.

  • You know the product's dependencies: the Compute it runs on, the Depots it reads, any Secrets those Depots are linked to, and the Cluster it queries through. If you granted these to the developer while building, it is the same list. See Give a developer access to build a Data Product.

  • The dependency resources already exist and are managed by a Tenant Admin or Data Admin.

  • The Operator has access to Bifrost to configure the runAsUser use-case grant.

Understand the three identities

runAsUser only changes the runtime identity. When a resource is applied, DataOS tracks three identities separately, and they can all be different people:

Identity
Who it is
What it controls

owner

Who the resource belongs to

Ownership. Unchanged by runAsUser

submitter

Who ran the apply command

Who deployed it. Unchanged by runAsUser

runAsUser

Whose identity it executes under

Which permissions and policies apply at runtime

Setting runAsUser to the ApplicationUser changes only the third. The developer is still the submitter; the product's runtime access follows the ApplicationUser.

Steps

1. Create the ApplicationUser

The Tenant Admin creates the ApplicationUser that will serve as the product's runtime identity. For example, use customer-360-app. This is a non-human identity that exists to run the product, independent of any team member.

2. Grant the ApplicationUser the permissions the product needs

The ApplicationUser must hold every permission the product uses at runtime. These are the same dependency-by-dependency Can Use grants a developer needs to build it. Grant them on the ApplicationUser, not on a person:

  • Can Use Compute on the shared Compute the product runs on

  • Can Use Depot on the Snowflake Depot it reads from

  • Can Use Secret on the Secret linked to that Depot

  • Can Use Cluster on the Cluster it queries through

Each dependency is granted separately. Can Use Depot does not include the linked Secret. Where the standard access matches a role, assign that role to the ApplicationUser and grant only the extras it lacks.

3. Authorize the developer to run resources as the ApplicationUser

Only an Operator can do this. The grant is made on the ApplicationUser's profile, not the developer's. In Bifrost, open the ApplicationUser's Grants tab and grant the Run As User use-case with the developer's user ID as the subject.

This is what lets the developer put runAsUser: customer-360-app in a manifest. runAsUser is built on explicit consent. Without this Operator-configured grant, the manifest is rejected.

The grant lives on the ApplicationUser's profile, with the developer as subject, not on the developer's own profile. Revoking it makes any resource that uses that runAsUser fail at runtime, so track which products depend on it before removing it.

4. Reference it in the manifest

The Data Developer sets runAsUser to the ApplicationUser's ID in the product manifest:

5. Deploy and verify

Apply the manifest and run the product. It now executes under the ApplicationUser's identity and inherits its permissions. DataOS evaluates the product's access to Depots, Compute, Cluster, and governed data policies against customer-360-app, not the developer.

To confirm: the product should read the Snowflake Depot, run on the Compute, and query through the Cluster without any grant on the developer's own account. Removing the developer's personal Can Use grants should not affect the deployed product.

Troubleshooting

Symptom
Likely cause
Fix

Manifest apply is rejected when runAsUser is set

The Operator has not granted the Run As User use-case with this developer as subject

Operator grants it on the ApplicationUser's Grants tab in Bifrost (step 3)

Product runs but fails reading the Depot

The ApplicationUser is missing Can Use Depot or the linked Can Use Secret

Grant the missing Can Use on the ApplicationUser (step 2), not on the developer

Product worked, then suddenly fails at runtime

The Run As User grant was revoked, or the ApplicationUser lost a Can Use grant

Restore the revoked grant on the ApplicationUser's profile

Developer can set runAsUser for one identity but not another

The Run As User use-case is granted per identity; only identities where the Operator configured the grant with this developer as subject are allowed

Operator configures the grant for the intended ApplicationUser

Product still tied to the developer after teams change

The manifest never adopted runAsUser, so it still runs as the submitter

Add runAsUser and redeploy (step 4)

References

Last updated

Was this helpful?