Essential OpenShift Interview Questions on Identity and Access

Essential OpenShift access questions ask who is making a request, which action they need, and where that permission applies. Authentication establishes identity; authorization evaluates the requested action; admission and workload security controls add other checks. Explain these layers with a scoped example instead of recommending broad administrator access.

Aug 20, 2024 - 10:08
Updated: 
101.5k

OpenShift in IT Infrastructure · Interview preparation

Essential OpenShift Interview Questions on Identity and Access

Quick answer: Essential OpenShift access questions ask who is making a request, which action they need, and where that permission applies. Authentication establishes identity; authorization evaluates the requested action; admission and workload security controls add other checks. Explain these layers with a scoped example instead of recommending broad administrator access. These original practice questions follow a fictional reviewer who needs to read Pods in one project but has an unexpected extra grant. Product references use OpenShift Container Platform 4.22 documentation, with Kubernetes sources for the specified stable access concepts.

Key takeaways

  • Name the subject, action, resource and project in an access question.
  • Distinguish successful sign-in from permission to use an API.
  • Review all applicable RBAC grants because permissions are additive.
  • Separate API permissions, workload admission and network traffic rules.
  • Treat sensitive data access through workloads as part of access review.

Table of Contents

How do authentication and authorization differ in OpenShift?

Authentication establishes the identity associated with a request. Authorization decides whether that identity may perform a particular action on a resource in a scope. Successful sign-in does not imply permission to inspect every project.

The OpenShift authentication and authorization guide documents identity providers, users, groups and role-based access. Explain the configured identity provider separately from the roles granted after sign-in.

Interview question: a reviewer signs in successfully but receives Forbidden when reading Pods in amber. What does that suggest? The observed request reached an authorization decision that denied the requested action under the effective configuration. Confirm the actual identity, resource, verb and project before changing a grant. An application-generated access-denied message may need a different interpretation, so identify the response source.

What is the difference between a Role, ClusterRole and their bindings?

A Role defines permissions within a namespace. A ClusterRole is reusable for appropriate resources and scopes. A RoleBinding grants a referenced Role or ClusterRole within its namespace, while a ClusterRoleBinding grants the referenced ClusterRole at cluster scope.

The Kubernetes RBAC reference explains these distinctions and the additive permission model. There are no ordinary RBAC deny rules that cancel another allow grant. Removing one binding may leave the same action permitted by another binding or group membership.

Question: can a ClusterRole be used without granting its namespaced permissions everywhere? Yes, a namespace RoleBinding can refer to it. State both the referenced role and the binding scope. The word ClusterRole alone does not tell the interviewer where the subject received its permission.

ObjectContains or connectsScope question
RolePermission rules for namespaced resourcesWhich namespace defines it?
ClusterRoleReusable rules, including appropriate cluster resourcesHow is it granted?
RoleBindingSubject to a Role or ClusterRoleWhich namespace receives the grant?
ClusterRoleBindingSubject to a ClusterRoleWhat access follows across the cluster?

How would you investigate an unexpected reviewer permission?

In a fictional worksheet, reviewer Nila should read Pods in amber and have no intended access to blue. A local binding in amber supplies the intended read permission. A separate group binding also gives her group broader access that includes blue.

Question: would replacing the amber binding with a narrower one remove access to blue? No. The independent grant remains. Review the complete set of applicable bindings and group memberships, identify the owner of the excess grant, and propose the smallest supported correction through the access process.

Verify the intended positive behavior and the unwanted permission boundary using authorized checks. Avoid testing by changing real workloads. A sanitized authorization review can identify the subject, action and scope without disclosing tokens or resource contents.

Supplied grantEffect in the fictional caseReview decision
Reviewer bound to Pod reader in amberIntended project read accessRetain if it matches the requirement
Reviewer belongs to an additional bound groupIndependent broader permission appliesIdentify the group grant and its owner
Amber binding becomes narrowerDoes not erase the group grantReview every source of the unwanted action
Access verified only as administratorSays nothing about reviewer scopeCheck the intended identity and authorized boundary

How do service account and human identities differ?

A service account identifies a workload or automation context within Kubernetes. It has its own grants; it should not inherit the interview candidate's assumed personal access. Ask which identity the process actually uses when it calls the API.

Question: the developer can list Pods interactively, but the application receives Forbidden. Start with the application's service account and bindings, not the developer's successful session. A correct grant for one identity does not establish another identity's permissions.

Scope automation to its required resources and verbs. The OpenShift authorization guide documents service account management, while the RBAC reference explains the rules those accounts can receive. Keep authentication material out of manifests shared for interview review; use provider-supplied dummy identities and sanitized records.

Does permission to create a Pod permit every security context?

API permission to create a workload is separate from the security requirements evaluated during admission. OpenShift security context constraints govern permitted aspects of a Pod's execution context. The architecture guide describes admission within the platform, and the authorization guide documents SCC behavior.

Question: a user can create Pods, but one requested security context is rejected. Giving that user a broad project role does not automatically establish that the proposed context is permitted or necessary. Inspect the admission message and the application's actual requirements.

Red Hat advises against modifying default SCCs. Prefer an application that works within the expected restrictions; any justified exception needs appropriate review and a supported custom configuration. Do not treat privileged execution as a routine fix for an unexplained failure.

Do API access and project membership control every data path?

API authorization and network traffic controls answer different questions. The OpenShift network policy guide describes policy for workload traffic. A user with project access has not thereby established that one application may connect to another through every port.

Sensitive data access can also be indirect. The Secret guidance warns that the ability to create consuming workloads can expose sensitive values in that namespace. Restricting a direct Secret read alone may therefore be insufficient for the intended confidentiality boundary.

The ConfigMap guide describes non-confidential configuration. Choose the appropriate resource, but also review the subject's effective privileges and the application's consumption path. Resource type and Base64 representation cannot replace an access model.

What should a complete access-control interview answer conclude?

For Nila's case, state that the amber read binding matches the requirement, while the independent group grant explains the unexpected access to blue. Narrowing amber alone would leave that access unchanged. The next step is an owner-approved review of the excess grant.

Then distinguish the controls that remain outside the RBAC finding: identity-provider configuration, Pod admission and application network access. A response can be technically correct about RBAC while incomplete about the application requirement.

Document the intended scope and sanitized verification outcome. If the interviewer changes the required action from reading Pods to reading logs, revisit the relevant resource and subresource permissions. Avoid assuming that a role name or one successful action represents every permission the user needs.

Related reading: OpenShift certification practice tasks; OpenShift features and security questions; OpenShift networking building blocks.

References

Frequently Asked Questions

Sign-in establishes identity, while effective authorization rules determine whether that identity may perform each requested action in its scope.

A ClusterRole can be referenced by a project RoleBinding, which grants its applicable namespaced permissions within that binding scope.

Ordinary Kubernetes RBAC permissions are additive, so a narrower role does not cancel permissions supplied by another applicable grant.

The application can use a different service account and grants, so compare the actual identities and requested API actions.

Pod creation authorization and security admission requirements are separate, so the requested execution context must satisfy the applicable controls.

Red Hat advises preserving default SCCs; investigate application requirements and obtain review for any supported custom security exception.

Workload creation and other privileges can expose sensitive values indirectly, so assess the complete access and consumption paths.

The supplied access matrix is a fictional reasoning exercise, while any later practical verification requires an explicitly authorized environment and identity.

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Wow Wow 0
Sad Sad 0
Angry Angry 0
Anjali

I am passionate about technology, invention and big challenging tasks on my to- do list. In terms of the work I am doing also at Bunnyshell, I am most passionate about the technologies that we are using., I'm devoted to delivering content that not only informs but also inspires. Whether you need in- depth analysis pieces, educational attendants, or study- provoking opinion pieces, I draft content that resonates with tech suckers and professionals likewise.