Snowflake Security, RBAC, and User Administration · Topic 10 of 16

Passwords, Password Policies, MFA Enrollment and User Types

Manage Snowflake user types, password policies, MFA enrollment, reporting on users without MFA, and password resets or temporary MFA bypass.

  • 4 min
In a nutshell
  • Types: PERSON and NULL act as people; SERVICE has no password or MFA; LEGACY_SERVICE allows a password and is being deprecated.
  • Password policy defaults: length 14, max age 90 days, 5 retries, 15 minute lockout, history 5.
  • User level policy overrides account level.

What it is

Passwords and multi-factor authentication (MFA) protect people who sign in to Snowflake themselves. A user type decides whether a user is a person or a service, and so which credentials apply. A password policy sets the strength and lifetime of passwords, and MFA adds a second factor.

The administrator's tasks are to choose the right type, enforce policies, find users without MFA, and recover a locked out user without opening a hole.

User typePERSON or SERVICEdecidesCredentialspassword, MFA, key pairchecked byPassword policy and MFA enrollmentthenSign in

How it works

User types

TYPEMeaning
PERSONA human who signs in interactively; must enroll in MFA
NULLBehaves the same as PERSON (no type set)
SERVICEA non interactive service or application; cannot use a password or MFA
LEGACY_SERVICELike SERVICE but allows a password; being deprecated, SERVICE is recommended

A SERVICE user cannot have a password, MUST_CHANGE_PASSWORD, name fields or MINS_TO_BYPASS_MFA. It cannot be subject to MFA enforcement, nor use ALTER USER ... RESET PASSWORD or SET DISABLE_MFA. Its credentials are key pairs or programmatic access tokens (next page).

CREATE USER etl_svc TYPE = SERVICE DEFAULT_ROLE = etl_role;
CREATE USER ana TYPE = PERSON PASSWORD = '...' MUST_CHANGE_PASSWORD = TRUE;
Exam tip

A scenario about a pipeline that "must not be able to sign in with a password or be asked for MFA" is a SERVICE user.

Password policies

A password policy is a schema object created with CREATE PASSWORD POLICY. The role needs CREATE PASSWORD POLICY on the schema. It is applied with ALTER ACCOUNT or ALTER USER.

ParameterDefault (policy you create)
PASSWORD_MIN_LENGTH14 (range 8 to 256)
PASSWORD_MAX_LENGTH256
PASSWORD_MIN_UPPER_CASE_CHARS, LOWER, NUMERIC1 each
PASSWORD_MIN_SPECIAL_CHARS0
PASSWORD_MAX_AGE_DAYS90 (0 means no expiry; not recommended)
PASSWORD_MAX_RETRIES5
PASSWORD_LOCKOUT_TIME_MINS15
PASSWORD_HISTORY5 (max 24)
PASSWORD_MIN_AGE_DAYS0
CREATE PASSWORD POLICY sec.policies.strict_pw
  PASSWORD_MIN_LENGTH = 16 PASSWORD_MAX_AGE_DAYS = 60 PASSWORD_HISTORY = 12;
ALTER ACCOUNT SET PASSWORD POLICY sec.policies.strict_pw;
ALTER USER ana SET PASSWORD POLICY sec.policies.strict_pw;

A policy on a user overrides the account policy for that user. Without any policy, a built in policy applies that does not expire passwords.

MFA and enrollment

Snowflake supports passkeys (recommended), authenticator apps that generate TOTP codes, and Duo. In accounts created after the 2024_08 behavior change bundle, human users who sign in with a password must enroll in MFA, and service users are exempt. Older accounts configure MFA themselves, and Snowflake is rolling out required MFA for all password sign ins.

An authentication policy tunes it:

  • MFA_ENROLLMENT set to REQUIRED or OPTIONAL (optional is a temporary opt out for non Snowsight clients).
  • MFA_POLICY (ALLOWED_METHODS = ('PASSKEY', 'TOTP')) limits the methods users may enroll.
  • ENFORCE_MFA_ON_EXTERNAL_AUTHENTICATION = 'ALL' with MFA_ENROLLMENT = 'REQUIRED' requires Snowflake MFA after SSO.
SHOW MFA METHODS FOR USER ana;
ALTER USER ana REMOVE MFA METHOD <method_name>;

Reporting on users without MFA

SNOWFLAKE.ACCOUNT_USAGE.USERS has a HAS_MFA Boolean column, plus HAS_PASSWORD, HAS_RSA_PUBLIC_KEY and TYPE. The view can lag by up to two hours.

SELECT name, type, last_success_login
FROM snowflake.account_usage.users
WHERE deleted_on IS NULL AND has_password AND NOT has_mfa;

Resetting passwords and bypassing MFA

SituationAction
User forgot passwordALTER USER ana RESET PASSWORD returns a single use URL, valid for 12 hours, to set a new one
Password must be invalidated nowALTER USER ana SET PASSWORD = '...' MUST_CHANGE_PASSWORD = TRUE (reset alone does not invalidate the old password)
User locked after failed attemptsALTER USER ana SET MINS_TO_UNLOCK = 0
Lost MFA device, must sign in onceALTER USER ana SET MINS_TO_BYPASS_MFA = 30 allows single factor for 30 minutes
MFA must be clearedALTER USER ana SET DISABLE_MFA = TRUE; if policy requires MFA, methods are cleared and the user enrolls again
Locked out userlost devicethenAdminOWNERSHIP of usersetsMINS_TO_BYPASS_MFAtemporarythenUser signs in and enrolls a new method
Watch out

Bypass MFA only after verifying the person. Keep the window short.

Common mistakes

Creating a pipeline user as PERSON. It then needs MFA; use SERVICE.

Expecting a reset URL to kill the old password. It does not.

Setting PASSWORD_MAX_AGE_DAYS = 0 at account level. Passwords never expire.

Reading HAS_MFA as real time. It can lag.

What to remember for the exam

  • Types: PERSON and NULL act as people; SERVICE has no password or MFA; LEGACY_SERVICE allows a password and is being deprecated.
  • Password policy defaults: length 14, max age 90 days, 5 retries, 15 minute lockout, history 5.
  • User level policy overrides account level.
  • ACCOUNT_USAGE.USERS.HAS_MFA finds users without MFA.
  • Temporary access without MFA uses MINS_TO_BYPASS_MFA or DISABLE_MFA.

Check yourself

  • Which user type cannot use a password or MFA?

    SERVICE.

  • How do you list password users without MFA?

    Query ACCOUNT_USAGE.USERS where HAS_PASSWORD is true and HAS_MFA is false.

  • How can a user who lost their MFA device sign in once?

    Set MINS_TO_BYPASS_MFA for a short window, then have them enroll a new method.

Topic 10 of 16 in Snowflake Security, RBAC, and User Administration

Test yourself on Snowflake Security, RBAC, and User Administration

The full Snowflake ADA-C02 question bank has 814 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.