Authentication, Network & Data Protection Policies
Authentication Methods
Authentication proves who you are, once, when you connect. Authorization decides what your roles may do, on every statement. A correct password says nothing about which tables you can read.
The problem
Exam questions mix up the controls that act when someone signs in with the controls that act when they query. Network policies, authentication, MFA, privileges, masking and row access all protect data, at different moments and against different threats.
The mental model
Think of a timeline. When Alice connects, Snowflake checks where she connects from (network policy) and who she is (authentication). These are two separate controls. A session then opens with her roles. Each statement is checked against the privileges of her active roles. Governance policies, row access and masking, then decide which rows and values come back. Figure 3.10 places each control on that timeline.
1 · CONNECT, ONCE
NETWORKNetwork policyfrom which address?
AUTHENTICATIONAuthenticationwho are you? SSO, password + MFA, key pair, OAuth…
2 · SESSION
Session opensprimary role + secondary roles
POLICYSession policyends the session after idle time
3 · EVERY STATEMENT
AUTHORIZATIONPrivilegesmay the active roles run this statement?
GOVERNANCE POLICIES
Row access policywhich rows exist?
rows first, then masks
Masking policywhat does each column show?
| Policy object | Question it answers | Attached to |
|---|---|---|
| Network policy | From which addresses may this client connect? | Account, user or security integration |
| Authentication policy | Which login methods, clients and MFA rules are allowed? | Account, all person or all service users, or one user |
| Password policy | How strong must passwords be, how many retries before lockout? | Account or user |
| Session policy | How long may a session stay idle? | Account or user |
| Masking policy | What does this column return to this role? | Columns, directly or through tags |
| Row access policy | Which rows exist for this session? | Tables and views |
The exam's sorting test: "how you log in" is authentication, "from where" is network, "what you see" is governance. "Use a network policy so analysts only see European rows" is wrong by category.
How it works: choosing a login method
A few words first. An identity provider (IdP) is the company's login service, such as Okta or Microsoft Entra ID. It checks your password and second factor, then vouches for you to other apps. One login for every app is single sign-on (SSO); Snowflake calls it federated authentication. The IdP's proof is either a SAML 2.0 assertion (a signed message) or an OIDC token (OpenID Connect). MFA adds a second proof after the password. OAuth gives an app a token so it can act for a user without seeing the password. Figure 3.11 shows who presents what.
PEOPLE (TYPE = PERSON)
USERAlicein Snowsight
1 signs in
IdPIdentity providerOkta, Entra ID…checks password + second factor
2 signed proof
SAML assertion or OIDC token
Snowflakeopens a session
USERAlicein Tableau
tool gets
OAuth tokenfrom Snowflake OAuth or the IdP
queries as Alice
Snowflakechecks it via a security integration
No identity provider? Password + MFA, checked by Snowflake itself.
PROGRAMS (TYPE = SERVICE)
METHOD
private key on the server
presentspublic key on the user (RSA_
a token from an authorization server
presentstrusts the issuer via a security integration
the identity its cloud gives it (no secret)
presentstrusts the cloud provider or OIDC issuer
a secret string made in Snowflake
presentschecks the secret, only from allowed addresses
| People (TYPE = PERSON) | How it works |
|---|---|
| SSO through an IdP (SAML 2.0 or OIDC) | You sign in at the IdP, which sends Snowflake a signed proof. Snowflake never sees your password |
| Password + MFA | The second factor is a passkey on your device, an authenticator app code (TOTP, a time-based one-time password) or a Duo push |
| OAuth from a BI tool | Tableau or Power BI gets a token and queries as you, through a security integration |
| Programs (TYPE = SERVICE) | What the program holds |
|---|---|
| Key pair | A private key on its server. Snowflake stores the public key on the user (RSA_) |
| OAuth | A token from an OAuth server that Snowflake trusts through a security integration |
| Workload identity federation (WIF) | Nothing stored. Its cloud (AWS, Azure, Google Cloud) or an OIDC issuer vouches for it. Snowflake's preferred option for programs in a cloud |
| Programmatic access token (PAT) | A secret string made in Snowflake, with an expiry date. By default the user needs a network policy, because anyone who copies the string could sign in from anywhere |
To tell the program methods apart, ask what the program holds: its own private key, a token someone else issued, only its cloud identity, or a secret Snowflake made.
For the exam, MFA has one answer: a person who signs in with a password must use MFA. SSO users get their second factor from the IdP. The account parameter ALLOW_CLIENT_MFA_CACHING lets drivers reuse an MFA token for up to four hours.
Worked example: SSO or MFA for people, keys for services
Youness wants every person to use SSO, a password with MFA, or OAuth from the BI tool, without breaking the key-pair login of svc_etl. An authentication policy makes those rules explicit. It does nothing until it is attached.
CREATE AUTHENTICATION POLICY security_db. policies. humans AUTHENTICATION_METHODS = ('SAML', 'PASSWORD', 'OAUTH') -- leave OAUTH out and Tableau's OAuth login is refusedMFA_ENROLLMENT = 'REQUIRED_PASSWORD_ -- password users enrol in MFA; SSO users use the IdP'sONLY' CLIENT_TYPES = ('SNOWFLAKE_UI' , 'DRIVERS'); -- Snowsight, plus JDBC, ODBC, Python… (BI tools use drivers)ALTER ACCOUNT SET AUTHENTICATION POLICY security_db. policies. humans FOR ALL PERSON USERS; -- service users can get a policy of their own
Expected result.
- Person users sign in with SAML SSO, a password plus MFA, or OAuth from the BI tool, and only from Snowsight or drivers.
- Service users are untouched.
ALTER USER … SET AUTHENTICATION POLICYgives one user an exception. - With
MFA_ENROLLMENT = 'REQUIRED'instead, SSO users would also have to enrol in Snowflake's MFA.
Go deeper · client filters, key rotation, SCIM
CLIENT_TYPES trusts what the client reports about itself, so it isn't a security boundary. Use it to steer people to approved tools, and rely on authentication and network policies for security. IsmaFrost keeps login objects in SECURITY_DB and data policies in GOVERNANCE_DB; that is a house convention, not a Snowflake rule.
Key-pair rotation uses two slots. Register the new key in RSA_PUBLIC_KEY_2, move clients to the new private key, then unset the old RSA_PUBLIC_KEY. Both keys work during the switch.
SCIM (System for Cross-domain Identity Management) lets the IdP create, update and disable Snowflake users and role memberships. A person who leaves loses Snowflake access when their IdP account is disabled. SAML or OIDC then handles the sign-in itself.
For a private Git repository, Snowflake uses a personal access token from GitHub or GitLab, not a Snowflake PAT. It is kept in a SECRET object. The API integration that lets Snowflake call the Git server lists the secrets it may use in ALLOWED_AUTHENTICATION_SECRETS.
- Authentication = identity, once per session. Authorization = privileges, every statement.
- Federated authentication = SSO through an external IdP, using SAML 2.0 or OIDC.
- A person signing in with a password must use MFA: passkey, TOTP app or Duo. Token caching lasts up to 4 hours.
- Services use TYPE = SERVICE with workload identity federation, OAuth, key pair or a PAT (network policy required by default).
- SCIM is provisioning, not authentication. Key pairs rotate through two slots.

