The Simplest Way to Make Domino Data Lab and OAuth Work Like They Should
Pairing domino data lab and oauth lets data teams log in and run code with verified user tokens. This setup links every notebook session and job run to a real person on your team. Data scientists need fast ways to read databases and train models. Security teams need to know who ran each query and why. When you pair these two systems, you replace static passwords with time-limited tokens. Your team can run jobs without pasting raw keys into notebooks. How domino data lab and oauth handle login
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
Pairing domino data lab and oauth lets data teams log in and run code with verified user tokens. This setup links every notebook session and job run to a real person on your team.
Data scientists need fast ways to read databases and train models. Security teams need to know who ran each query and why. When you pair these two systems, you replace static passwords with time-limited tokens. Your team can run jobs without pasting raw keys into notebooks.
How domino data lab and oauth handle login and data flow
The workflow starts when a user logs into the data science platform. The platform sends the user to your identity provider to check their identity. After a valid login, the provider sends back a signed token. This token holds the user identity, group memberships, and expiration time.
When the user launches a workspace, the platform passes this token into the container. Scripts and notebooks inside the workspace can read the token during a run. When the code queries an external data store, it presents the token for permission checks. The data store checks the token signature and grants the right level of read or write permissions.
Tokens expire after a short window, so the platform must refresh them during long training jobs. A refresh flow runs in the background to get a new token before the old one dies. If an admin revokes a user in the identity provider, the next refresh fails right away. This stops the workspace from pulling more data after someone leaves the team.
Common failure modes and how to scope roles
Many teams set up single sign-on for the web app but stop there. Once inside a workspace, users still fall back to shared database accounts. A shared account hides who ran a bad query or pulled sensitive rows. Audit logs at the database level only show the shared account name.
Broad token scopes create another big risk for production data. If a token grants admin rights across all cloud resources, a broken script can delete tables. Over-scoped tokens also put sensitive customer records at risk during routine model tests. Masking rules can help here by rewriting matched fields like emails, phone numbers, card numbers, or national IDs in query results.
OAuth 2.0 + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Expired tokens often break scheduled batch jobs that run overnight. A job starts fine, but the token dies two hours into a four-hour run. Without a background refresh flow, the job crashes when it tries to write output data. Teams then waste time fixing failed runs or switch back to static keys that never expire.
To fix these issues, scope every token to the smallest set of permissions needed. Map identity provider groups to specific project roles inside the data platform. Give data scientists read-only roles for production tables and write roles only for sandbox schemas. Set up network rules so workspaces can only reach approved data stores on specific ports.
Auditing workspace runs and database queries
Good security requires clear logs across both your compute workspaces and your data stores. When every query carries a user token, the database log records the exact person who ran it. You can match workspace launch events with database query logs by checking the user ID and timestamp.
Review these logs each week to spot unused permissions or odd query patterns. If a user only reads one schema, drop their permissions for other tables. Keep token lifetimes short so stolen or leaked tokens stop working within minutes. This approach keeps your data safe while letting data scientists work fast.
Govern statements and responses across databases and APIs
Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.
First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.
Frequently asked questions
How do long batch jobs handle token expiration?
Long jobs use a refresh token to get a new access token before the current one expires. The platform requests this update in the background so the running script does not fail.
Why should teams avoid shared database accounts in notebooks?
Shared accounts hide individual user activity in database logs and make auditing impossible. If a key leaks, you must rotate it across every notebook and job at once.
How can we limit what data a notebook can read?
You can assign narrow group roles in your identity provider and map them to database permissions. You can also apply data masking to rewrite emails, phone numbers, card numbers, and national IDs in results.
Related guides
In this post