Skip to content

Commit

Permalink
HOL 17, 18 (#146)
Browse files Browse the repository at this point in the history
* Updated till Task 4

* HOL 10 final update

* Hands on lab 11 - Upgraded to 23.1

* HOL 12 updated to 23.1 + Updated acknowledgements for HOLs 10 & 11

* Updated HOL 13 to APEX 23.1

* Updated HOL 14 to APEX 23.1

* Updated acknowledgements

* Oracle APEX Workflow Lab WMS ID: 11525

Oracle APEX Workflow Lab

* APEX Workflow Lab WMS ID: 11525

* Workflow Lab Updates to Images

* APEX Workflow Lab updated

* APEX Workflows Lab - Removed unnecessary images

* APEX Workflows Lab updated after QA

* Manifest File Updated

* APEX Workflow LiveLab Feedback Fixes

* APEX Workflows Lab Feedback Fixes

* HOL1-5 Updates

* Update 2-hands-on-lab-01.md

* Update 4-creating-db-objects-quickSQL.md

* Update creating-order-page.md

* HOL 6 Updated

* HOL 7 Update WMS ID : 11155

* Delete Screenshot 2023-10-12 at 1.01.01 AM.png

* Update manifest.json

* HOL 8

* HOL-9 WMS ID: 11157

* HOL-10 WMS ID : 11158

* HOL 11, 12

* Deleted unwanted files

* HOL 13, 14

* Delete Screenshot 2023-10-29 at 11.01.47 PM.png

* HOL 15, 16

* HOL 17, 18

---------

Co-authored-by: Hope Fisher <[email protected]>
  • Loading branch information
tomohamm and hope-fisher authored Feb 14, 2024
1 parent 8a33262 commit 43726f0
Show file tree
Hide file tree
Showing 82 changed files with 240 additions and 217 deletions.
Binary file modified apex-professional-hol17/images/click-create.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apex-professional-hol17/images/click-create2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apex-professional-hol17/images/click-run.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apex-professional-hol17/images/create-auth1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apex-professional-hol17/images/create-auth2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apex-professional-hol17/images/create-auth3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apex-professional-hol17/images/create-auth4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apex-professional-hol17/images/create-auth5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apex-professional-hol17/images/create-creds.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apex-professional-hol17/images/create-creds1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apex-professional-hol17/images/create-web-cred1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apex-professional-hol17/images/creds-created.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apex-professional-hol17/images/external.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apex-professional-hol17/images/google-login1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apex-professional-hol17/images/navigate-to-osa.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apex-professional-hol17/images/new-project1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apex-professional-hol17/images/scopes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apex-professional-hol17/images/select-authentication.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apex-professional-hol17/images/select-shared-components.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apex-professional-hol17/images/select-web-credentials.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apex-professional-hol17/images/select-workspace-utilities.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apex-professional-hol17/images/summary.png
Binary file added apex-professional-hol17/images/test-users.png
223 changes: 90 additions & 133 deletions apex-professional-hol17/implementing-security-inapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,81 +4,106 @@

Application security is very important for the majority of applications. You must ensure that users enter valid credentials. Generally, username and password (Authentication) and the logged-in user has appropriate rights within the application (Authorization).


Estimated Time: 20 minutes

### Downloads

- Did you miss out on trying the previous labs? Don’t worry! You can download the application from **[here](files/online-shopping-cart-10.sql)** and import it into your workspace. To run the app, please run the steps described in **[Get Started with Oracle APEX](https://apexapps.oracle.com/pls/apex/r/dbpm/livelabs/run-workshop?p210_wid=3509)** and **[Using SQL Workshop](https://apexapps.oracle.com/pls/apex/r/dbpm/livelabs/run-workshop?p210_wid=3524)** workshops.
- Did you miss out on trying the previous labs? Don't worry! You can download the application from **[here](files/online-shopping-cart-10.sql)** and import it into your workspace. To run the app, please run the steps described in **[Get Started with Oracle APEX](https://apexapps.oracle.com/pls/apex/r/dbpm/livelabs/run-workshop?p210_wid=3509)** and **[Using SQL Workshop](https://apexapps.oracle.com/pls/apex/r/dbpm/livelabs/run-workshop?p210_wid=3524)** workshops.

## Task 1: Implement Social Sign In(Google) Authentication in Online Shopping Application.

You create a Social Sign-in authentication scheme in this hands-on lab to enable Google Authentication.

1. Log in to Google's developer [console](https://console.developers.google.com).

*Note: If you are logging in to the Google developer console for the first time, you must check and click on AGREE AND CONTINUE*

2. Click Create Project.

![Click My Apps](images/create-project1.png " ")

3. In the New Project Screen, For Project Name: Enter **APEX Social SignIn** and Click **Create**.

![Click My Apps](images/new-project1.png " ")

4. Click the OAuth consent screen (from the left side menu), Select **External**, and Click **Create**

![Click My Apps](images/external.png " ")

5. In the OAuth consent screen, Enter the following:

Under **App Information** Section:

- For Application name: Enter your **Application Name**

## Task 1: Implement Social Sign In(Facebook) Authentication in Online Shopping Cart Application.
- For User support email: Enter your **Email Address**

In this hands-on lab, you create a Social Sign-in authentication scheme to enable Facebook Authentication. You test the authentication scheme.
Under **App Domain** Section:

1. Log in to Facebook’s developer [console](https://developers.facebook.com/). Login to the Meta for Developers using your **Facebook Credentials** and then select **My Apps**.
- For Application Homepage link: Enter your **Application Homepage link**

![Click My Apps](images/click-myapps.png " ")
Under **Authorized domains** Section:

*Note: If you are logging in to the Facebook developer console for the first time, you must follow the below process before navigating to My Apps*
- Click **+ADD DOMAIN** and add your Authorized domain. For example, I added oracle.com

- *A new user must first click the Get Started link to Create a Facebook for Developers account.*
- *This then brings you to a welcome screen that gives you the option to Continue. Click Continue.*
- *Review your email and agree or not to the marketing-related communication from Facebook.*
- *Choose an option for who you are. Example, developer, product manager, etc.*
Under **Developer contact information** Section:

2. Click **Create App**.
- For Email addresses: Enter your **Email Address**

![Click Create App](images/create-app.png " ")
![Click My Apps](images/oauth-consent-screen.png " ")

3. Under **Select an app type**, Select **Business** and then click **Next**.
![Click My Apps](images/oauth-consent-screen1.png " ")

![Select type as Business](images/create-app1.png " ")
Click **Save and Continue**.

4. Now, Under **Provide Basic Information**, enter the following and click **Create App**.
- For **Display Name**, enter **APEX Authentication**
- For **App contact email**, enter **Your email address**.
6. In Scopes, leave everything as default and Click **Save and Continue**.

![Click Create App](images/create-app3.png " ")
![Click My Apps](images/scopes.png " ")

5. You will now verify your Facebook account by **Re-entering** your password.
7. In Test users, leave everything as default and Click **Save and Continue**.

![Verify your account](images/verify-your-account1.png " ")
![Click My Apps](images/test-users.png " ")

6. Navigate to **Settings** and then select **Basic**. There, you can see the App ID and App Secret. Copy the **App ID** and **App secret** and paste them into your Notepad. It will be used to create the **web credential** in your **APEX application** later.
8. Click **Credentials** (from left side menu). Now Click **+Create Credentials** and select **OAuth client ID**.

![Copy credentials](images/copy-credentials.png " ")
![Click My Apps](images/create-creds.png " ")

7. In the **Left Navigation Menu**, click on **Add Product**.
9. Enter the following:

![Add Product](images/add_product.png " ")
- For Application type: Select **Web Application**

8. Under **Add products to your app**, select **Set up** in **Facebook Login** card.
- For Name: Enter **APEX Social Authentication**

![Select Facebook](images/select-facebook.png " ")
Under Authorized redirect URLs, Click **+Add URl**

9. Navigate to **Settings** under **Facebook Login** in the navigation menu. You have to enable Client OAuth Login and add https://apex.oracle.com/pls/apex/apex_authentication.callback (If you are using apex.oracle.com) Valid OAuth Redirect URIs. Then click on **Save Changes**.
- For URls 1: Enter https://apex.oracle.com/pls/apex/apex_authentication.callback

![Click on Save changes](images/apex-callback.png " ")
Click **Create**.

10. Login to your APEX workspace and click **Workspace Utilities**.
![Click My Apps](images/create-creds1.png " ")

10. You will get the Client ID and Client secret. Save these IDs. We will use them later.

![Click My Apps](images/creds-created.png " ")

11. Login to your APEX workspace and click **Workspace Utilities**.

![Select Workspace utilities](images/select-workspace-utilities.png " ")

11. Under **Workspace Utilities**, Select **Web Credentials**.
12. Under **Workspace Utilities**, Select **Web Credentials**.

![Select Web Credentials](images/select-web-credentials.png " ")

12. Click **Create**.
13. Click **Create**.

![Click Create](images/click-create.png " ")

13. In the **Web Credentials** enter the following and click **Create**.
14. In the **Web Credentials** enter the following and click **Create**.
Under **Attributes**:
- For **Name**, Enter **FB\_LOGIN\_DEMO**
- For **Static Identifier**, Enter **FB\_LOGIN\_DEMO**
- For **Authentication Type**, select **OAuth2 Client Credentials Flow**.
- For **Client ID or Username**, Enter the **APP ID** you copied in **Step 6**.
- For **Client Secret or Password** and **Verify Client Secret or Password**, Enter the **App Secret** you copied in **Step 6**.
- For Name: Enter **Google SignIn**
- For Authentication Type: sSelect **OAuth2 Client Credentials Flow**.
- For Client ID or Username: Enter the **Client ID** you copied in **Step 10**.
- For Client Secret or Password and Verify Client Secret or Password: Enter the **App Secret** you copied in **Step 10**.

![Define Web Credentials](images/create-web-cred1.png " ")

Expand All @@ -102,123 +127,55 @@ Estimated Time: 20 minutes

![Create Authentication Scheme](images/create-auth1.png " ")

19. In the **Authentication Scheme** enter the following and click **Create Authentication Scheme**.
19. In the **Authentication Scheme**, Enter the following:
Under **Name**:
- For **Name**, Enter **FB Authentication**.
- For **Name**, Enter **Google Authentication**.
- For **Scheme Type**, select **Social Sign-In**.

Under **Settings**:
- For **Credential Store**, Enter **FB\_LOGIN\_DEMO**.
- For **Authentication Provider**, select **Facebook**.
- For **Scope**, Enter **email**.
- For **Username**, Enter **name**.
- For Credential Store: Enter **Google SignIn**.
- For Authentication Provider: Select **Google**.
- For Scope: Enter **profile,email**.
- For Username: Enter **name**.
- Additional User Attributes: Enter **email, name**

Click **Create Authentication Scheme**

![Define Authentication](images/create-auth2.png " ")

20. Notice that a new **Authentication Scheme** you created is displayed as **FB Authentication - Current**.
20. Notice that a new **Authentication Scheme** you created is displayed. Click **Google Authentication** to make it a current authentication.

![Authentication scheme displayed](images/create-auth3.png " ")

21. Run the application by navigating to **Online Shopping Application** and click **Run**.

22. In the **User Interface**, click **Administration**.

![Click Administration](images/run-app2.png " ")

23. Now, log in to the application using your **Facebook Credentials**.

![Login into Facebook](images/fb-login1.png " ")

24. You are now logged in to the **Online Shopping Application**. Check the user name on the top right of the **Navigation Bar**.

![Check username on the top of the Navigation Bar](images/run-app3.png " ")

## Task 2: Creating and Using an Authorization Scheme
21. Click **Make as Current** and then Click **Ok**.

In this task, you create an **Authorization Scheme** to ensure only people entered as Team Members can log into the **Online Shopping Application**. You apply the authorization scheme to the application properties.
![Authentication scheme displayed](images/create-auth4.png " ")

1. Navigate to App Builder and select **Online Shopping Application**.
![Authentication scheme displayed](images/create-auth5.png " ")

![Select Online shopping application](images/navigate-to-osp.png " ")
22. Click **Run**.

2. In the application home page, click **Shared Components**.
![Authentication scheme displayed](images/click-run.png " ")

![Navigate to Shared components](images/bavigate-to-sc.png " ")
23. In the **User Interface**, click **Administration**.

3. Under Shared Components > Security, click **Application Access Control**.

![Navigate to Application access control](images/click-access-control.png " ")

4. Under **Roles**, Select **Add Role**.

![Select Add role under roles](images/add-role.png " ")

5. In the **Role** Page, enter the following and click **Create Role**.
- For **Name**, Enter **Administrator**
- For **Static Identifier**, select **ADMINISTRATOR**

![Define name and static identifier](images/add-role1.png " ")

6. In the **User Role Assignments**, Click **Add User Role Assignment**.

![Add User Role Assignment](images/assign-user1.png " ")

7. In the **User Assignment** Page, enter the following and click **Create Assignment**.
- For **User Name**, Enter **AUTHORIZED USER**.
- For **Application Role**, Check **ADMINISTRATOR** to **Yes**.

![Create Assignment](images/assign-user2.png " ")

8. Navigate back to **Shared Components** and then select **Authorization Schemes**.

![Select shared components](images/select-sc.png " ")

![Select Authorization Schemes](images/select-authorization.png " ")

9. Under **Authorization Scheme**, Click **Create**.

![Click Create](images/click-create11.png " ")

10. For **Create Authorization Scheme**, Leave the settings to default and then click **Next**.

![Create Authorization Scheme](images/click-create12.png " ")

11. In the **Details** section of Create Authorization Scheme, enter the following and click **Create Authorization Scheme**.
- For **Name**, Enter **Admin**.
- For **Scheme Type**, Select **Is In Role or Group**.
- For **Type**, select **Application Role**
- For **Name(s)**, Select **Administrator**.
- For **Identify error message displayed**, enter **You are not Authorized to view this.**

![Define Authorization scheme](images/create-authorization1.png " ")

12. Navigate to **Shared Components** and then under **Security**, Select **Security Attributes**.

![Navigate to Shared Components](images/navigate-to-sc1.png " ")

![Navigate to Security Attributes](images/navigate-to-sa.png " ")

13. In the **Edit Security Attributes** Page, under **Authorization**, select **Admin** for **Authorization Scheme**. Click **Apply Changes**.

![Select Admin for authorization scheme](images/select-authorization-scheme.png " ")
![Click Administration](images/run-app2.png " ")

14. Navigate to the runtime environment (tab or window). Click Sign Out in the navigation bar (top right).
24. Log in to the application using your **Google Credentials**.

15. Run the application by navigating to **Online Shopping Application** and click Run. In the User Interface, click **Administration**.
![Login into Facebook](images/google-login1.png " ")

![Click Administration](images/login1.png " ")
25. You are now logged in to the **Online Shopping Application**. Check the user name on the top right of the **Navigation Bar**.

16. Since your name is not **Authorized User**, verify the access denied message is displayed.
![Check username on the top of the Navigation Bar](images/run-app3.png " ")

![Not Authorised to view](images/login2.png " ")

## Summary
You now know how to create a Social Sign-in authentication scheme to enable Facebook Authentication

You may now **proceed to the next lab**.
You now know how to create a Social Sign-in authentication scheme to enable Google Authentication. You may now **proceed to the next lab**.

## Acknowledgments
## What's Next
In the next hands-on lab, you will learn to create and customize a Calendar page, a Tree page and a Map page with a custom background.

- **Author** - Roopesh Thokala, Product Manager
- **Contributor** - Ankita Beri, Product Manager
- **Last Updated By/Date** - Roopesh Thokala, Product Manager, May 2023
## Acknowledgements
- **Author** - Ankita Beri, Product Manager
- **Last Updated By/Date** - Ankita Beri, Product Manager, January 2024
11 changes: 5 additions & 6 deletions apex-professional-hol17/introduction.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
# Introduction

## **What is APEX?**
Oracle APEX is a feature of Oracle Database, including the Autonomous Data Warehouse (ADW) and Autonomous Transaction Processing (ATP), Autonomous JSON Database (JSON), and APEX Application Development (APEX) services. Oracle APEX is a low-code development environment with various features and tools where you can create an application fast. In the future, rather than emailing spreadsheets around to gather information, you will know how to easily create an app in minutes using APEX and email the URL instead. The result will be a secure, scalable, multi-user app that provides a single source-of-truth for your data!
Oracle APEX is a feature of Oracle Database, including the Autonomous Data Warehouse (ADW) and Autonomous Transaction Processing (ATP), Autonomous JSON Database (JSON), and APEX Application Development (APEX) services. Oracle APEX is a low-code development environment with various features and tools where you can create an application fast. In the future, rather than emailing spreadsheets to gather information, you will know how to easily create an app in minutes using APEX and email the URL instead. The result will be a secure, scalable, multi-user app that provides a single source-of-truth for your data!


Application security is very important for the majority of applications. You must ensure that users enter valid credentials, generally username and password (Authentication), and that the logged-in user has appropriate rights within the application (Authorization).

*Note: This workshop assumes you are using Oracle APEX 22.2.*
### Recap
During the last workshop, you activated the Remote Database Schema. Moreover, you incorporated application data from a REST Data Source and successfully synchronized it with another application utilizing REST Data Sources. Furthermore, you gained expertise in crafting Data Load definitions and creating a Data Loading page.

Estimated Time: 20 minutes


### Objectives

* Implement Social Sign-In in your application.
* Create and Use Authorization Schemes.

*Note: This workshop assumes you are using Oracle APEX 23.2.*

## Learn More - *Useful Links*

- [APEX on Autonomous](https://apex.oracle.com/autonomous)
Expand Down
Loading

0 comments on commit 43726f0

Please sign in to comment.