The Simplest Way to Make Azure Data Factory and GitLab CI Work Like They Should
Pairing azure data factory and gitlab ci lets teams deploy data pipelines from source control. GitLab runners push tested pipeline templates straight into your cloud data factory. This workflow stops manual edits inside the cloud portal. Every change to a data job goes through a code review first. Teams test their logic in a staging setup before pushing to production. How azure data factory and gitlab ci share auth and data Data factory stores pipeline steps, linked services, and triggers as
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 azure data factory and gitlab ci lets teams deploy data pipelines from source control. GitLab runners push tested pipeline templates straight into your cloud data factory.
This workflow stops manual edits inside the cloud portal. Every change to a data job goes through a code review first. Teams test their logic in a staging setup before pushing to production.
How azure data factory and gitlab ci share auth and data
Data factory stores pipeline steps, linked services, and triggers as JSON files. You link your development factory workspace to a dedicated Git repo. When engineers save changes, the tool commits those files to a branch.
GitLab CI watches the repo for merge requests and branch updates. When a team merges code, a runner starts a build job. The runner packages the pipeline templates for the target stage.
Next, the runner must log in to your cloud account. Most teams use federated identity tokens instead of static client secrets. GitLab issues a short-lived token to the runner during the job.
Your cloud directory checks that token and grants a specific role. The runner then writes the updated templates to the production data factory. Data flows between databases only when the factory runs those deployed jobs.
Common failure modes and how to scope roles
Many teams make the mistake of using one shared service account. They give the GitLab runner full owner rights across the whole subscription. If a bad actor steals that key, they control every cloud resource.
Long-lived secrets stored in CI variables create another big risk. Engineers forget to rotate these keys, and old keys often leak in logs. Broad network rules also let public runners hit private data stores.
GitLab CI Security + Azure RBAC: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
You can fix this by scoping roles down to the single resource group. Give the runner permission to update only the target data factory. It should never hold rights to read the raw data tables.
Separate the deploy role from the runtime identity of the factory itself. The factory uses its own managed identity to read and write data. Keep your runners on a private network when you deploy to private endpoints.
Protecting sensitive data during pipeline runs and tests
Even with scoped deploy roles, engineers still debug failed pipeline runs. They query source and staging tables to check why a job broke. Production databases often hold customer emails, phone numbers, and card numbers.
Static staging copies take too much time to build and clean. Teams need direct controls that protect live fields during ad-hoc checks. Data masking rewrites matched fields like national IDs in query results.
Clear audit logs also matter when both runners and humans touch databases. Standard service accounts hide which person triggered a manual data fix. Tying every query to an individual user identity closes that audit gap.
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 should GitLab runners log in to Azure without static secrets?
Use OpenID Connect federation between your GitLab project and your cloud directory. The runner trades a job token for a temporary cloud token at runtime.
Should GitLab CI trigger data pipelines or only deploy them?
Use GitLab CI to test and deploy the pipeline templates across stages. Let native factory triggers or schedules run the daily data movement jobs.
How do we keep test credentials out of source control files?
Store all database secrets and keys inside a managed cloud key vault. Reference those vault items in your factory templates instead of committing plain text.
Related guides
In this post