Openshift Pipelines Tekton

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up openshift pipelines tekton by defining tasks and binding roles to service accounts. These service accounts then run build pods inside your cluster namespaces. Many teams start by granting broad cluster roles to get builds working fast. When roles are too broad, a single build pod or user can read every secret. They can also change live workloads across the whole cluster. How openshift pipelines tekton works with cluster roles Every pipeline step runs inside its own Kubernetes pod.

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.

You set up openshift pipelines tekton by defining tasks and binding roles to service accounts. These service accounts then run build pods inside your cluster namespaces. Many teams start by granting broad cluster roles to get builds working fast. When roles are too broad, a single build pod or user can read every secret. They can also change live workloads across the whole cluster.

How openshift pipelines tekton works with cluster roles

Every pipeline step runs inside its own Kubernetes pod. To work with cluster resources, the pod uses a service account. You control what that account can do through Role and ClusterRole objects. In Kubernetes, a Role sets rules within one single namespace. A ClusterRole is not tied to one namespace. It can cover cluster-wide items like nodes, or resources across all namespaces.

Rules in this system are only additive. There are no deny rules in Kubernetes role-based access control. You attach these rules to accounts using a RoleBinding or a ClusterRoleBinding. A RoleBinding grants rights inside one specific namespace. It can point to a local Role or a shared ClusterRole. A ClusterRoleBinding grants those rights across the entire cluster at once.

When a pipeline fails, engineers often need to check the pod. Kubernetes treats pod logs and shell sessions as subresources in the API. A role rule writes these with a slash, such as pods and log. The same pattern applies when someone opens a shell into a running pod. If a user has the create verb on the exec subresource, they can run commands.

What native roles solve and what they miss

Native roles are great for deciding who can start a pipeline or view a pod. They let you lock down which service account can deploy to a specific namespace. They also let you separate read rights for logs from write rights for workloads.

Still, native role bindings stop at the door when a session starts. Once an engineer or pipeline gets shell rights to a pod, RBAC steps back. The cluster API checks if the user can start the exec session. It does not check the individual commands they type inside that shell. It also cannot mask sensitive data returned in command output, like emails or card numbers.

Tekton Pipeline Security + OpenShift RBAC: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Securing live pipeline debugging and data

During a broken build, developers often ask for temporary shell rights to inspect the workspace. If you grant a broad RoleBinding, that access keeps the session active until someone removes it. Engineers might also query attached databases from inside the pod to check test data. Native cluster roles do not inspect database queries or rewrite phone numbers in results.

To keep builds safe, teams need controls that work inside the active session. You should approve risky commands one by one and scrub sensitive fields in flight.

Check Kubernetes API requests and responses on the wire

Kubernetes RBAC decides who may call the API server. RBAC does not check response payloads or split listing Secret names from reading Secret values when a role grants get access. With hoop.dev, you run an open-source HTTP proxy, a sidecar for your Kubernetes API. The kubectl client changes only the server address it talks to while RBAC stays in place.

On each call, hoop.dev guardrails read the method, normalized path, and headers to refuse bad deletes or full Secret reads with a 403 error. On the way back, hoop.dev data masking walks JSON responses by key and masks matched values in Secrets, ConfigMaps, and pod logs. Every request and verdict is logged without storing bearer tokens. View the project on GitHub.

Frequently asked questions

How do I limit a pipeline to one namespace?

Create a Role inside that single namespace with only the rules the build needs. Then link the pipeline service account to that Role using a RoleBinding in the same namespace.

Can I add a deny rule to block one specific secret?

No, Kubernetes role rules are strictly additive and do not support deny rules. You must start with zero permissions and only grant access to the exact resources needed.

Why can developers run commands in build pods if they only have pod access?

Check if their Role or ClusterRole includes wildcard resources or the pods exec subresource. Removing the exec subresource lets them view pod status while blocking interactive shell commands.

The query runs. The emails stay hidden.