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
In a nutshell
  • 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 needs CREATE 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.

Sign in attemptuser and clientchecked byNetwork policywhere fromthenAuthentication policywhich methodthenPassword and session policydetailsends inSession

How it works

Methods and when to use them

MethodBest forNotes
Password with MFAHuman users without SSOSnowflake is rolling out mandatory MFA for human password sign-in
SSO (SAML2 or OIDC)Employees with a company identity providerCentral control, IdP can add MFA
Key-pairService users, automationNo password; RSA key pair and JWT
OAuthApplications acting for users, partner toolsSnowflake OAuth or External OAuth
Programmatic access tokenScripts and services that need a simple tokenToken tied to a user, with expiry and network settings
Exam tip

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.

PropertyWhat it controls
AUTHENTICATION_METHODSAllowed methods, such as PASSWORD, SAML, OAUTH, KEYPAIR, PROGRAMMATIC_ACCESS_TOKEN
CLIENT_TYPESAllowed clients, such as SNOWFLAKE_UI, SNOWFLAKE_CLI, SNOWSQL, DRIVERS
SECURITY_INTEGRATIONSWhich SAML2 or OIDC integrations are offered at login
MFA_ENROLLMENTREQUIRED forces users to enroll in MFA
MFA_POLICYAllowed 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.

Account policydefault for alloverridden byUser policymost specific wins
PrivilegeNeeded for
CREATE AUTHENTICATION POLICY on the schemaCreating a policy
APPLY AUTHENTICATION POLICY on the accountSetting a policy on the account or a user
OWNERSHIP on the policyAltering 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.

PolicyQuestion it answers
Network policyIs this address allowed?
Authentication policyIs this method and client allowed?
Password policyDoes the password meet the rules (length, age, history)?
Session policyHow long may the session stay idle?
Watch out

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:

  1. Humans authenticate with SSO, and the policy lists only the SAML integration.
  2. MFA is enforced, and for SSO users the IdP provides it, or Snowflake adds ENFORCE_MFA_ON_EXTERNAL_AUTHENTICATION.
  3. Service users use key-pair or OAuth through a policy applied to FOR ALL SERVICE USERS.
  4. A network policy limits where each group may connect.
  5. 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 needs CREATE 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 KEYPAIR and apply it to the account with FOR 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.