1. Enable access to a service with Secure Gateway
In this step, the first few instructions may seem familiar – you should be comfortable with navigating to and within an OpenShift web console in the IBM organization cluster based on your completion of the first Drone lab. As a reminder, you can always reference the first lab’s instructions guide here https://ielgov.github.io/dronelab1. In this lab, you will focus on a different cluster: one that emulates a real-life organization that has its own private service.
The purpose of this setup was to demonstrate the technology and value behind connecting various applications and services between different clusters, even if they are public or private. In a typical case, an application may want to access services that are located in a private cloud. With the inherit nature of private cloud, it may seem problematic to introduce communication with any public cloud application.
Let’s take a moment to review some concepts you will be delving into in the next few steps. Consider two parties involved: 1. the Operators that use the Remote Drone Operations Console application, and, 2. an organization, “GSC Drones-To-Go”, which has private on-prem resource in Coppell, TX that allows piloting and observing of local drones. |
View full size diagram |
GSC Drones-To-Go wants users like the Operators to access their drone service, wants to easily manage their access, and wants to make sure this connection is done securely so they aren’t compromised in any way.
The Operators, owners and users of the Remote Drone Operations Console, want to connect the service that GSC Drones-To-Go provides.
You will explore how IBM® Secure Gateway can help enable the connection between the Public Safety Situational Awareness Operator users in one cloud environment and the GSC Drones-To-Go services that are running in another cloud environment. By deploying the lightweight and natively installed Secure Gateway Client, a secure, persistent connection can be established between your environment and the cloud. You can imagine the Secure Gateway Client is like an on-prem bouncer, checking who wants access based on their list.
Secure Gateway allows the safe connection of applications and resources regardless of their location. This is important - rather than bridging your environments at the network level like a traditional VPN, Secure Gateway provides granular resource control operating with the principle of least privilege as its core tenet.
In this step of the lab, you learn about how to use Secure Gateway to bridge connection between the Remote Drone Operations Console and the on-prem resource at GSC Drones-To-Go. In later steps, you will continue to get more access to the IEL Drone-To-Go service, including accessing APIs and even invoking related flows.
Reference:
Indicated as text with light blue background.
Example:
It's important to read each step carefully and in order.
Skipping sections, reading too fast, or not clicking to read
may result in incomplete learning.
✅ Access RedHat OpenShift cluster
✅ Open RedHat OpenShift web console
✅ Setting up the Access Control List (ACL)
✅ Adding a Secure Gateway destination
Step 1 In Progress ☑ Access IBM Cloud ☑ Access RedHat OpenShift cluster ☑ Open RedHat OpenShift web console ☑ Setting up the Access Control List (ACL) ☑ Adding a Secure Gateway destination |
→ |
Step 2 ☑ Add a catalog ☑ Work with OpenAPI definitions ☑ Edit and publish API product ☑ Explore and test API |
→ |
Step 3 ☑ Explore sensor database ☑ Set up App Connect flow ☑ Start the API ☑ Try out the flow |
→ |
Step 4 ☑ Recap previous steps ☑ View configurations made for this lab ☑ Explore the drone viewer modal |
1.1 Access IBM Cloud
Just like in the first lab, you’ll need to access RedHat OpenShift through the IBM Cloud in order to build and deploy your application. Begin by signing into IBM Cloud. ( New Tab ⇒ https://cloud.ibm.com ) (Single Sign-On Required with w3id)
Once you’ve logged in, you should be greeted with a dashboard that displays the various resources that IBM Cloud has to offer. From Cognitive APIs to DevOps to Classic Infrastructure resources, IBM Cloud has many offerings to explore. At the top of the dashboard, you’ll see a navigation bar. On the right side of the navigation bar, there is a dropdown for various accounts you may be a part of. Most likely, the default is the last account you opened, if not the only one available. For this lab, you’ll be working in the 1500867 – IBM account.
Click on the 1500867 – IBM account in the IBM Cloud’s navigation bar dropdown.
|
1.2 Access RedHat OpenShift cluster
Once you click on 1500867 - IBM, your dashboard will update with Resources that are specific to it. You should see a Resource summary card that currently contains a Resource: Clusters. Click on View all in the Resource summary card.
|
You may recall that in Drone Lab 1, you accessed the mycluster-dal12-b3c.4x16 cluster, using it to deploy your remote drone operations console onto the public cloud. For the purposes of this lab, this mycluster-dal12-b3c.4x16 cluster will be referred to as “Cluster A”.
For most of this lab, you will be working with the droneLabs cluster, which may sometimes be referred to as “Cluster B” or “Lab 2 Cluster” throughout these instructions.
You will notice that there are several other resources located in this list. Grouped in the Cloud Foundry services, you will see resources like DroneLab_Secure Gateway-jv, DroneLab_API Connect-52, and DroneLab_App Connect-68. These will be utilized in later steps throughout this lab.
Cluster B will be used in this lab to demonstrate how services and applications located in a public cloud can communicate with services and applications in a private cloud. For this lab, imagine that Cluster B is private, and you want your application to have the ability to communicate with services located in this separate Cluster B. You will see in later steps why this is, based on the services located in this cluster.
The definitions of public and private cloud are constantly evolving. It used to be defined by location and ownership, but keep in mind that as technologies become more complex, the definitions need to match. Below are some loose definitions to help with understanding the differences between them.
Public cloud - created from resources not owned by the end user that can be redistributed to other tenants.Private cloud - solely dedicated to the end user, usually within the user’s firewall and sometimes on premise.
1.3 Open RedHat OpenShift web console
Let’s examine this cluster’s (droneLabs) overview of the resource.
You will remember from Drone Lab 1 that on the left side is the additional settings menu. In the middle is the summary card for the cluster. On the right side, you’ll see worker nodes/cluster insights. It includes diagnostics and status information about the cluster. All of this provides a summary of the OpenShift instance before you jump in and work directly inside of it.
Click on the OpenShift web console button in the top right to access the console.
|
When you click this button, you may be prompted with an alert saying you need to enable pop-ups. If you get that prompt, enable pop-ups for this site click the OpenShift web console button a second time and wait for the new page to open.
Windows Operating System
Firefox:
https://support.mozilla.org/en-US/kb/pop-blocker-settings-exceptions-troubleshooting
Google Chrome:
https://support.google.com/chrome/answer/95472?co=GENIE.Platform%3DDesktop&hl=en
Mac Operating System
Safari:
https://www.technipages.com/safari-popup-blocker
Firefox:
https://support.mozilla.org/en-US/kb/pop-blocker-settings-exceptions-troubleshooting
Google Chrome:
https://support.google.com/chrome/answer/95472?co=GENIE.Platform%3DDesktop&hl=en
It may take several seconds for this new tab to load completely. The reason for this is that you have moved into a RedHat OpenShift instance. Here you can see which projects and applications are deployed on your cluster.
1) Set your perspective in the left menu by clicking the dropdown and selecting </> Developer (instead of Administrator).
2) Click the dropdown where it says Project (at the top) and make sure "YourLabName-2020-lab-2" is selected.
3) Click Topology on the left menu.
If you see "Restricted Access: You don’t have access to this section due to cluster policy" along with the error details, "deploymentconfigs.apps.openshift.io is forbidden: User “IAM#...” cannot list resource “deploymentconfigs” in API group “apps.openshift.io" in the namespace “default”, make sure to select the developer perspective and that you are in the correct project. Your project should be "YourLabName-2020-lab-2".
If you do NOT see a page similar to the one below, email a screenshot of your page to gscgov@us.ibm.com (link in the top right corner) along with the message, "My Topology view in OpenShift doesn't match the screenshot in Step 1.3.1."
You should see the drone-controller node already located in the topology. As mentioned earlier, imagine this cluster you’re currently in, Cluster B, is GSC-To-Go’s private cluster, where their own applications and services are located. Your Remote Drone Operations Console application, on the totally separate and public Cluster A, wants to communicate and use these services, but the organization wants to make sure this is done properly and securely.
You will recall that your Remote Drone Operations Console had a component to “Connect” to some available drones. In the next several steps, you will learn how this connection can be enabled, starting with the use of Secure Gateway. |
1.4 Setting up the Access Control List (ACL)
In the introduction of this step, you read an analogy made regarding the Secure Gateway Client, acting as an on-prem bouncer, checking who wants access based on their list. This list is significant – it’s referred to as the Access Control List (ACL). You can allow or restrict (deny) access to on-premises resources by making modifications to the ACL. This can be done interactively using the client commands or specifying a file that contains the ACLs you want to have in affect.
ACL enables the Secure Gateway client to access the identified resource (hostname or IP address) in the environment and allows the request from Secure Gateway server. In order to identify the lab drone controller's information, click on the big center icon for the drone-controller node, opening the right side menu.
The Access Control List (ACL) is a not a term specific to IBM Secure Gateway. In fact, in networking, an ACL is one of the most fundamental components of security.
An Access Control Lists “ACL” is a function that watches incoming and outgoing traffic and compares it with a set of defined statements. Access Control Lists “ACLs” are network traffic filters that can control incoming or outgoing traffic. ACLs work on a set of rules that define how to forward or block a packet at the router’s interface. An ACL is the same as a Stateless Firewall, which only restricts, blocks, or allows the packets that are flowing from source to destination.
When you define an ACL on a routing device for a specific interface, all the traffic flowing through will be compared with the ACL statement which will either block it or allow it. The criteria for defining the ACL rules could be the source, the destination, a specific protocol, or more information. ACLs are common in routers or firewalls, but they can also configure them in any device that runs in the network, from hosts, network devices, servers, etc.
Read more about ACLs here: https://www.ittsystems.com/access-control-list-acl
This right side menu lists all the details for the drone-controller node. You will notice that the pod is running, builds, services, and routes. For now, let’s take a look at the service resource, where you can get the drone-controller's route name (hostname) and port#, which has the S icon before it.
Clicking on the drone-controller services opens a full page view, complete with all of its related service details. Take note of the Service Routing on the right side – you will see the Cluster IP address location, along with Service Port Mapping (8080). To make it easier for lab administration, for the next steps you will use the namespace instead of the Cluster IP address. It should be noted that both will work and enable access accordingly.
A Kubernetes namespace provides a mechanism to scope resources in a cluster. In OpenShift, a project is a Kubernetes namespace with additional annotations.
Namespaces provide a unique scope for:
- Named resources to avoid basic naming collisions.
- Delegated management authority to trusted users.
- The ability to limit community resource consumption.
Most objects in the system are scoped by namespace, but some are excepted and have no namespace, including nodes and users. Read more about namespaces here: https://docs.openshift.com/enterprise/3.0/architecture/core_concepts/projects_and_users.html#namespaces.
Under Service Overview, notice the Labels section. One label starts with “route-name=”. The route-name is what you will use for the Access Control List. For your convenience, your route name was generated below for easy access.
OR click on the “Copy to clipboard” button above.
Do NOT paste it anywhere just yet!
What you copied here will be used more than once in this lab. It will be provided to you again in later steps.
When you were provisioned this lab, you were placed in a project group based on the availability of connected secure gateway client connections and destinations at the time based on the associated pricing plan options. our assigned Secure Gateway group number was provided as part of you customized instructions link, which you can view below.
The Secure Gateway Client group number you were assigned is important in navigation to the next project will access. Let’s go to it now by leaving the Service Details page and heading back to the Topology view.
Click on the Project dropdown to select the project where your Secure Gateway Client resides. Keep in mind that this will be different for various lab users depending on the group number you were assigned to in Step 1.4.3. In this example, the instructions lab user was assigned to group #1, so the project they chose was secure-gateway-client1. It is critical that you select the secure-gateway-client project that contains the group # you were assigned – otherwise, you will encounter errors. As a reminder, your Secure Gateway number is ___. (If it says you are unassigned, please send an email to gscgov@us.ibm.com, which you can click in the top right, along with the message, “I do not have a Secure Gateway number assigned”.
Make sure you are in the Topology view. Once you’ve selected your matching project, you’ll notice that a node has already been deployed within this Secure Gateway Client project. Once you click on the node’s Open URL button, located in the top right of it, it will open the route endpoint which contains a friendly user interface for updating the ACL. Click on the Open URL icon (top right corner of the node, see screenshot as reference) to open the endpoint.
|
What you’ve opened in the previous sub-step was the Secure Gateway Client – the bouncer, so to speak. It contains the ability to View Logs, see Connection Info, and most importantly, have a designated Access Control List. Let’s take a look at this list and add the address you copied in Step 1.4.2.
You may have wondered how the Secure Gateway Client was installed into this project, and furthermore you probably noticed that the Secure Gateway Client already has a connection established. These preliminary steps were already done on our behalf as part of your lab user setup – if you are interested in seeing how it was done, watch the short video below.
If you're unable to watch the video above, please go to https://ibm.box.com/s/ojaxqs4f7raue41z2uys7m55nlomd9zh.
The service at the organization level generates a gateway ID and security token, which the Secure Gateway Client adds to establish a connection from the service to the cloud or cluster where the client is running.
For your reference, the Secure Gateway Client was installed on the cluster as a docker container (or on-prem via Linux or Windows installers).
What you’ve opened in the previous sub-step was the Secure Gateway Client – the bouncer, so to speak. It contains the ability to View Logs, see Connection Info, and most importantly, have a designated Access Control List. Let’s take a look at this list and add the address you copied in Step 1.4.2.
Your route name
Copy to clipboard
8080 is the port. Paste your route-name address from Step 1.4.2 into the “Resource Hostname” field under Allow access. Type 8080 into the “Port” field. Then click on the Plus (+) button to add it.
Congratulations! You added your drone-controller route name address to a list of allowed hostnames, which is managed by the Secure Gateway Client. In the next step, you will finally add a destination, which will define how to connect to the resource. |
The main idea of using an ACL is to provide security to your network. Without it, any traffic is either allowed to enter or exit, making it more vulnerable to unwanted and dangerous traffic. To improve security with an ACL you can, for example, deny specific routing updates or provide traffic flow control.
For example, you could have a routing device that has an ACL which is denying access to host A into the one network, and at the same time, it is allowing access to host B in another network, even if there are other hosts in both networks. With an ACL you can filter packets for a single or group of IP addresses or different protocols, such as TCP or UDP. By being picky and controlling access to a very granular level, you can ensure the security of your operations.
Read more about ACL benefits here: https://www.ittsystems.com/access-control-list-acl
1.5 Adding a Secure Gateway destination
Within a Secure Gateway, a destination is a definition of how to connect to a specific on-premises or cloud resource. Once the destination has been created, the Secure Gateway servers will provide it with a unique public endpoint where it will listen for connections while the gateway is connected.
Let’s get started by navigating away from the Access Control List in Step 1.4. You will want to open a new tab and go to the list of Resources within the 1500867 - IBM account. By expanding the Cloud Foundry Services section, you will find the Secure Gateway instance (DroneLab_Secure Gateway-jv) that already exists.
You should see the Secure Gateway Dashboard, which displays the total inbound and outbound traffic along with the option to select gateways that were premade. Based on the group number you were assigned in Step 1.4.3; you will want to select the corresponding gateway that matches your group number.
Once you have selected and accessed your assigned gateway, you will be able to add your destination. This destination is a reference to the address you added to the Access Control List in the previous step. From within your assigned gateway and on the Destinations tab, the Add Destination button will open the Add Destination panel.
For your information, there are two methods for creating your destination: a guided setup that shows how each piece fits into the overall architecture and an advanced setup that provides all fields and options on a single panel. It should be noted that the guided setup does not allow for the configuration of proxy information, server name indicators, reject unauthorized or the upload of a destination-specific cert/key pair. After creation, all fields are available via the Edit Destination panel. This will be addressed in the later sub-steps.
To make it simpler for you, the following series of steps will require the details below:
Note: Some of the dropdowns may be difficult to read, especially if you are not in a full screen view.
To view the steps visually, click through the carousel of images below.
Add Destination:
Where is your resource located? On-Premises (click Next)
What is the host and port of your destination? drone-controller.YourLabName-2020-lab-2.svc.cluster.local, 8080 (click Next)
What protocol will the User/Application use to connect to your destination? HTTPS: Server Side (click Next)
What kind of authentication does your destination enforce? Destination-side(click Next)
If you would like to make your destination private, add IP table rules below: (Change nothing and click Next)
What would you like to name this destination? YourLabName-destination(Do NOT click next)
*** Click on Advanced Setup tab at the top. ***
Resource Authentication: TLS
On-Premises Authentication: Uncheck Reject unauthorized
Then click Add destination.
You should now notice your new destination being displayed in your assigned gateway. Read below about some of the details regarding this destination setup you just completed.
IBM Secure Gateway - Destinations Explained:
Secure Gateway enables the communication between client and destination environment. The destination configuration within Secure Gateway helps to identify the resource in the destination environment and defines the communication protocol between the client resource and the destination resource.
Destinations defined within the Secure Gateway can use HTTP/HTTPS, unencrypted TCP, Transport Layer Security (TLS) server-side, and TLS Mutual Auth. TLS Mutual authentication is an obvious choice for any connections that handle sensitive data transfers, as each side can be sure there is no HTTPS proxy (spyware, or hacker) inspecting the traffic between the server and the client.
To simplify for the purposes of this hands-on drone lab, a containerized drone controller (destination) was deployed within a Red Hat OpenShift cluster (private cloud) and configured to listen to TCP connections without requiring authentication.
To facilitate a secure connection, the Secure Gateway will enable communication with the Remote Drone Operations Console application running in another Red Hat OpenShift cluster (public cloud) using the HTTPS:server-side option. By contrast, if HTTP option had been used, it would not guarantee a secure connection.
Furthermore, by using the TLS authentication option between the Secure Gateway and the destination, browser cross-checking measures can be enabled. Since our drone controller was configured without an authentication mechanism, it is appropriate to deselect the option to "Reject unauthorized".
For reference, the options below provide a brief explanation of the available protocol options for how your application can initiate connections/requests with Secure Gateway.
TCP
No authentication. Your application can communicate directly with the Secure Gateway servers without requiring any certificates.
HTTP
TCP connection where the host header is rewritten to match the on-premises hostname.
No TLS
No authentication is provided. Your application can communicate directly to the gateway without requiring any certificates.
TLS: Server Side
TLS is enabled and the server provides a certificate to prove its authority. You need to accept the server certificate into your application trust-store.
TLS: Mutual Auth
The server provides a set of certificates. However, you also need to upload your own certificate or select auto-generate to automatically create a self-signed certificate/key pair that you can download along with the server certificate.
HTTPS Server-side
TLS: Server Side connection where the host header is rewritten to match the on-premises hostname.
HTTPS: Mutual Auth
TLS: Mutual Auth connection where the host header is rewritten to match the on-premises hostname.
In this Details pop-up, you’ll notice there are two URLs, one for the Cloud Host : Port and one for the Resource Host:Port. The Cloud Host : Port has a URL that will allow you to get access to the information that is private in the GSC-Drones-To-Go service!
Finish Step 1
You have successfully setup Secure Gateway to allow connectivity to the GSC Drones-To-Go controller application running in Cluster B within the simulated private cloud. This exemplifies the process that was used to connect the Remote Drone Operations Console to the on-prem GSC Drones-To-Go resources.
✅ Access RedHat OpenShift cluster
✅ Open RedHat OpenShift web console
✅ Setting up the Access Control List (ACL)
✅ Adding a Secure Gateway destination
In the next steps, you will continue to get more access to the IEL Drone-To-Go service. In Step 2, this access includes getting to work with the service’s APIs and learning more about them.
Step 1 Completed ✅ ☑ Access IBM Cloud ☑ Access RedHat OpenShift cluster ☑ Open RedHat OpenShift web console ☑ Setting up the Access Control List (ACL) ☑ Adding a Secure Gateway destination |
→ |
Step 2 Next ☑ Add a catalog ☑ Work with OpenAPI definitions ☑ Edit and publish API product ☑ Explore and test API |
→ |
Step 3 ☑ Explore sensor database ☑ Set up App Connect flow ☑ Start the API ☑ Try out the flow |
→ |
Step 4 ☑ Recap previous steps ☑ View configurations made for this lab ☑ Explore the drone viewer modal |