Course contents

SnowPro Core COF-C03 Study GuidePart 3: Access control and securityAuthentication Methods

Authentication Methods

Authentication, Network & Data Protection Policies

Authentication Methods

In short

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.

When each control acts. Phase 1, connect, once: the network policy checks where the connection comes from, then authentication checks who the user is. Phase 2, the session: it opens with a primary role and secondary roles, and a session policy can end it after idle time. Phase 3, every statement: privileges of the active roles are checked first, then governance policies apply, row access before masking.1 · CONNECT, ONCE2 · SESSION3 · EVERY STATEMENTNETWORKNetwork policyfrom which address?AUTHENTICATIONAuthenticationwho are you? SSO,password + MFA,key pair, OAuth…Session opensprimary role +secondary rolesPOLICYSession policyends the sessionafter idle timeAUTHORIZATIONPrivilegesmay the active rolesrun this statement?GOVERNANCE POLICIESRow access policywhich rows exist?Masking policywhat does each column show?then masksrows first,watches

1 · CONNECT, ONCE

NETWORKNetwork policyfrom which address?

AUTHENTICATIONAuthenticationwho are you? SSO, password + MFA, key pair, OAuth…

2 · SESSION

Session opensprimary role + secondary roles

watches

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?

Figure 3.10 Sign-in checks happen once, statement checks happen every time. The network policy and authentication both act at connect time but are separate controls. On each statement Snowflake checks privileges, then governance policies apply, row access before masking.
Policy objectQuestion it answersAttached to
Network policyFrom which addresses may this client connect?Account, user or security integration
Authentication policyWhich login methods, clients and MFA rules are allowed?Account, all person or all service users, or one user
Password policyHow strong must passwords be, how many retries before lockout?Account or user
Session policyHow long may a session stay idle?Account or user
Masking policyWhat does this column return to this role?Columns, directly or through tags
Row access policyWhich 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.

How people and programs prove who they are. People: Alice signs in at the identity provider, for example Okta or Entra ID, which checks her password and second factor and sends Snowflake a signed proof (a SAML assertion or an OIDC token). In a BI tool such as Tableau, the tool gets an OAuth token and queries as Alice; Snowflake checks the token through a security integration. Without an identity provider a person uses a password plus MFA in Snowflake. Programs hold one of four credentials. Key pair: the program keeps a private key, Snowflake stores the public key on the user. OAuth: the program holds a token from an authorization server, which Snowflake trusts through a security integration. Workload identity federation: the program uses the identity its cloud already gives it, with no stored secret. Programmatic access token: a secret string generated in Snowflake; Snowflake checks the secret and accepts it only from allowed addresses.PEOPLE (TYPE = PERSON)PROGRAMS (TYPE = SERVICE)USERAlicein SnowsightIdPIdentity providerOkta, Entra ID…checks password +second factorSnowflakeopens a sessionSAML assertionor OIDC tokenUSERAlicein TableauOAuth tokenfrom Snowflake OAuthor the IdPSnowflakechecks it via asecurity integrationNo identity provider? Password + MFA, checked by Snowflake itself.METHODTHE PROGRAM HOLDSSNOWFLAKE CHECKSKey pairprivate key onthe serverpublic key on theuser (RSA_PUBLIC_KEY)OAutha token from anauthorization servertrusts the issuer viaa security integrationWorkload identitythe identity its cloudgives it (no secret)trusts the cloudprovider or OIDC issuerPATa secret stringmade in Snowflakechecks the secret, onlyfrom allowed addresses1 signs in2 signed prooftool getsqueries as Alicepresentspresentspresentspresents

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)

THE PROGRAM HOLDSSNOWFLAKE CHECKS

METHOD

Key pair

private key on the server

presents

public key on the user (RSA_PUBLIC_KEY)

OAuth

a token from an authorization server

presents

trusts the issuer via a security integration

Workload identity

the identity its cloud gives it (no secret)

presents

trusts the cloud provider or OIDC issuer

PAT

a secret string made in Snowflake

presents

checks the secret, only from allowed addresses

Figure 3.11 Who presents what. People prove themselves at the identity provider, which vouches for them to Snowflake, or use a password plus MFA. Programs never use passwords; the four methods differ in what the program holds.
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 + MFAThe 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 toolTableau or Power BI gets a token and queries as you, through a security integration
Programs (TYPE = SERVICE)What the program holds
Key pairA private key on its server. Snowflake stores the public key on the user (RSA_PUBLIC_KEY)
OAuthA 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 refused
  MFA_ENROLLMENT = 'REQUIRED_PASSWORD_ONLY'   -- password users enrol in MFA; SSO users use the IdP's
  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 POLICY gives 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.

Isolated fact · Git integration

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.

Exam takeaway
  • 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.