Authentication | Developer Guide | Azure Red Hat OpenShift 3 Products Overview Features Pricing Featured Products Red Hat OpenShift Container Platform Build, deploy and manage your applications across cloud- and on-premise infrastructure Red Hat OpenShift Dedicated Single-tenant, high-availability Kubernetes clusters in the public cloud Red Hat OpenShift Online The fastest way for developers to build, host and scale applications in the public cloud All products Learn Learn What is OpenShift Get started Partners Customer success stories Blog Resources Technology Topics Knative Security Kubernetes Service Brokers Community OpenShift Commons Open Source (OKD) Startups Grants Support Help Center OpenShift Docs Free Trial Log In Documentation Azure Red Hat OpenShift 3 Developer Guide Authentication About Welcome Getting Started Overview Accessing Your Services Web Console Walkthrough Command-Line Walkthrough Administering a Cluster Architecture Overview Infrastructure Components Kubernetes Infrastructure Container Registry Web Console Azure Resources Processes Core Concepts Overview Containers and Images Pods and Services Projects and Users Builds and Image Streams Deployments Additional Concepts Authentication Authorization Persistent Storage Ephemeral Storage Source Control Management Admission Controllers Other API Objects Networking Networking Routes Cluster Administration Overview Backing up and restoring projects and applications Managing Networking Configuring Service Accounts Managing Role-based Access Control Managing Security Context Constraints Setting Quotas Setting Limit Ranges Developer Guide Overview Application Life Cycle Management Planning Your Development Process Creating New Applications Promoting Applications Across Environments Authentication Authorization Projects Migrating Applications Overview Database Applications Web Framework Applications QuickStart Examples Continuous Integration and Deployment Webhooks and Action Hooks S2I Tool Support Guide Tutorials Overview Quickstart Templates Ruby on Rails Setting Up a Nexus Mirror OpenShift Pipeline Builds Binary Builds Builds How Builds Work Basic Build Operations Build Inputs Build Output Build Strategy Options Build Environment Triggering Builds Build Hooks Build Run Policy Advanced Build Operations Troubleshooting Deployments How Deployments Work Basic Deployment Operations Deployment Strategies Advanced Deployment Strategies Kubernetes Deployments Support Templates Opening a Remote Shell to Containers Service Accounts Managing Images Quotas and Limit Ranges Routes Integrating External Services Secrets ConfigMaps Using Daemonsets Pod Autoscaling Using Persistent Volumes Storage Classes Selector and Label Volume Binding Executing Remote Commands Copying Files Port Forwarding Shared Memory Application Health Events Managing Environment Variables Jobs OpenShift Pipeline Create from URL Creating an object from a custom resource definition Application memory sizing Creating Images Overview Guidelines Image Metadata S2I Requirements Testing S2I Images Custom Builder Using Images Overview Source-to-Image (S2I) Overview .NET Core Node.js Perl PHP Python Ruby Customizing S2I Images Database Images Overview MySQL PostgreSQL MongoDB MariaDB Other Images Overview Jenkins Jenkins Slaves Other Container Images CLI Reference Overview Get Started with the CLI Managing CLI Profiles Developer CLI Operations API reference API list Common object reference Index core About core Binding [core/v1] ComponentStatus [core/v1] ConfigMap [core/v1] Endpoints [core/v1] Event [core/v1] LimitRange [core/v1] Namespace [core/v1] Node [core/v1] PersistentVolumeClaim [core/v1] PersistentVolume [core/v1] Pod [core/v1] PodTemplate [core/v1] ReplicationController [core/v1] ResourceQuota [core/v1] Secret [core/v1] ServiceAccount [core/v1] Service [core/v1] admissionregistration.k8s.io About admissionregistration.k8s.io MutatingWebhookConfiguration [admissionregistration.k8s.io/v1beta1] ValidatingWebhookConfiguration [admissionregistration.k8s.io/v1beta1] apiregistration.k8s.io About apiregistration.k8s.io APIService [apiregistration.k8s.io/v1] apps About apps ControllerRevision [apps/v1] DaemonSet [apps/v1] Deployment [apps/v1] ReplicaSet [apps/v1] StatefulSet [apps/v1] apps.openshift.io About apps.openshift.io DeploymentConfig [apps.openshift.io/v1] authentication.k8s.io About authentication.k8s.io TokenReview [authentication.k8s.io/v1] authorization.k8s.io About authorization.k8s.io LocalSubjectAccessReview [authorization.k8s.io/v1] SelfSubjectAccessReview [authorization.k8s.io/v1] SelfSubjectRulesReview [authorization.k8s.io/v1] SubjectAccessReview [authorization.k8s.io/v1] authorization.openshift.io About authorization.openshift.io ClusterRoleBinding [authorization.openshift.io/v1] ClusterRole [authorization.openshift.io/v1] LocalResourceAccessReview [authorization.openshift.io/v1] LocalSubjectAccessReview [authorization.openshift.io/v1] ResourceAccessReview [authorization.openshift.io/v1] RoleBindingRestriction [authorization.openshift.io/v1] RoleBinding [authorization.openshift.io/v1] Role [authorization.openshift.io/v1] SelfSubjectRulesReview [authorization.openshift.io/v1] SubjectAccessReview [authorization.openshift.io/v1] SubjectRulesReview [authorization.openshift.io/v1] autoscaling About autoscaling HorizontalPodAutoscaler [autoscaling/v1] batch About batch CronJob [batch/v1beta1] Job [batch/v1] build.openshift.io About build.openshift.io BuildConfig [build.openshift.io/v1] Build [build.openshift.io/v1] certificates.k8s.io About certificates.k8s.io CertificateSigningRequest [certificates.k8s.io/v1beta1] events.k8s.io About events.k8s.io Event [events.k8s.io/v1beta1] image.openshift.io About image.openshift.io Image [image.openshift.io/v1] ImageSignature [image.openshift.io/v1] ImageStreamImage [image.openshift.io/v1] ImageStreamImport [image.openshift.io/v1] ImageStreamMapping [image.openshift.io/v1] ImageStream [image.openshift.io/v1] ImageStreamTag [image.openshift.io/v1] network.openshift.io About network.openshift.io ClusterNetwork [network.openshift.io/v1] EgressNetworkPolicy [network.openshift.io/v1] HostSubnet [network.openshift.io/v1] NetNamespace [network.openshift.io/v1] networking.k8s.io About networking.k8s.io NetworkPolicy [networking.k8s.io/v1] oauth.openshift.io About oauth.openshift.io OAuthAccessToken [oauth.openshift.io/v1] OAuthAuthorizeToken [oauth.openshift.io/v1] OAuthClientAuthorization [oauth.openshift.io/v1] OAuthClient [oauth.openshift.io/v1] policy About policy PodDisruptionBudget [policy/v1beta1] PodSecurityPolicy [policy/v1beta1] project.openshift.io About project.openshift.io ProjectRequest [project.openshift.io/v1] Project [project.openshift.io/v1] quota.openshift.io About quota.openshift.io AppliedClusterResourceQuota [quota.openshift.io/v1] ClusterResourceQuota [quota.openshift.io/v1] rbac.authorization.k8s.io About rbac.authorization.k8s.io ClusterRoleBinding [rbac.authorization.k8s.io/v1] ClusterRole [rbac.authorization.k8s.io/v1] RoleBinding [rbac.authorization.k8s.io/v1] Role [rbac.authorization.k8s.io/v1] route.openshift.io About route.openshift.io Route [route.openshift.io/v1] scheduling.k8s.io About scheduling.k8s.io PriorityClass [scheduling.k8s.io/v1beta1] security.openshift.io About security.openshift.io PodSecurityPolicyReview [security.openshift.io/v1] PodSecurityPolicySelfSubjectReview [security.openshift.io/v1] PodSecurityPolicySubjectReview [security.openshift.io/v1] RangeAllocation [security.openshift.io/v1] SecurityContextConstraints [security.openshift.io/v1] storage.k8s.io About storage.k8s.io StorageClass [storage.k8s.io/v1] VolumeAttachment [storage.k8s.io/v1beta1] template.openshift.io About template.openshift.io BrokerTemplateInstance [template.openshift.io/v1] Template [template.openshift.io/v1] TemplateInstance [template.openshift.io/v1] Template [template.openshift.io/v1] user.openshift.io About user.openshift.io Group [user.openshift.io/v1] Identity [user.openshift.io/v1] UserIdentityMapping [user.openshift.io/v1] User [user.openshift.io/v1] × Show more results Authentication Important Azure Red Hat OpenShift 3.11 will be retired 30 June 2022. Support for creation of new Azure Red Hat OpenShift 3.11 clusters continues through 30 November 2020. Following retirement, remaining Azure Red Hat OpenShift 3.11 clusters will be shut down to prevent security vulnerabilities. Follow this guide to create an Azure Red Hat OpenShift 4 cluster. If you have specific questions, please contact us Web Console Authentication CLI Authentication Web Console Authentication When accessing the web console from a browser at <master_public_addr>:8443, you are automatically redirected to a login page. Review the browser versions and operating systems that can be used to access the web console. You can provide your login credentials on this page to obtain a token to make API calls. After logging in, you can navigate your projects using the web console. CLI Authentication You can authenticate from the command line using the CLI command oc login. You can get started with the CLI by running this command without any options: $ oc login The command’s interactive flow helps you establish a session to an Azure Red Hat OpenShift server with the provided credentials. If any information required to successfully log in to an Azure Red Hat OpenShift server is not provided, the command prompts for user input as required. The configuration is automatically saved and is then used for every subsequent command. All configuration options for the oc login command, listed in the oc login --help command output, are optional. The following example shows usage with some common options: $ oc login [-u=<username>] \   [-p=<password>] \   [-s=<server>] \   [-n=<project>] \   [--certificate-authority=</path/to/file.crt>|--insecure-skip-tls-verify] The following table describes these common options: Table 1. Common CLI Configuration Options Option Syntax Description -s, --server $ oc login -s=<server> Specifies the host name of the Azure Red Hat OpenShift server. If a server is provided through this flag, the command does not ask for it interactively. This flag can also be used if you already have a CLI configuration file and want to log in and switch to another server. -u, --username and -p, --password $ oc login -u=<username> -p=<password> Allows you to specify the credentials to log in to the Azure Red Hat OpenShift server. If user name or password are provided through these flags, the command does not ask for it interactively. These flags can also be used if you already have a configuration file with a session token established and want to log in and switch to another user name. -n, --namespace $ oc login -u=<username> -p=<password> -n=<project> A global CLI option which, when used with oc login, allows you to specify the project to switch to when logging in as a given user. --certificate-authority $ oc login --certificate-authority=<path/to/file.crt> Correctly and securely authenticates with an Azure Red Hat OpenShift server that uses HTTPS. The path to a certificate authority file must be provided. --insecure-skip-tls-verify $ oc login --insecure-skip-tls-verify Allows interaction with an HTTPS server bypassing the server certificate checks; however, note that it is not secure. If you try to oc login to a HTTPS server that does not provide a valid certificate, and this or the --certificate-authority flags were not provided, oc login will prompt for user input to confirm (y/N kind of input) about connecting insecurely. CLI configuration files allow you to easily manage multiple CLI profiles. If you have access to administrator credentials but are no longer logged in as the default system user system:admin, you can log back in as this user at any time as long as the credentials are still present in your CLI configuration file. The following command logs in and switches to the default project: $ oc login -u system:admin -n default Copyright © 2022 Red Hat, Inc. Privacy statement Terms of use All policies and guidelines