Accounts and Security · Topic 15 of 17
Authentication Methods and Authentication Policies
Choose Snowflake authentication methods per user type and enforce them with authentication policies: methods, client types, MFA enrollment and precedence.
- 4 min
- Authentication policy properties:
AUTHENTICATION_METHODS,CLIENT_TYPES,SECURITY_INTEGRATIONS,MFA_ENROLLMENT,MFA_POLICY. - User policy overrides account policy.
- Setting a policy needs
APPLY AUTHENTICATION POLICY; creating needsCREATE AUTHENTICATION POLICY.
What it is
Authentication proves who a caller is. Snowflake supports several ways to do it, and an Architect chooses by who is signing in (a person or a program), where from, and how strong the proof must be.
An authentication policy turns that choice into an enforced rule. Instead of hoping users pick the right method, the policy states which methods, clients and integrations are allowed.
How it works
Methods and when to use them
| Method | Best for | Notes |
|---|---|---|
| Password with MFA | Human users without SSO | Snowflake is rolling out mandatory MFA for human password sign-in |
| SSO (SAML2 or OIDC) | Employees with a company identity provider | Central control, IdP can add MFA |
| Key-pair | Service users, automation | No password; RSA key pair and JWT |
| OAuth | Applications acting for users, partner tools | Snowflake OAuth or External OAuth |
| Programmatic access token | Scripts and services that need a simple token | Token tied to a user, with expiry and network settings |
People use SSO plus MFA. Programs use key-pair or OAuth. A password for a service account is a design smell.
Authentication policy properties
An authentication policy is a schema level object. Its main properties decide what is allowed.
| Property | What it controls |
|---|---|
AUTHENTICATION_METHODS | Allowed methods, such as PASSWORD, SAML, OAUTH, KEYPAIR, PROGRAMMATIC_ACCESS_TOKEN |
CLIENT_TYPES | Allowed clients, such as SNOWFLAKE_UI, SNOWFLAKE_CLI, SNOWSQL, DRIVERS |
SECURITY_INTEGRATIONS | Which SAML2 or OIDC integrations are offered at login |
MFA_ENROLLMENT | REQUIRED forces users to enroll in MFA |
MFA_POLICY | Allowed MFA methods, and whether SSO users must also use Snowflake MFA |
CREATE AUTHENTICATION POLICY humans_sso_only
AUTHENTICATION_METHODS = ('SAML')
SECURITY_INTEGRATIONS = ('MY_SAML')
CLIENT_TYPES = ('SNOWFLAKE_UI', 'SNOWFLAKE_CLI');
CREATE AUTHENTICATION POLICY service_keypair
AUTHENTICATION_METHODS = ('KEYPAIR')
CLIENT_TYPES = ('DRIVERS');
Methods and integrations must not conflict. A policy that allows only PASSWORD cannot also list a SAML integration. Client types are a best effort control and do not restrict the Snowflake REST API. If MFA_ENROLLMENT is required, the allowed client types must include SNOWFLAKE_UI, because enrollment happens in Snowsight.
Applying policies and precedence
Policies are attached to the account or to a user, and the user level policy overrides the account level one.
ALTER ACCOUNT SET AUTHENTICATION POLICY humans_sso_only;
ALTER USER etl_svc SET AUTHENTICATION POLICY service_keypair;
ALTER ACCOUNT SET AUTHENTICATION POLICY service_keypair FOR ALL SERVICE USERS;
The last form applies a policy to a whole user type, which is useful for every service account.
| Privilege | Needed for |
|---|---|
CREATE AUTHENTICATION POLICY on the schema | Creating a policy |
APPLY AUTHENTICATION POLICY on the account | Setting a policy on the account or a user |
| OWNERSHIP on the policy | Altering or dropping it |
SECURITYADMIN can set policies, and it holds the global privilege by default.
Order of evaluation
Policies work in layers. A request meets the network policy first, then the authentication policy, then the password policy, then the session policy.
| Policy | Question it answers |
|---|---|
| Network policy | Is this address allowed? |
| Authentication policy | Is this method and client allowed? |
| Password policy | Does the password meet the rules (length, age, history)? |
| Session policy | How long may the session stay idle? |
A wrong authentication policy on the account can lock out everyone, including administrators. Test on one user first, and keep at least one administrator that a restrictive policy does not affect.
Hardening pattern
A typical hardened design looks like this:
- Humans authenticate with SSO, and the policy lists only the SAML integration.
- MFA is enforced, and for SSO users the IdP provides it, or Snowflake adds
ENFORCE_MFA_ON_EXTERNAL_AUTHENTICATION. - Service users use key-pair or OAuth through a policy applied to
FOR ALL SERVICE USERS. - A network policy limits where each group may connect.
- A password policy and session policy cover the remaining password users.
Common mistakes
Putting a policy on the account when only some users need it. Use a user level policy and keep the account policy as the default.
Listing a method that conflicts with the integrations. Authentication methods and security integrations in one policy must agree.
Requiring MFA enrollment but removing Snowsight. Enrollment happens in Snowsight, so SNOWFLAKE_UI must stay allowed.
Treating client types as a hard barrier. They are best effort and do not cover the REST API.
What to remember for the exam
- Authentication policy properties:
AUTHENTICATION_METHODS,CLIENT_TYPES,SECURITY_INTEGRATIONS,MFA_ENROLLMENT,MFA_POLICY. - User policy overrides account policy.
- Setting a policy needs
APPLY AUTHENTICATION POLICY; creating needsCREATE AUTHENTICATION POLICY. - Order of checks: network policy, authentication policy, password policy, session policy.
- Humans use SSO with MFA; services use key-pair or OAuth.
Check yourself
How do you force every service user onto key-pair only?
Create an authentication policy allowing
KEYPAIRand apply it to the account withFOR ALL SERVICE USERS.A user has one policy and the account has another. Which applies?
The user level policy, because it is more specific than the account policy.
Which policy is evaluated first when a user signs in?
The network policy, before the authentication, password and session policies.
Topic 15 of 17 in Accounts and Security
Test yourself on Accounts and Security
The full Snowflake ARA-C01 question bank has 687 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Snowflake. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.