Google Workspaces SSO for Kubernetes Openshift

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up google workspaces sso for kubernetes openshift by linking your identity provider to the cluster API server. Then you map your group names to native cluster roles so engineers can log in. Most teams start by linking their main workspace directory to the cluster auth service. This stops teams from sharing static client keys or local admin passwords. Still, teams often map broad workspace groups to wide cluster roles during the initial rollout. When roles are too broad, a single login gi

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 google workspaces sso for kubernetes openshift by linking your identity provider to the cluster API server. Then you map your group names to native cluster roles so engineers can log in. Most teams start by linking their main workspace directory to the cluster auth service. This stops teams from sharing static client keys or local admin passwords. Still, teams often map broad workspace groups to wide cluster roles during the initial rollout. When roles are too broad, a single login gives an engineer full control over live workloads.

How google workspaces sso for kubernetes openshift works

The login flow starts when an engineer tries to reach the cluster API server. The cluster redirects the user to Google to check their workspace account and group state. After a valid login, the provider sends a signed token back to the cluster. The API server reads the user identity and group names from that token. From there, native role-based access control takes over to check each API call.

In both Kubernetes and OpenShift, roles hold rules that represent a set of permissions. These permissions are purely additive, which means there are no deny rules in the system. A standard Role always sets permissions within a single namespace for local resources. A ClusterRole is not namespaced and can cover resources across all namespaces or cluster nodes. You link Google users or groups to these roles with a RoleBinding or a ClusterRoleBinding. A RoleBinding grants permissions inside one namespace, while a ClusterRoleBinding grants access across the whole cluster.

Why native roles leave a gap during live sessions

Linking your workspace directory solves the problem of who can log in to the cluster. When someone leaves the company, you disable their workspace account and cut off cluster entry. Native role bindings also let you split permissions by team or by namespace. You can let a team read pod state in one namespace without giving them node rights.

Still, native setup only checks the resource and verb at the start of an API call. It does not inspect what happens inside an active shell or a log stream. In the API, subresources like pod logs or pod exec appear as paths with a slash. When a role allows the exec subresource, an engineer can open a shell inside a running container. Once that shell opens, native role rules cannot filter individual shell commands in flight. An engineer can run risky commands or query internal services from inside that pod. Similarly, if a role allows reading pod logs, the cluster returns the raw log stream. If an app prints emails, phone numbers, card numbers, or national IDs, those values show up in plain text. Native roles also lack a built-in step to ask a peer for approval before a single command runs.

Kubernetes RBAC + OpenShift RBAC: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

How to tighten role design before production

Before you roll out workspace login to every team, review how your groups map to roles. Avoid binding broad workspace groups to cluster-wide admin roles just to save setup time. Start with empty permissions and add only the specific verbs a team needs for daily work. Remember that rules are additive, so a wide ClusterRoleBinding cannot be undone by a smaller RoleBinding.

Keep routine view roles separate from roles that allow pod exec or secret reads. Grant namespace-scoped RoleBindings for daily checks instead of cluster-wide bindings whenever you can. Even with tight roles, remember that anyone with exec rights has full run control inside that container. To control commands in flight or mask sensitive fields like card numbers, you need controls beyond native roles.

Add request guardrails and response masking beside Kubernetes

Cluster roles and service accounts govern who reaches the Kubernetes API. Still, a broad role or agent can delete workloads or print sensitive values from ConfigMaps and logs. In practice, hoop.dev sits inline beside the API server as a sidecar for your Kubernetes API. For every production API call an agent or human sends, hoop.dev decides whether to pass, mask, block, or escalate it for review alongside RBAC.

With hoop.dev Kubernetes controls, guardrails allow listing Secret names while refusing reads of Secret data before execution, and data masking redacts matched keys in returned JSON responses and log streams in memory. Furthermore, hoop.dev holds SOC 2 Type II and is MIT licensed on GitHub.

Frequently asked questions

Can I add a deny rule to block pod exec for one Google group?

No, native cluster permissions are purely additive and do not support deny rules. To block pod exec, you must remove that subresource rule from every role bound to that group.

What is the difference between a RoleBinding and a ClusterRoleBinding for SSO groups?

A RoleBinding grants your Google group permissions inside one specific namespace only. A ClusterRoleBinding grants that group permissions across the entire cluster and all namespaces.

Does Google SSO hide sensitive data inside pod logs?

No, SSO only checks who logs in and native roles only decide who can read logs. If logs hold emails or phone numbers, you need data masking to rewrite matched fields in results.

The query runs. The emails stay hidden.