Trace authentication and effective object access
Diagnose a connection failure separately from the privileges needed to read a table.
Trace authentication and effective object access
Work through the decision
A partner signs in successfully but a SELECT fails. An unattended reporting job must also authenticate without a human password. Which evidence belongs to each investigation?
Check your reasoning
For the partner, inspect active roles and inherited grants, warehouse USAGE, database and schema USAGE, and table SELECT. Establish whether the job can use supported key-pair or OAuth authentication and grant its role only the required operations. A network policy restricts where a connection can originate.
Compare the choices
- Role privilege chain
- Authorize access through an active role and applicable inherited privileges on parent containers and the object.
- Database role
- Group privileges scoped to one database, then grant the database role to a suitable account role.
- Federated sign-in
- Trust a configured identity provider for human sign-in and apply the appropriate MFA and session policies.
- Key-pair authentication
- Use a registered public key and keep the private key in an approved secret store with a rotation procedure.
- OAuth
- Authorize a compatible client with a scoped token and a configured security integration.
- Network policy
- Restrict eligible connection origins using supported network controls. A permitted origin still needs valid credentials and authorization.
- Event table
- Collect supported logs and traces emitted by instrumented code when telemetry is enabled.
Test the decision
A support session selected a different primary role from the working worksheet. Reproduce the account identifier, active roles and target object before altering grants. Event tables capture supported application logs and traces when configured. Use the appropriate login and query history for authentication and SQL execution evidence.
Practice the guide skills
- Trace ownership and explicit grants before deciding which role may authorize access. Watch 1:08:08
- Trace role inheritance in the correct direction and verify the privileges needed on parent containers. Watch 1:08:33
- Design a custom role for the job and minimize use of elevated built-in roles. Watch 1:10:49
- Package privileges for one database in a database role and grant it to the relevant account role. Watch 1:11:39
- Compare the active primary role with secondary roles when diagnosing effective access. Watch 1:11:56
- Match federated sign-in and MFA to a human identity and supported authentication policy. Watch 1:14:19
- Identify issuer, token and audience for a supported OAuth client. Watch 1:15:59
- Plan a key-pair registration and rotation using a protected private key for automation. Watch 1:16:39
- Check the applicable network policy and permitted origin before reviewing object privileges. Watch 1:17:46
- Verify organization and account identifiers for two sessions that appear to use the same credentials. Watch 1:18:19
- Locate instrumented logs and traces in an event table and distinguish them from query history. Watch 1:18:30
Official objectives for this lesson
Related lesson · Test security at the actual read surface
Trace authentication and effective object access quiz
Answer 3 questions. Check each answer for an explanation.