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
- 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.
How it works
User types
TYPE | Meaning |
|---|---|
PERSON | A human who signs in interactively; must enroll in MFA |
NULL | Behaves the same as PERSON (no type set) |
SERVICE | A non interactive service or application; cannot use a password or MFA |
LEGACY_SERVICE | Like 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;
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.
| Parameter | Default (policy you create) |
|---|---|
PASSWORD_MIN_LENGTH | 14 (range 8 to 256) |
PASSWORD_MAX_LENGTH | 256 |
PASSWORD_MIN_UPPER_CASE_CHARS, LOWER, NUMERIC | 1 each |
PASSWORD_MIN_SPECIAL_CHARS | 0 |
PASSWORD_MAX_AGE_DAYS | 90 (0 means no expiry; not recommended) |
PASSWORD_MAX_RETRIES | 5 |
PASSWORD_LOCKOUT_TIME_MINS | 15 |
PASSWORD_HISTORY | 5 (max 24) |
PASSWORD_MIN_AGE_DAYS | 0 |
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_ENROLLMENTset toREQUIREDorOPTIONAL(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'withMFA_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
| Situation | Action |
|---|---|
| User forgot password | ALTER USER ana RESET PASSWORD returns a single use URL, valid for 12 hours, to set a new one |
| Password must be invalidated now | ALTER USER ana SET PASSWORD = '...' MUST_CHANGE_PASSWORD = TRUE (reset alone does not invalidate the old password) |
| User locked after failed attempts | ALTER USER ana SET MINS_TO_UNLOCK = 0 |
| Lost MFA device, must sign in once | ALTER USER ana SET MINS_TO_BYPASS_MFA = 30 allows single factor for 30 minutes |
| MFA must be cleared | ALTER USER ana SET DISABLE_MFA = TRUE; if policy requires MFA, methods are cleared and the user enrolls again |
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_MFAfinds users without MFA.- Temporary access without MFA uses
MINS_TO_BYPASS_MFAorDISABLE_MFA.
Check yourself
Which user type cannot use a password or MFA?
SERVICE.
How do you list password users without MFA?
Query
ACCOUNT_USAGE.USERSwhereHAS_PASSWORDis true andHAS_MFAis false.How can a user who lost their MFA device sign in once?
Set
MINS_TO_BYPASS_MFAfor 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.