With password sign-in being removed for Snowflake service users, workload identity federation and programmatic access tokens are the two newer ways to keep pipelines, applications and integrations connected without a static password. Workload identity federation (WIF) lets a workload prove who it is with a credential its cloud or OIDC provider already issues, so there is no Snowflake secret to store at all. Programmatic access tokens (PATs) are Snowflake-issued, expiring and role-restricted secrets for tools that cannot federate.
This guide shows how to set up both for TYPE = SERVICE users: when to choose each, the exact SQL, the driver settings, the authentication and network policies that keep them contained, and how to audit and revoke them. Key-pair authentication and the general service user model are covered in our Service Accounts in Snowflake Guide and are not repeated here.
This is an independent guide from NHI Mgmt Group, based on Snowflake's public documentation as of November 2026. It is not sponsored or reviewed by Snowflake. Product features change, so confirm settings against Snowflake's current documentation.
Key takeaways
- Snowflake's deprecation plan blocks non-human users from password authentication in its third phase, scheduled from August to October 2026 and rolling by account, and migrates existing
LEGACY_SERVICEusers toSERVICE. - Use WIF wherever the workload runs on AWS, Azure, Google Cloud, Kubernetes or a CI platform with OIDC. It removes the long-lived secret entirely.
- Use PATs for tools that can only send a password or bearer token. Always set
ROLE_RESTRICTIONand a shortDAYS_TO_EXPIRY. - Service users must be subject to a network policy to generate or use a PAT. Keep the default
ENFORCED_REQUIREDevaluation. - Control both methods with an authentication policy:
WORKLOAD_IDENTITY_POLICYto limit providers and issuers, andPAT_POLICYto cap lifetimes and block privileged roles. - Join
ACCOUNT_USAGE.CREDENTIALSwithLOGIN_HISTORYto see which credential was used for every login.
Why service users need a new authentication method
Snowflake's plan for the deprecation of single-factor password sign-ins runs in three phases. For non-human identities the important points are:
TYPE = SERVICEusers cannot use a password at all.TYPE = LEGACY_SERVICEis a temporary type that allows password sign-in for applications and is being phased out.- In Phase 2 (estimated May to July 2026),
LEGACY_SERVICEis no longer available when creating a user, and existing users cannot be switched to it. - In Phase 3 (estimated August to October 2026, rolling by account), non-human users are blocked from password authentication and existing
LEGACY_SERVICEusers are migrated toSERVICE.
Snowflake notes that Phase 2 and 3 dates are subject to change, and that reader accounts, trial accounts and Snowflake Postgres are excluded. As of 18 November 2026, check your own account's status rather than assuming enforcement has or has not reached it. Either way, every service integration that still signs in with a password needs a replacement. Our guide on How to find Snowflake service users without key-pair auth shows how to build that list.
Choosing between WIF, PATs and key pairs
Snowflake describes WIF as a service-to-service method in which workloads use credentials from their cloud or OIDC provider, so you do not store long-lived secrets such as passwords, API keys, key pairs or PATs. PATs are secrets, but they expire and can be pinned to a single role. Use this decision order:
| Workload | Recommended method | Why |
|---|---|---|
| Runs on AWS with an IAM role | WIF, TYPE = AWS | Uses the role's own credentials; nothing to store. |
| Runs on Azure with a managed identity | WIF, TYPE = AZURE | Uses the managed identity's Entra ID token. |
| Runs on Google Cloud with a service account | WIF, TYPE = GCP | Uses the service account identity. |
| Kubernetes pod (EKS, AKS, GKE), CI job, SPIFFE workload | WIF, TYPE = OIDC | Uses a short-lived projected or CI-issued token. |
| SaaS tool or BI connector that only takes a password or bearer token | PAT | Expiring, role-restricted, network-bound secret. |
| Tool that supports key pairs but not WIF | Key pair | See our Snowflake service user guide. |
PATs also authenticate to Snowflake's REST APIs, the SQL API, the Catalog SDK, Snowpark Container Services, Snowpark Connect for Spark and SCIM requests, which makes them common for API integrations.
Step 1: Prepare the service user and ownership
Create one service user per integration, never one shared user for many pipelines. Give it a default role that holds only the privileges the integration needs, and assign a named human owner in the user's comment and in your inventory.
Who can configure authentication matters. For WIF, setting or changing a workload identity needs OWNERSHIP on the service user or the MODIFY PROGRAMMATIC AUTHENTICATION METHODS privilege on it. The same privileges are needed to manage another user's PATs. Grant MODIFY PROGRAMMATIC AUTHENTICATION METHODS to a small platform role rather than to data teams broadly: whoever holds it can bind any cloud identity to the user or mint a token for it.
Step 2: Set up workload identity federation
WIF is configured on the user with a WORKLOAD_IDENTITY clause. Snowflake's syntax per provider:
| Provider | Clause |
|---|---|
| AWS | WORKLOAD_IDENTITY = (TYPE = AWS, ARN = '<arn>'), with optional ISSUER (recommended for the JWT method). Accepts arn:aws:iam::<account>:role/... and arn:aws:sts::<account>:assumed-role/... forms. |
| Azure | WORKLOAD_IDENTITY = (TYPE = AZURE, ISSUER = 'https://login.microsoftonline.com/<tenant_id>/v2.0', SUBJECT = '<managed_identity_object_id>') |
| Google Cloud | WORKLOAD_IDENTITY = (TYPE = GCP, SUBJECT = '<service_account_unique_id>') |
| OIDC | WORKLOAD_IDENTITY = (TYPE = OIDC, ISSUER = '<issuer>', SUBJECT = '<subject>', OIDC_AUDIENCE_LIST = ('<audience>')) |
A complete example for an AWS-hosted pipeline:
CREATE USER etl_orders_svc TYPE = SERVICE DEFAULT_ROLE = etl_orders_rl WORKLOAD_IDENTITY = (TYPE = AWS, ARN = 'arn:aws:iam::111122223333:role/etl-orders');
Points from Snowflake's documentation that affect design:
- Bind the narrowest identity. One IAM role, one managed identity or one service account per Snowflake user. If the cloud identity is shared by several workloads, they all become the same Snowflake user.
- Identities are unique.
ISSUERplusSUBJECTmust be unique across all users for Azure and OIDC,SUBJECTfor Google Cloud, and the AWS principal for AWS. You cannot map one cloud identity to two Snowflake users. - Identities are immutable. After creation you cannot change
TYPE,ARN,ISSUER,SUBJECTorOIDC_AUDIENCE_LIST; remove and re-add the identity instead. - Named identities.
SET WORKLOAD_IDENTITYcreates theDEFAULTidentity, andALTER USER ... ADD / MODIFY / REMOVE WORKLOAD IDENTITYmanages up to 10 named identities per user by default. Use named identities for planned migrations (old and new cluster), then remove the old one. - Azure sovereign clouds (Azure China, Azure US Government) are not supported.
- Review bindings with
SHOW USER WORKLOAD IDENTITY AUTHENTICATION METHODS FOR USER <name>.
Kubernetes and CI workloads with OIDC
For EKS, AKS and GKE, mount a projected service account token with audience: snowflakecomputing.com. Snowflake's example uses expirationSeconds: 7200 and the path /var/run/secrets/tokens/snowflake-token. Set SUBJECT to system:serviceaccount:<namespace>:<service_account_name> and ISSUER to the cluster's OIDC issuer URL. Give the pod its own service account rather than default, as explained in our Kubernetes Service Account Token Guide.
The audience needs care. OIDC_AUDIENCE_LIST can be omitted when the token audience is snowflakecomputing.com, but for SPIFFE/SPIRE Snowflake advises scoping the audience to your account because the default audience is shared across accounts. We recommend the same for any shared OIDC issuer: use an account-specific audience so a token minted for another Snowflake account cannot be replayed to yours.
For GitHub Actions and GitLab CI, Snowflake suggests customising the OIDC sub claim so that subjects identify the repository and environment you intend. Bind the Snowflake user to a subject that includes the protected branch or deployment environment, not the whole organisation, or any workflow in any repository could sign in.
SPIFFE/SPIRE works with JWT-SVIDs only, and the SPIRE OIDC discovery endpoint and its jwks_uri must be publicly reachable. For any custom issuer, ID tokens must include iat, use RS256/384/512 or ES256/384/512 signatures (PS algorithms are rejected), and Snowflake caches signing keys for up to 60 minutes, so keep old keys published for at least that long after rotation.
Step 3: Configure drivers for WIF
Clients sign in with authenticator='WORKLOAD_IDENTITY' and workload_identity_provider set to AWS, AZURE, GCP or OIDC. For OIDC, pass token_file_path (for example the projected token path) or token. Read the token from file on every connection; the kubelet rotates it.
Minimum driver versions listed by Snowflake: Go 1.16.0, JDBC 3.26.0, .NET 4.8.0, Node.js 2.2.0, ODBC 3.11.0, PHP PDO 3.6.0, Python 3.17.0 and Spark Connector 3.1.7. Inventory driver versions before migration, because an old driver forces teams back to secrets.
On AWS, Snowflake recommends the JWT method, workload_identity_aws_use_outbound_token=True, over the default GetCallerIdentity method; the documentation notes it needs Python connector 4.7.1 or later. For AWS and Google Cloud, workload_identity_impersonation_path supports a chain of identities. Keep chains short and documented: each hop is another identity whose compromise reaches Snowflake.
Step 4: Issue programmatic access tokens safely
Where WIF is not possible, create a PAT on the service user:
ALTER USER bi_reporting_svc ADD PROGRAMMATIC ACCESS TOKEN bi_tool_2026q4 ROLE_RESTRICTION = 'BI_READER_RL' DAYS_TO_EXPIRY = 30 COMMENT = 'Reporting tool, owner: data-platform';
Parameters and behaviour:
ROLE_RESTRICTION: the role used for privilege evaluation and object ownership. It is required forSERVICEandSERVICE_AGENTusers unless a policy lifts the requirement. Secondary roles are not used. If the role is revoked from the user or dropped, the token stops working.DAYS_TO_EXPIRY: from 1 to the maximum. The default is 15 days and the maximum is 365 unless a policy lowers it. We recommend 30 to 90 days for service integrations, aligned to a rotation process.COMMENT: record the tool, owner and ticket.MINS_TO_BYPASS_NETWORK_POLICY_REQUIREMENT: a temporary bypass for person users. Snowflake advises against it; do not use it for service users.
The secret appears once, in the token_secret column of the command output or once in Snowsight. Put it straight into your secrets manager or the target tool and never into a ticket, chat or repository. Role restriction and expiry cannot be changed after creation; revoke and recreate instead. Each user can hold up to 15 PATs, counting disabled tokens.
Using the token
Drivers and tools accept the PAT in place of a password, with the user's LOGIN_NAME as the user. REST and SQL API calls send Authorization: Bearer <token_secret>, optionally with X-Snowflake-Authorization-Token-Type: PROGRAMMATIC_ACCESS_TOKEN. A rejected token returns PAT_INVALID.
Step 5: Contain PATs with network and authentication policies
Network policy. SERVICE and LEGACY_SERVICE users must be subject to a network policy to generate or use a PAT. Attach a policy to each service user that allows only the egress addresses of the tool that holds the token. A stolen PAT then fails from anywhere else. (SERVICE_AGENT users do not need a network policy, so treat them separately.)
Authentication policy. Create a policy for service users and set it on each one. Settings to use:
| Setting | Recommended value | Effect |
|---|---|---|
AUTHENTICATION_METHODS | Only what the user needs, for example ('WORKLOAD_IDENTITY') or ('PROGRAMMATIC_ACCESS_TOKEN') | Blocks every other method for that user. |
WORKLOAD_IDENTITY_POLICY | ALLOWED_PROVIDERS limited to the providers you use, plus issuer lists such as ALLOWED_AZURE_ISSUERS | Stops someone binding the user to an unexpected cloud tenant or issuer. |
PAT_POLICY NETWORK_POLICY_EVALUATION | ENFORCED_REQUIRED (default) | Tokens only work under a network policy. |
PAT_POLICY MAX_EXPIRY_IN_DAYS | 90 | Caps lifetime; existing tokens over a lowered maximum fail to authenticate. |
PAT_POLICY DEFAULT_EXPIRY_IN_DAYS | 30 | Sets the lifetime when none is given. |
PAT_POLICY REQUIRE_ROLE_RESTRICTION_FOR_SERVICE_USERS | Leave TRUE | Setting FALSE allows unrestricted service tokens. |
PAT_POLICY BLOCKED_ROLES_LIST | ACCOUNTADMIN, SECURITYADMIN, ORGADMIN and your own admin roles | These roles cannot be used as a token restriction. |
If AUTHENTICATION_METHODS is set, it must include PROGRAMMATIC_ACCESS_TOKEN for PATs to work. The 90 and 30 day values are NHI Mgmt Group recommendations; Snowflake allows up to 365.
Step 6: Rotate, disable and revoke
- Rotate:
ALTER USER ... ROTATE PROGRAMMATIC ACCESS TOKEN <name>issues a new secret under the same name with an extended expiry.EXPIRE_ROTATED_TOKEN_AFTER_HOURSsets how long the old secret keeps working, giving the tool time to switch. Keep that overlap to hours, not days. - Revoke:
ALTER USER ... REMOVE PROGRAMMATIC ACCESS TOKEN <name>. Revoked tokens cannot be recovered. - Disable: tokens are disabled automatically if the user's login is disabled or the user is locked out, and stay disabled after login is restored until re-enabled with
SET DISABLED = FALSE. A temporary lockout does not disable them. - Self-management limit: a session authenticated with a PAT cannot rename, rotate, modify or revoke a PAT for that same user, so a stolen token cannot be used to mint or extend itself.
- WIF revocation: remove the workload identity from the Snowflake user, or remove the cloud-side permission, such as the IAM role or federated credential. Removing on the Snowflake side is immediate and does not depend on another team.
Snowflake participates in GitHub's secret scanning partner programme: a PAT found in a public GitHub repository is disabled automatically and the account administrator and the user are emailed, if their addresses are verified. Snowflake advises reviewing queries from sessions that used a leaked token and disabling replicated copies in other accounts, found with SHOW REPLICATION GROUPS. Make sure service user owners have verified email addresses so these alerts reach someone.
Step 7: Audit credential use
There is no account-wide PAT list command, so query SNOWFLAKE.ACCOUNT_USAGE.CREDENTIALS with type = 'PAT' for an inventory, and SHOW USER PROGRAMMATIC ACCESS TOKENS FOR USER <user> per user. Expired tokens are deleted after seven days.
For attribution, LOGIN_HISTORY records the credential in first_authentication_factor_id when first_authentication_factor is PROGRAMMATIC_ACCESS_TOKEN, which joins to credential_id in CREDENTIALS. Join LOGIN_HISTORY to SESSIONS and QUERY_HISTORY on session ID to see what each token did. For WIF, query the same views on the Snowflake side and the provider's logs, such as AWS CloudTrail or Azure Monitor, for the cloud identity. SYSTEM$DECODE_PAT returns a token's state, name and user when you need to identify a secret you have found.
Alerts worth building: PAT creation outside your change process, any PAT with expiry over your policy, a service user signing in from a new address or with a method other than its expected one, and new workload identity bindings. These map to MITRE ATT&CK T1078.004 Cloud Accounts and T1528 Steal Application Access Token, and support NIST SP 800-53 IA-5 Authenticator Management and AC-6 Least Privilege.
Common failure patterns
- PAT as a drop-in password everywhere, including on workloads in AWS, Azure or Kubernetes that could have used WIF with no secret.
- 365-day tokens created because no
PAT_POLICYcaps lifetime. - Admin role restrictions, because
BLOCKED_ROLES_LISTwas never set. - Wide network policies such as
0.0.0.0/0attached only to satisfy the PAT requirement. - Broad OIDC subjects that match any repository, branch or namespace.
- Shared cloud identities, so one IAM role or managed identity used by many workloads maps to one Snowflake user.
- Default audience on a shared issuer, allowing tokens minted for another account.
- Token secrets left in tickets or chat after creation.
- Wide
MODIFY PROGRAMMATIC AUTHENTICATION METHODSgrants, letting many people bind identities or mint tokens for service users. - Old drivers that block WIF and push teams back to secrets.
Practitioner checklist
- Inventory of every
LEGACY_SERVICEuser and password-based integration, with a target method for each. - WIF used for every workload on AWS, Azure, Google Cloud, Kubernetes or OIDC-capable CI.
- One service user per integration, bound to one narrowly scoped cloud identity or OIDC subject.
- Account-specific OIDC audience for shared issuers.
- Driver versions at or above Snowflake's WIF minimums.
- Every PAT has
ROLE_RESTRICTION, an expiry of 90 days or less and an owner comment. - Each PAT-using service user has a network policy limited to the tool's egress addresses.
- Authentication policy on service users with limited methods,
WORKLOAD_IDENTITY_POLICYandPAT_POLICYincludingBLOCKED_ROLES_LIST. MODIFY PROGRAMMATIC AUTHENTICATION METHODSheld by a small platform role only.- Rotation process with short overlap via
EXPIRE_ROTATED_TOKEN_AFTER_HOURS. - Monthly review of
CREDENTIALSandLOGIN_HISTORY, with alerts on new tokens and bindings.
Standards and references
- Snowflake: Workload identity federation
- Snowflake: Programmatic access tokens
- Snowflake: Planning for the deprecation of single-factor password sign-ins
- OWASP: Non-Human Identities Top 10 2025
- NIST: SP 800-63C-4 Federation and Assertions
- NIST: SP 800-53 Rev. 5 (IA-5 Authenticator Management, AC-6 Least Privilege)
- MITRE ATT&CK: Steal Application Access Token
Related NHI Mgmt Group resources: Service Accounts in Snowflake Guide · How to find Snowflake service users without key-pair auth · Workload Identity Federation Guide · Snowflake Security Guide