In this exercise, you will publish and customize the content in your Developer Portal.
Outcomes
You should be able to:
Publish your Developer Portal.
Create a new user in the Developer Portal.
Create restricted content in the Developer Portal.
Grant select users access to the restricted content.
As the student user on the workstation machine, use the lab command to prepare your system for this exercise.
[student@workstation ~]$ lab start portal-creating
Procedure 5.1. Instructions
Navigate to the Developer Portal.
Log in to RHOCP:
[student@workstation ~]$ oc login \
-u=admin -p=redhat --server=https://api.ocp4.example.com:6443
...output omitted...In a new browser tab, log in to the 3scale tenant Admin Portal as the admin user.
Execute the following command to see the ADMIN_PASSWORD:
[student@workstation ~]$ oc get secret system-seed -n 3scale \
-o json | jq -r .data.ADMIN_PASSWORD | base64 -d; echo
...output omitted...Click , select , and click .
Click and select . Then, in the left side menu, click .
Create a new Developer Portal user.
Click .
Provide the following details:
Organization/group name: GLS
Username: portal-user
Email: gls@redhat.com
Password: redhat
Password confirmation: redhat
Then, click .
In the Admin Portal, click .
Then, click to enable the portal-user account.
Explore the created user.
Click the GLS link.
Note that the registration created an application for the user.
Click the GLS's App link.
Note that the user uses the Basic application plan, and has access to the API product.
Create a restricted page on the Developer Portal.
Click . Then, click the arrow next to and select .
Enter the following details:
Title: Restricted section
Public: unchecked
Then, click .
Then, click the arrow next to and select .
Enter the following details:
Title: Restricted page
Section: Restricted section
Path: /restricted
Enter <h1>Welcome to the Restricted Section</h1> as the HTML content of the page.
Then, click and .
Verify that the /restricted page is not visible.
Open a new browser window in an incognito mode, for example by pressing ctrl+shift+n in Firefox.
If you visit the restricted section when logged in to the Admin Portal then you will see the content. You must either log out of the Admin Portal, open a different browser, or open a new browser window in the incognito mode.
Navigate to https://3scale.apps.ocp4.example.com/restricted.
You are presented with a Not found error screen.
Allow the portal-user user to view the restricted content.
In the Admin Portal, click .
Click and provide the following details:
Name: privileged
Then, click .
Click .
Then, select the Restricted section and click .
There is currently a bug that prevents selected sections from being properly assigned to a group. You must open the group, select the section, and then update the group.
Click . Then, click .
Click .
Then, select the privileged group and click .
Verify that the portal-user can view the restricted content.
Navigate to https://3scale.apps.ocp4.example.com/ and log in as the portal-user with the redhat password.
Navigate to https://3scale.apps.ocp4.example.com/restricted.
You are presented with the content.
This concludes the guided exercise.