Skip to content
Weißes virtual7-Logo auf grünem Hintergrund mit stilisierter Sieben im Hintergrund.

Oracle Apex

Tech Services

Technology

Oracle APEX 5.1 – Custom Authentication for LDAP and APEX users

admin@alpha-alpaka.de

Copy Link

Link copied

The case story for my project implied creating a custom authentication method, which incorporates LDAP and APEX users. Firstly, it verifies if the user can connect to LDAP. If this authentication fails, then there is a second verification taking place, which checks if the user can authenticate with APEX directly. If at least one of them succeeds, then the user is allowed to access the application. However, if both of them fail, then no access is given.

I’ve started by implementing the LDAP authentication in PL/SQL. You can check the following article for more details on how this is achieved: https://oracle-base.com/articles/misc/oracle-application-express-apex-ldap-authentication

By using this, the first part of the task is complete (I can verify if the user can connect to LDAP). The next task implied checking if the user can connect to APEX directly. Therefore, I’ve researched the APEX_UTIL package for more information. I’ve found out that there is a function called ‘IS_LOGIN_PASSWORD_VALID’, which returns a Boolean result based on the validity of the credentials of the current workspace. This is exactly what I’ve required for the second part of the case story. There is more information in the following link: https://docs.oracle.com/cd/E71588_01/AEAPI/IS_LOGIN_PASSWORD_VALID-Function.htm#AEAPI154

The final step implies putting together all the parts to create a custom authentication method. For this, we will need to go to ‘Shared Components’ > ‘Authentication Schemes’ and click on ‘Create >’. For the first setting, we’ll leave the default one active (‘Based on a pre-configured scheme from the gallery’) and click on ‘Next >’. My custom authentication scheme contains the following settings:

Screenshot of an Oracle APEX 5.1 custom authentication scheme configuration using PL/SQL for LDAP and APEX user validation.

Finally, you just need to click on ‘Create Authentication Scheme’ and the case story is complete.
Good luck coding!


Custom Authentication
LDAP
Oracle APEX

Warning: file_exists(): open_basedir restriction in effect. File(action-scheduler-en_US.mo) is not within the allowed path(s): (/var/www/vhosts/digitalewege.de/:/tmp/) in /var/www/vhosts/digitalewege.de/v7-stage.digitalewege.de/virtual7de_alphaalpaka_2024/web/app/plugins/wpml-string-translation/classes/MO/Hooks/LoadTranslationFile.php on line 82

Warning: file_exists(): open_basedir restriction in effect. File(action-scheduler-en_US.l10n.php) is not within the allowed path(s): (/var/www/vhosts/digitalewege.de/:/tmp/) in /var/www/vhosts/digitalewege.de/v7-stage.digitalewege.de/virtual7de_alphaalpaka_2024/web/app/plugins/wpml-string-translation/classes/MO/Hooks/LoadTranslationFile.php on line 85

Warning: realpath(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/var/www/vhosts/digitalewege.de/:/tmp/) in /var/www/vhosts/digitalewege.de/v7-stage.digitalewege.de/virtual7de_alphaalpaka_2024/web/wp/wp-includes/l10n/class-wp-translation-controller.php on line 106