October 11, 2023

Tanzu Kubernetes Grid Clusters on VMware vSphere and Workspace ONE Integration

In this blog, we are covering how customers can leverage the integration between VMware Tanzu Kubernetes Grid clusters on vSphere and VMware Workspace ONE as an external identity provider.   

Tanzu Kubernetes Grid Clusters on VMware vSphere and Workspace ONE Integration 

Author: Pramita Gautam, Kalyaan Krushna Codadu

In this blog, we are covering how customers can leverage the integration between VMware Tanzu Kubernetes Grid clusters on vSphere and VMware Workspace ONE as an external identity provider. 

Workspace ONE is designed to provide a management platform that allows IT administrators to centrally control end user’s mobile devices, cloud-hosted virtual desktops, and applications from the cloud or from an on-premises deployment.

In this documentation, Workspace ONE is the identity provider and integrated in it is VMware Tanzu as the pinniped supervisor.

Workspace ONE configuration

 

  1. Requirements
  1. Deploy and configure VMware Workspace ONE Access. If needed, refer to the documentation for more information on Workspace ONE Access.

 

  1. Install and configure Workspace ONE Access connector on a Windows server joined to the domain (for integrating with Active Directory and making use of features such as Directory Sync, User Auth, Kerberos Auth, or Virtual App services).

 

  • Click on the Access Connector installer file.

Graphical user interface, application, Word</p>
<p>Description automatically generated

 

  • Accept the EULA.

Graphical user interface, text, application</p>
<p>Description automatically generated

 

  • Select all the components listed and click Next.

Graphical user interface, text, application</p>
<p>Description automatically generated

 

  • Browse to the json file generated from Workspace ONE Access, and add the connector screen.

Graphical user interface, text, application, email</p>
<p>Description automatically generated

 

  • Select the Custom Installation option.

Graphical user interface, text, application, email</p>
<p>Description automatically generated

 

 

  • If connection between the connector virtual machine (VM) and Workspace ONE Access occurs via proxy servers, select the proxy box and provide the details. Otherwise, click Next, with Enable Proxy unchecked.

Graphical user interface, text, application</p>
<p>Description automatically generated

 

  • Configure syslog, if available.

Graphical user interface, text, application</p>
<p>Description automatically generated

 

 

  • If using Citrix multi-site aggregation, provide the required cofiguration details.

Graphical user interface, text, application</p>
<p>Description automatically generated

 

  • Provide the root certificate authority (CA) of the Workspace ONE Access appliance.

Graphical user interface, application</p>
<p>Description automatically generated

 

 

  • Select the default ports and click Next.

Graphical user interface, application</p>
<p>Description automatically generated

 

  • If you have certificate for Kerberos Auth services, select the certificate. Otherwise, leave the box unchecked and click Next to use the self-signed certificate.

Graphical user interface, text, application, email</p>
<p>Description automatically generated

 

Graphical user interface, text, application</p>
<p>Description automatically generated

  • Select any domain user/service account part of the domain that is being integrated with Workspace ONE Access using the following connector instance.

Graphical user interface, application</p>
<p>Description automatically generated

Graphical user interface, text, application</p>
<p>Description automatically generated

 

  • Click Install to complete the connector installation.

Graphical user interface, text, application, email</p>
<p>Description automatically generated

 

  • Once the installation is complete, you should see the connector displayed in Workspace ONE Access UI console.

 

  • Once the connector is updated in the Workspace ONE Access UI, create the directory.

A screenshot of a computer</p>
<p>Description automatically generated with medium confidence

If needed, refer to this documentation for details on installing Workspace ONE Access Connector.

 

  1. Perform the following configurations on Workspace ONE Access to create the OpenID Connect (OIDC) Client to be able to integrate with the Tanzu Kubernetes Grid cluster on vSphere.

 

  1. Log in to the Workspace ONE Access admin console and navigate to Resources. Select Web Apps from the righthand menu and click NEW.

A screenshot of a computer</p>
<p>Description automatically generated with medium confidence

 

  1. Specify a Name to the new web app and click NEXT.

 

A screenshot of a computer</p>
<p>Description automatically generated with medium confidence

  1. From the configuration screen
  • Specify the Authentication type – OpenID Connect
  • Specify the Target URL – This should be the NSX Load Balancer (LB) URL/IP for the pinniped supervisor service running in the Tanzu Kubernetes Grid cluster on vSphere.

 

Syntax: https://[lb Ip address]/callback

 

Note: If the Tanzu Kubernetes Grid cluster is not yet created, any IP address could be specified here and updated later, once the cluster is deployed and a LB IP is assigned to the pinniped service.

A screenshot of a computer</p>
<p>Description automatically generated with medium confidence

 

  • Redirect URL – List the same URL mentioned for the Target URL
  • Enter a Name for ClientID

Note: This ClientID will be used in the pinniped configured in the Tanzu Kubernetes Grid cluster on vSphere.

  • The client secret can be created as specified below on any machine.

  • Make sure the toggle buttons for Open in Workspace ONE Web and Show in User Portal are disabled. Click Next.

A screenshot of a computer</p>
<p>Description automatically generated with medium confidence

  • Assign an access policy from the drop-down menu or select the default policy.

A screenshot of a computer</p>
<p>Description automatically generated with medium confidence

 

  • Click Save, then Assign.
  • Assign the web app now created to the users/groups synced in Workspace ONE Access using the connector installed previously.

Note: Make sure to select Deployment Type as Automatic, when the web app is assigned to users.

  1. Configure Remote App Access in the Workspace ONE Access console with the following steps.

 

  1.  In the Workspace ONE Access console navigate to Settings > Remote App Access, then click the newly created web app.

A screenshot of a computer</p>
<p>Description automatically generated with medium confidence

 

  1. On the screen that has opened, click Edit next to Scope in the OAuth 2 Client section.

A screenshot of a computer</p>
<p>Description automatically generated with medium confidence

  1.  Select the following scope option check boxes.
  • Email
  • Profile
  • User
  • NAPPS
  • OpenID
  • Group
  1. Click Save.

A screenshot of a computer</p>
<p>Description automatically generated with medium confidence

 

  1. Click Next to navigate to Client Configuration. On this screen, uncheck the box for Prompt users for access.
  2. Ensure the token type is set to Bearer and update/redirect the URL with the correct IP LB for the pinniped supervisor.

 

A screenshot of a computer</p>
<p>Description automatically generated with medium confidence

 

Click Save.

 

  1. Assign the web app to Users Synced.

 

  1. Click Accounts, then navigate to Users.
  2. Double-click on the username and select the Application Tab.
  3. Click Assign and select the web app you created in the previous step.
  4. Ensure you have the Deployment Type set to Automatic. The same is applicable for User Groups.

 

A screenshot of a computer</p>
<p>Description automatically generated with medium confidence

 

  1. Next, we’ll need the root CA of Workspace ONE.
  1. Log in to the Workspace ONE Access virtual appliance management UI (https://<ws1-fqdn>:8443).

 

A screenshot of a computer</p>
<p>Description automatically generated with medium confidence

  1. Navigate to Install SSL Certificates.
  2. Under Server Certificate select Auto Generate Certificate (self-signed). You should now see the location from which you can download the root CA.

A screenshot of a computer</p>
<p>Description automatically generated with medium confidence

 

  1. For an alternate way to obtain the root CA for the VIDM appliance, follow the next steps. Otherwise, skip ahead to Tanzu Kubernetes Grid cluster configuration.
  1. From any machines with OpenSSL installed, run the following command:

openssl s_client -connect [Ip/fqdn of ws1 appliance]:443

 

A screenshot of a computer</p>
<p>Description automatically generated with medium confidence

 

  1. Copy the root CA from the output of the above command and save it in a notepad file.
  2. You will need to convert this certificate from a base64-encoded format to use for OIDC integration.
    1. To convert to base64-encoded format:

cat [name to root ca file] | base64 | tr -d ‘\n’ > [output file name]

 

         Tanzu Kubernetes Grid cluster configuration

 

  1. For new management of Tanzu Kubernetes Grid clusters follow these steps:
    1. If management of the Tanzu Kubernetes Grid cluster is to be created using the cluster YAML file, then refer to this documentation.

Update the values related to OIDC in the YAML file as specified below:

IDENTITY_MANAGEMENT_TYPE: oidc

OIDC_IDENTITY_PROVIDER_CLIENT_ID: <clientid>

OIDC_IDENTITY_PROVIDER_CLIENT_SECRET: <secret>

OIDC_IDENTITY_PROVIDER_GROUPS_CLAIM: group_names

OIDC_IDENTITY_PROVIDER_ISSUER_URL: https://<WS1-FQDN>/SAAS/auth

OIDC_IDENTITY_PROVIDER_SCOPES: openId,email,user,profile,group

OIDC_IDENTITY_PROVIDER_USERNAME_CLAIM: email

 

Use “tanzu management-cluster create -f <yaml-file>” to create the management cluster.

Use “tanzu cluster create -f <yaml-file>” to create workload clusters.

  1. If the management Tanzu Kubernetes Grid cluster is to be created using the Tanzu installer, then review this documentation.

In the cluster creation wizard under the Identity Management section, select OIDC and provide the required details as shared.

  1. After creating the management Tanzu Kubernetes Grid cluster, follow the steps in the Enable and Configure Identity Management in an Existing Deployment of this documentation. To update the pinniped secret file to add the CA of the Workspace ONE Access appliance for the key: “upstream_oidc_tls_ca_data” under the pinniped section.
  2. To get the CA of Workspace ONE, refer the Workspace ONE configuration section above.

 

  1. For existing management Tanzu Kubernetes Grid clusters, the same secret file can be updated with the OIDC details.
    1. If needed, refer to the Enable and Configure Identity Management in an Existing Deployment section of this documentation.

 

  1. Workload Tanzu Kubernetes Grid clusters
    1. Any workload clusters that you create when you enable identity management in the management cluster are automatically configured to use the same identity management service.
    2. Before you create workload cluster, remember to unset the variables (e.g., “_TKG_CLUSTER_FORCE_ROLE”) you might have set while updating the management cluster with identity management

 

         How to test

 

  1. Workspace ONE will have two domains named vmware.com (ActiveDirectory1) and tlglab.net (ActiveDirectory2).
  2. The following Linux VMs must be created for testing:
    • Bootstrap – For creating Tanzu clusters, and where the kubeconfig file resides
    • Jumpbox – A VM that will log a user into the Tanzu clusters

 

For the management Tanzu Kubernetes Grid cluster

  1. Log in to the bootstrap machine and create clusterrolebinding for the user.

kubectl create clusterrolebinding <crr-name> --clusterrole cluster-admin --user <user-email>

  1. Create the management kubeconfig file.

tanzu management-cluster kubeconfig get <management-cluster-name> --export-file <file-name>

  1. SCP this <file-name> kubeconfig file to the Jumpbox.
  2. Log in to the Jumpbox machine and clear the contexts and current-context sections from .config/tanzu/config-ng.yaml.
  3. Clear the server and current sections from .config/tanzu/config.yaml. Also, delete everything under .config/tanzu/pinniped directory.
  4. Clear the cache from the browser to be used.
  5. Log in to the management cluster from the Jumpbox machine.

tanzu login --endpoint https://<LB-ip-mgmt-cluster-control-plane>:6443 --name <mgmt-cluster-name>

  1. Copy the link and paste to the browser to get the authentication code.
  2. Try accessing the cluster as per the role-based access control (RBAC) created and it should be successful.

 

 

For the workload Tanzu Kubernetes Grid cluster

  1. Log in to the bootstrap machine and create clusterrolebinding for the user.

kubectl create clusterrolebinding <crr-name> --clusterrole cluster-admin –user <user-email>

  1. Create the workload kubeconfig file.

tanzu cluster kubeconfig get <workload-cluster-name> --export-file <file-name>

  1. SCP this <file-name> kubeconfig file to the Jumpbox.
  2. Log in to the Jumpbox machine and clear the contexts and current-context sections from .config/tanzu/config-ng.yaml.
  3. Clear the server and current sections from .config/tanzu/config.yaml. Also, delete everything under .config/tanzu/pinniped directory.
  4. Clear the cache from the browser to be used.
  5. Log in to the management cluster from the Jumpbox machine.

tanzu login --endpoint https://<LB-ip-mgmt-cluster-control-plane>:6443 --name <mgmt-cluster-name>

  1. Copy the link and paste to the browser to get the authentication code.
  2. Change the context to a workload cluster.

kubectl config use-context <context-name> --kubeconfig=<workload-kubeconfig>

  1.  Context-name can be retrieved from the workload-kubeconfig file that has been SCP.
  2. Try accessing the cluster as per the RBAC created and it should be successful.

 

Note: If you also have the groups in Workspace ONE and you want to give access to that group, then create clusterrolebinding with the group email ID and follow the same steps.

 

  • Multiple ADs

In this documentation, we have completed an integration of Tanzu with Workspace ONE, however, we must point out that this is for the use of multiple ADs in Workspace ONE.

Therefore, we can say that we have tested not only the integration of Tanzu with Workspace ONE, but also tested the access of clusters by the users present in multiple ADs in Workspace ONE.

 

LAB Details

Product specifications

VMware NSX-T

3.2.1.2

Tanzu Kubernetes Grid on vSphere

2.1.0

AVI Load Balancer

21.1.4

VMware vCenter Server

7.0 Update 3h

VMware ESXi

7.0 Update 3g

Workspace ONE Access

22.0.9.2

 

Filter Tags

Tanzu Tanzu Kubernetes Grid Blog