The Simplest Way to Make Luigi and SAML Work Like They Should
Teams pair luigi and saml to put user sign-on in front of batch data jobs. This setup lets data engineers check task graphs and rerun failed jobs using company login credentials. Luigi builds and runs long chains of Python batch tasks for data teams. Its central planner tracks work, while SAML checks user identities against your company directory. Linking them stops strangers from viewing task status pages or triggering heavy data jobs. How luigi and saml pass user identity and roles By defa
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.
Teams pair luigi and saml to put user sign-on in front of batch data jobs. This setup lets data engineers check task graphs and rerun failed jobs using company login credentials.
Luigi builds and runs long chains of Python batch tasks for data teams. Its central planner tracks work, while SAML checks user identities against your company directory. Linking them stops strangers from viewing task status pages or triggering heavy data jobs.
How luigi and saml pass user identity and roles
By default, the Luigi central planner opens its web page to anyone on the network. It does not check who views the job list or who pauses a task. Adding SAML puts a login step in front of the planner web interface.
When an engineer opens the planner page, the browser jumps to the identity provider. The identity provider checks the user password and second factor. It then sends a signed XML claim back to the web server.
That signed claim holds the user email and group names from your company directory. The web server reads these groups and decides what the user can do. Viewers can read task graphs, while builders can restart stuck runs.
Worker nodes still need a way to talk to the central planner. Human users log in with SAML, while worker nodes use scoped service tokens. This split keeps human sessions safe without breaking scheduled nightly batch runs.
Common failure modes with shared accounts and wide network paths
Many teams skip user logins and put the planner on a private network. Any person or script on that network can open the page and change tasks. When a job fails or runs twice, the logs show no user name.
Another common mistake is giving every engineer the same admin password. When one person leaves the team, everyone must update their saved passwords. Shared logins also ruin audit logs because every action looks the same.
SAML 2.0 + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
SAML sessions can also keeps the session active too long if you set weak rules. If a browser cookie lasts for weeks, a stolen laptop puts your jobs at risk. Short session times force a fresh check against your identity provider each day.
Data jobs also read and write sensitive customer rows in your backend databases. If a batch task dumps raw error logs to the web screen, viewers see private data. Masking rules can rewrite emails, phone numbers, card numbers, and national IDs in query results.
Scoping permissions and network routes for batch pipelines
Start by locking the central planner behind an encrypted web server that speaks SAML. Block direct network paths to the raw planner port from user laptops. Only the local web server and trusted worker hosts should reach that port.
Next, map your identity provider groups to clear job actions. Let analysts view task history and run times without changing active state. Give on-call data engineers the right to clear locks and rerun failed steps.
Keep worker credentials separate from human login sessions at all times. Give each worker group its own narrow role for the databases it reads. Rotate those worker keys often and log every database query the tasks run.
Check database and API queries on the wire
Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.
Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.
Frequently asked questions
Does Luigi support SAML logins out of the box?
No, the built-in central planner does not include a native SAML login handler. Teams place an auth-enabled web server or access tool in front of the planner port.
How do automated worker nodes talk to the planner when SAML is active?
Workers do not use the browser SAML flow meant for human engineers. They use machine tokens or internal network paths to send task status updates to the planner.
How can we stop sensitive data from leaking in Luigi task logs?
Keep raw database rows out of task error messages and add data masking to database sessions. Masking rewrites matched fields like emails and card numbers in results before logs save them.
Related guides
In this post