In this blog I want to discuss about an interesting usecase that showcases how IDCS Appgate can be used to enable SSO security for legacy applications when migrating to the cloud. Many customers who are looking to migrate their workloads into the cloud find that they have legacy systems in their portfolio that are not necessarily amenable to modernisation.
An example of one of these legacy systems is Oracle Discoverer. Oracle BI Discoverer is a business intelligence tool for analyzing data and is a key component of Oracle Fusion Middleware. Discoverer provides an integrated business intelligence solution that comprises intuitive ad-hoc query, reporting, analysis, and Web-publishing functionality. Some EBS customers will also have Oracle BI Discoverer in the mix; and if they’re looking to migrate to the cloud they will face the challenge of how to bring these applications together under an IDCS-based SSO umbrella.
Most probably if the customer is migrating EBS to OCI, then the chances are that they will be using Oracle EBS Asserter. A bit of an explanation about EBS Asserter. EBS asserter is an Oracle product that allows OOB integrate with IDCS SSO. It’s a weblogic gateway that intercepts inbound requests and authenticates them with IDCS using Openidc and then creates and maps a session in EBS using API calls.
Now. How does Discoverer fit into this new landscape in the cloud? It might be a good idea to understand how Discoverer does SSO security on-prem to understand how we can translate that setup into the cloud. In the on premise setup Discoverer offers two options:
Local Authentication: logs the user in directly using u/p credentials, or
When logging in the user directly, Discoverer prsents a login screen to the user and then matches the username and password against the <<EBS.USER>> table in EBS. If a user record is found with matching username and password then the user is authenticated and logged in.
Below is the a screen shot showing the Discoverer viewer landing page. User is prompted for both username and password since there is no SSO.
In the SSO case, an apache MOD_OSSO security gateway running in apache is used to intercept the incoming requests and redirect to Oracle Access Manager for user authentication, after which user GUID is fetched back from Oracle Unified Directory (OUD). MOD_OSSO then forwards the GUID header to Discoverer. The Discoverer application (which is nothing but a servlet running in a weblogic server) will intercept the inbound request and extract the GUID header and create a session and then present a login screen (yes a login screen!) to the user which has to then type in their username (no need for password: remember the user is authenticated and MOD-OSSO WOULDN’T have passed a GUID header onto Discoverer if the user hadn’t been already authenticated). After the user enters the username in the Login screen, Discoverer will then match the GUID AND the username against the records in the <<EBS.USER>> table. All users in OAM will be pre-provisioned in EBS user table along with their GUIDs. If Discoverer matches the username and GUID against a record in the database then user will be logged in and a Discoverer session created.
Below is the a screen shot showing the Discoverer viewer landing page post SSO. Notice that there is no prompt for the user password.
Now let’s see how in the light of the mechanism above we can translate this into OCI. Note that in OCI we’re using IDCS, which is Oracle's cloud-native Identity Management Service designed to be an integral part of the enterprise security fabric
In the diagram below we illustrate this flow.
User points user agent (browser) at APPGATE reverse proxy url (https://<public domain url>/discoverer/viewer)
APPGATE checks that user has a valid session, and if not triggers a SAML flow against IDCS.
IDCS (if federated with an external IDP) will in turn send SAML request to the external IDP.
SAML response received from external IDP.
IDCS concludes federated SAML flow by sending the SAML response back to APPGATE.
APPGATE processes the SAML response from IDCS, and maps and injects the custom headers (most importantly the GUID header), and redirects back to Discoverer landing page.
Discoverer creates a server-side session with GUID value as key; the User is then re-promted for the Username only (no password required).
Discoverer searches for user in the <<EBS.USER>> table and finds a match using (Username + GUID). User is now LOGGED in to Discoverer.
Discoverer connects to the EUL (end-user layer) in the database and executes BI reports.
Here is an outline of the steps you need to Setup Discoverer SSO in OCI (assuming EBS is secured by EBS asserter):
Download the APPGATE appliance.
Create an APPGATE appliance Custom Image in OCI.
Instantaite an APPGATE instance in OCI.
Setup APPGATE and configure integration with the IDCS instance This basically sets up APPGATE as a trusted client and allows it to invoke IDCS APIs and manage and create IDCS appilcations. (This step is the same step explained in more detail in the APGGATE documentation).
Switch off the OHS instance in the Discoverer domain.
Use: <opmnctl stopall> command in the Discoverer weblogic domain.
This OHS instance is no longer needed as it will be replaced with APPGATE.
Specify the Public Domain URL for the Discoverer application.
Specify the Protected Web Resource URL. This is the URL of the Managed Weblogic server that is running the Discoverer application.
Specify the following Post Login URL: https://<public domain url>/discoverer/viewer?connectionAccessType=APPS&eulName=eul_us. This is the URL that APPGATE will redirect the browser to post login.
These are the custom headers required:
Name: Osso-User-Guid, Value: spgw-username (This is a dynamic header using this IDP datasource).
Name: Proxy-Remote-User, Value: spgw_username (This is a dynamic header using this IDP datasource).
Name: WL-Proxy-SSL, Value: false (This is a static header).
Name: Proxy-Auth-Type, Value: Osso SSO (This is a static header).
Following the creation of the Header-based Application in APPGATE, APPGATE will then connect into IDCS as a trusted client and create a NEW SAML application using the same application name. This is the SAML application that will be used by APPGATE when SSO authenticating the inbound requests coming in for Discoverer. NOTE: You will need to go into IDCS and make sure that your Discoverer users in IDCS are assigned to this newly created SAML application. Otherwise IDCS will not authorise SAML access.
Configure Substitution Rules for content URL rewrites in the response will be required. They are as follows:
Switch on SSO in DISCOVERER.
The Discoverer configuration settings can be found in the following file:
Make sure you set the enableAppsSSOConnection switch to true in the following fragment:
... userDefinedConnections="true" laf="dc_blaf" switchWorksheetBehavior="prompt" defaultLocale="en" disableBrowserCaching="false" enableAppsSSOConnection="true" propagteGUIDtoVPD="false" pageNavigation="true">
Configure the certificate for Public Domain URL in APPGATE.
For this you'll have to login into the management console (ssh into the APPGATE VM) and then bring up the Services menu and then:
Press 6 on the NGINX menu to update an SSL certificate.
Review the certification format requirements, and press Enter to continue.
Enter the domain name, and press Enter.
Follow the directions, and press Enter when you are prepared to insert your certificate file.
Enter the new SSL certificate information, and press Esc when you are finished.
Type :wq and press Enter to close the window. After the certificate is validated, review and press Enter to return to the Services menu.
Populate GUID column in EBS with IDP UserIds or whatever unique values you've chosen to use (as long as they're mappable to SAML response custom attributes coming from you IDP). This population step will require you manually execute a script agains the <<EBS.USERS>> table. It can be automated to populate automatically whenever a user is provisioned in IDCS/EBS. This will be discussed in a future blog.