APEX_LDAP vs DBMS_LDAP and authorization schemas in the APEX.

I also posted this in the Oracle support community, so please forgive me if you've seen it twice now.

Grrr... This is the second time I'm trying this post. New communities here seem to have a strange way of not displayed properly.

My hair is going gray and I may soon be bald. I can't seem to work around a problem with APEX_LDAP and I can't seem to understand DBMS_LDAP. It seems that APEX_LDAP is written to be easier to use, but DBMS_LDAP is older and less refined.

Here's some code that I'm trying to use to a system of authorisation. This works, but only partially. It works for our entrepreneurs but not employees. Even if all of our users use the same format for their login name, they not stored with the same information for their DN in our OID. Now, because DBMS_LDAP has this property called filter, which can be used to target with the property to use when searching LDAP, can I use it to target the field UID instead of the NC and so all our users can use our OID for authentication. However, given that the APEX_LDAP package is that same property filter, my code breaks and I can't see a way around it.

What I need is an example of code that would remove a property by the Protocol LDAP using DBMS_LDAP and store in a variable I could call a little later on the name of the user to the APEX_LDAP.IS_MEMBER function. What I want in the end, it's for Oracle to add the filter for the various functions of the APEX_LDAP property.

-Start the block of Code-

DECLARE

L_TEST wwv_flow_global.vc_arr2;

L_TEST_VALUES wwv_flow_global.vc_arr2;

L_ATTRIBUTES wwv_flow_global.vc_arr2;

L_ATTRIBUTE_VALUES wwv_flow_global.vc_arr2;

L_CON_ATTRIBUTES wwv_flow_global.vc_arr2;

L_CON_ATTRIBUTE_VALUES wwv_flow_global.vc_arr2;

L_AUTH boolean;

L_VAL boolean;

L_WORKFORCEID NUMBER (8);

L_WORKFORCEID2 VARCHAR2 (21);

BEGIN

L_TEST (1): = "employeetype"

APEX_LDAP. () GET_USER_ATTRIBUTES

p_username = > V ('APP_USER').

p_pass = > NULL,

p_auth_base = > ' cn = users, dc = company, dc = com ",

p_host = > "servername."

p_port = > '389',.

p_attributes = > L_TEST,

p_attribute_values = > L_TEST_VALUES);

IF L_TEST_VALUES (1) = 'E' THEN

L_ATTRIBUTES (1): = "workforceid";

APEX_LDAP. () GET_USER_ATTRIBUTES

p_username = > V ('APP_USER').

p_pass = > NULL,

p_auth_base = > ' cn = users, dc = company, dc = com ",

p_host = > "servername."

p_port = > '389',.

p_attributes = > L_ATTRIBUTES,

p_attribute_values = > L_ATTRIBUTE_VALUES);

L_WORKFORCEID: = (L_ATTRIBUTE_VALUES (1));

L_WORKFORCEID2: = TO_CHAR (L_WORKFORCEID, ' 00000000');

L_AUTH: = APEX_LDAP.IS_MEMBER)

p_username = > (L_WORKFORCEID2).

p_pass = > NULL,

p_auth_base = > ' cn = users, dc = company, dc = com ",

p_host = > "servername."

p_port = > 389,

p_use_ssl = > 'n',.

p_group = > "BlahBlah_Test_Group"

p_group_base = > ' cn = Test, cn = groups, dc = company, dc = com ");"

ON THE OTHER

L_CON_ATTRIBUTES (1): = 'UID ';

APEX_LDAP. () GET_USER_ATTRIBUTES

p_username = > V ('APP_USER').

p_pass = > NULL,

p_auth_base = > ' cn = users, dc = company, dc = com ",

p_host = > "servername."

p_port = > '389',.

p_attributes = > L_CON_ATTRIBUTES,

p_attribute_values = > L_CON_ATTRIBUTE_VALUES);

L_AUTH: = APEX_LDAP.IS_MEMBER)

p_username = > (L_CON_ATTRIBUTE_VALUES (1)).

p_pass = > NULL,

p_auth_base = > ' cn = users, dc = company, dc = com ",

p_host = > "servername."

p_port = > 389,

p_use_ssl = > 'n',.

p_group = > "BlahBlah_Test_Group"

p_group_base = > ' cn = Test, cn = groups, dc = company, dc = com ");"

END IF;

IF L_AUTH = FALSE

THEN

L_VAL: = FALSE;

ON THE OTHER

L_VAL: = TRUE;

END IF;

IF L_VAL = TRUE THEN

HTP.p ('SUCCESS');

ON THE OTHER

HTP.p ("I go YOU BANKRUPT");

END IF;

END;

-End Code block-

Any help would be appreciated.

R. otto R. Wessels

Hi Otto.

Christian means something like the code I've used here: {message identifier: = 10197833}
You would need to adapt this code of course. Basically: bind, retrieve values, set values in an application (or elements). Then, create the authorisation schemes that test the values in these application elements.

Tags: Database

Similar Questions

  • Cannot authenticate because the authorization scheme limits the login page (101)

    Hello.

    I have a problem with authentication. I have an application with authentication and authorization schemas created from scratch. There is an option in the security attributes of the application that lets you apply a pattern of authorization for the entire application. I also have a login page (101) that I use for authentication purposes that I don't get, since approval is the application level. Even if the login page is established a system of authorisation that always succeeds APEX makes no difference. How do I approach this issue so that authorization for the entire application is always possible with authentication?

    Thank you.

    I'm not sure that it would necessarily change in the future because so many things in one schema authorization should be defined by the developer that it's probably wise for Oracle make Apex still do not know the application of the law on the login page. Although I can't think of a realistic example for now, maybe there could be reasons were based on external criteria that even the login page should not be available to a small group of people? I wouldn't exclude it as a possibility.

    That's why when you implement a system of authorisation, it is probably best that Oracle makes no assumptions about what you want to do and you just explicitly it you include in the plan.

    By dig a little and in defensive coding and style, you might not even want to consult directly the "101" page. May be wise to do a ' select PAGE_FUNCTION in the APEX_APPLICATION_PAGES where PAGE_ID =: APP_PAGE_ID and APPLICATION_ID =: APP_ID. If PAGE_FUNCTION comes back as "Login", then this is your login page and return TRUE. Otherwise, continue with some other logical returns boolean you have to leave. This way you stay clear page to hardcode and even independent of both page alias value (because they are not mandatory).

  • Is it possible to have the source and target schema in the same instance of DB?

    Hi all

    I'm using Oracle 11 g 1 material.
    I spent another source than with OWB server locations.
    In the course of deploy I get VLD-3064 and I can't deploy mapping due to the many warnings "table or view does not exist.

    Is it possible to have the source and target schemas in the same case?
    How to do?

    Kind regards
    Martin

    Hi Martin!

    1. the target schema have select rights for source-tables/views.
    (Run as a user with dba rights: grant select on to ;).

    2 «.. . none generated code will use the link dataabase...'.
    This is only a warning and means there is no need to use a database link. If your mapping will be executed faster as using a database link.

    error of VLD 3064

    Greetings
    Guenther Herzog

  • Authentication and authorization JPSUserProvider at the University Complutense of MADRID 11g

    Hello

    Can someone direct me on where I can find more information on JPSUserProvider. Documentation of the Complutense University of MADRID just mentions that JPSUserProvider is configured in the UCM by default and used for authentication, the authorization. In another document that it is mentioned that UCM 11 g has nothing to do with the authentication of the user, all the authentication will be supported by Weblogic and SSO must be configured against weblogic. If SSO is configured and an external LDAP is used as a user store in weblogic, I need to make changes to the AAU? I want to know the role JSPUserProvider plays in the University Complutense of MADRID and the series of events that take place after the user enters the credentials to < Server >: < port > / cs/login/login.htm.
    Any help in pointing the right resources is appreciated.

    Thank you
    Shyam

    Sometimes, you don't have no need to make changes, but other times, you may need to update the map attribute, the delimiter of account permissions, default roles and/or accounts. Occasionally, an ID card is applied to translate incoming AD group names to match the role names and/or account UCM.

    Meet real external LDAP permissions is made via the WLS, but the JPSProvider does the work of extracting data from WLS in object UserData of the AAU.

    -ryan

  • rating of the schema for the apex 5 workspace

    Hello

    I am using oracle 11g 2 unlocked 'Scott' scheme.

    After installing 5 APEX iam trying to map this diagram to create the apex workspace based on SCOTT his is not visible, so I did the query run below but once again his error - package does not exist in schema apex_050000.

    BEGIN

    APEX_050000.APEX_SITE_ADMIN_PRIVS. UNRESTRICT_SCHEMA (p_schema = > 'SCOTT');

    END;

    Error report-

    ORA-06550: line 3, column 1:

    PLS-00201: identifier 'APEX_050000.APEX_SITE_ADMIN_PRIVS' must be declared.

    ORA-06550: line 3, column 1:

    PL/SQL: Statement ignored

    06550 00000 - "line %s, column % s:\n%s".

    * Cause: Usually a PL/SQL compilation error.

    * Action:

    What could be the issue here


    Thank you

    Hi Gor_Mahia,

    Gor_Mahia wrote:

    I am using oracle 11g 2 unlocked 'Scott' scheme.

    After installing 5 APEX iam trying to map this diagram to create the apex workspace based on SCOTT his is not visible, so I did the query run below but once again his error - package does not exist in schema apex_050000.

    BEGIN

    APEX_050000.APEX_SITE_ADMIN_PRIVS. UNRESTRICT_SCHEMA (p_schema-online 'SCOTT');

    END;

    Error report-

    ORA-06550: line 3, column 1:

    PLS-00201: identifier 'APEX_050000.APEX_SITE_ADMIN_PRIVS' must be declared.

    ORA-06550: line 3, column 1:

    PL/SQL: Statement ignored

    06550 00000 - "line %s, column % s:\n%s".

    * Cause: Usually a PL/SQL compilation error.

    * Action:

    What could be the issue here

    First the prevent/forbid to use undocumented Oracle APEX APIs find out APEX_050000.APEX_SITE_ADMIN_PRIVS.

    Second, there are the restrictions of security on some Oracle APEX APIs in APEX 5.0.

    You can use APEX_INSTANCE_ADMIN. UNRESTRICT_SCHEMA and run this API since the schema having the appropriate privileges.

    Connect to the SYS user with SYSDBA privilege and run the following:

    ALTER SESSION SET CURRENT_SCHEMA = APEX_050000;
    
    BEGIN
        APEX_INSTANCE_ADMIN.UNRESTRICT_SCHEMA(P_SCHEMA => 'SCOTT');
        COMMIT;
    END;
    /
    

    In addition, you use Runtime Environment?

    Kind regards

    Kiran

  • Cannot see items under the node Application Express on the schema of the APEX

    I installed 3.1.2 in my database (10.2.0.4) APEX, and I want to explore the developer SQL 1.5.5 / Apex integration feature.

    Problem is... when I go on the pattern that has the Apex applications, I see the 'Application Express' node, but SQL Developer shows nothing under (it's just blank).

    I'm doing something wrong? I've looked under all the schema associated with the APEX (i.e. flows_030100), but the node Application Express is always empty.

    Any help much appreciated.

    Hello

    I think that you must be logged in as owner of the analysis of an application schema to see under the node Application Express.

    HTH,

    Chris

  • How to get the schema of the APEX by username in PL/SQL?

    Hey, guys:

    I have to write a PL/SQL procedure, which can become the apex (schema of the user) user group that we have defined by their Summit. I know I can get user account in reference to v (app_user), but I'm not familiar with the APEX API security management. is there a method to get the user APEX scheme providing the username as a parameter?

    Thank you.

    Sam

    lxiscas wrote:
    Hey, guys:

    I have to write a PL/SQL procedure, which can become the apex (schema of the user) user group that we have defined by their Summit. I know I can get user account in reference to v (app_user), but I'm not familiar with the APEX API security management. is there a method to get the user APEX scheme providing the username as a parameter?

    Thank you.

    Sam

    You can simply use APEX_UTIL. GET_GROUPS_USER_BELONGS_TO

  • XDB user name and password required in the Apex 4.0.1

    Hello

    I installed the Apex 4.0.1 on Oracle 11 g R 2 windows 2003 R2.

    I installed the apex 4.0.1 using the method of the Embendded PL/SQL gateway.

    After installation, when I run in url = http://localhost: 8080, pls, apex, apex_admin it up a small window requiring XDB user name and password.


    I don't understand what to do to solve this problem.



    I installed the apex by following the steps.

    Help, please.


    Thank you



    -Apex installation steps-

    @apexins SYSAUX SYSAUX TEMP is
    @apxchpwd
    @apex_epg_config.sql c:\apex_4.0.1
    ALTER USER ANONYMOUS ACCOUNT UNLOCK;
    EXEC DBMS_XDB. SETHTTPPORT (8080);


    DECLARE
    ACL_PATH VARCHAR2 (4000);
    ACL_ID RAW (16);
    BEGIN
    -Did the ACL currently assigned to ' *' and give APEX_040000
    -the privilege 'connect' if APEX_040000 does not yet have the privilege.

    SELECT ACLS IN ACL_PATH OF DBA_NETWORK_ACLS
    WHERE HOST = ' *' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

    -Before checking the privilege, to ensure that the ACL is valid
    -(for example, does not contain obsolete references to users ignored).
    -If so, we'll spend the following exception:
    --
    -ORA-44416: invalid ACL: 'APEX_040000' main outstanding
    -ORA-06512: at "XDB". DBMS_XDBZ', line...
    --
    SELECT SYS_OP_R2O (extractValue (P.RES, ' / resources/XMLRef ')) IN ACL_ID
    OF XDB. XDB$ ACL A, PATH_VIEW P
    WHERE extractValue (P.RES, ' / resources/XMLRef "") = REF (A) AND
    EQUALS_PATH (P.RES, ACL_PATH) = 1;

    DBMS_XDBZ. ValidateACL (ACL_ID);
    IF DBMS_NETWORK_ACL_ADMIN. CHECK_PRIVILEGE (ACL_PATH, 'APEX_040000',
    'connect') IS ZERO THEN
    DBMS_NETWORK_ACL_ADMIN. ADD_PRIVILEGE (ACL_PATH,
    "APEX_040000", TRUE, "connect");
    END IF;

    EXCEPTION
    -When no ACL has been attributed to ' *'.
    WHEN NO_DATA_FOUND THEN
    DBMS_NETWORK_ACL_ADMIN. CREATE_ACL ('power_users.xml',
    "ACL that allows users to be able to connect everywhere."
    "APEX_040000", TRUE, "connect");
    DBMS_NETWORK_ACL_ADMIN. ASSIGN_ACL('power_users.) XML ',' *');
    END;
    /

    commit;



    SELECT par_value FROM ctxsys.ctx_parameters WHERE par_name = 'FILE_ACCESS_ROLE ';



    CREATE THE APEX_URL_DATASTORE_ROLE ROLE.


    GRANT APEX_URL_DATASTORE_ROLE to APEX_040000;

    EXEC ctxsys.ctx_adm.set_parameter ('file_access_role', 'APEX_URL_DATASTORE_ROLE');


    ALTER SYSTEM SET JOB_QUEUE_PROCESSES = 1000;

    ALTER SYSTEM SET SHARED_SERVERS = 5 SCOPE = BOTH;

    Hi John,.

    you're right - it should be the other way around: usually (and, if following the installation guide) configuration for OHS DAD uses the path alias + / pls / apex + as for the EPG, it's just + / apex + by default.

    -Udo

  • Determine the current item of blocks, region,... for use in the authorization scheme

    Hello

    y at - it a possiblity to understand, what element, region, etc. is currently rendered?

    What I want to do is: create an authorization scheme that is attached to each article. The authorization scheme itself must be generic and configured through a config table. I think that it is only possible if the authorization scheme knows the element for which it is currently running.

    Y at - it a possiblity to do this?

    If this isn't the case, I think it would be a great improvement for future versions. Built a new substition string that points to the name of the currently displayed item (something like "pointer" in java).

    Thank you for your help.
    Stephan

    Stephan - it is not yet available. We have had in mind for some time and hopes to implement in the next release.

    Scott

  • Two schemas for the same Application authentication

    Hello everyone.

    I use Apex 4.2.1 on mod_plsql and Oracle 11 g 3.

    I'm facing what I consider a difficult assignment.  I need to build an application that supports two types of connection authentication: authentication Windows LDAP and authentication in an Oracle table.

    Is it still possible?  Someone knows how to do this?

    I already have the operation of the application using LDAP.  Users are present page 101 and a form where they enter their Windows user name and password.  After clicking a "submit" button, a plsql after submit process page 101 distinguishes the user to log in as an ADMINISTRATOR or a user to type non-ADMIN looking at the username of connection in an Oracle table called APP_USERS.  This table looks like:

    CREATE TABLE APP_USERS

    (USERNAME VARCHAR2 (10))

    PASSWORD VARCHAR2 (250)

    )

    /

    If the user name contains a '@' character, then this is a non-ADMIN user. Otherwise, it's an ADMIN that connects to.

    A plsql after submit the process is then called that looks like:

    (app_security_pkg). Login

    P_UNAME = >: P101_USERNAME,.

    P_PASSWORD = >: P101_PASSWORD,.

    P_SESSION_ID = > v ('APP_SESSION').

    (P_FLOW_PAGE = >: APP_ID);

    This works when an administrator user logs in and is authenicated via LDAP.

    However, users of type non_ADMIN must be authenticated on this table APP_USERS.

    Anyone know how to include such authentication with LDAP authentication all within the same application?  There is a concrete example of the work that I could shoot?

    I looked through this and other instances of the Apex on this subject and have read several articles about setting up authentication.  Unfortunately, I have not seen what anyone who manages more than one type of authentication for a single application.

    Thanks a lot for any help on this.

    Elijah

    Hey, Jari.

    I thank very you much for helping me.

    As mentioned in my post, LDAP Windows authentication works very well.  My question is how to make use of LDAP and custom in an Oracle table simultaneously in the same Apex application authentication.

    I worked on it yesterday and, with the help of the articles I found on the web, I got it to work.

    I figured out how to get my Apex application to use two different authentication schemes.  LDAP is used for a set of users and 'control against a table of type Oracle user and password name' is used for a different set of users.

    I did use an article I found on the web (Blog of Duncan Mein) that shows how to create a custom authentication scheme.  Then, I modified it by adding in the LDAP Windows schema, I was already using.  Then, after yet another article I found, I also modified the underlying code of package to allow a re - direct to different application pages according to the user who was logged into type.

    To make all this work, it is important to be able to distinguish one set of users to another.  In my particular case, users with a '@' character in their usernames are automatically authenticated against my Oracle called APP_USERS table.  If my custom function returns 'true', they are directed to a 2 page in my application.  And users with no not this character are authenticated against Windows LDAP and directed to a 1 page in my application.

    It works well.  I wish I could put a demo of it on my work in apex.oracle.com area, but don't know how to get LDAP works on this site.

    In any case, thanks, again, for your help.  It is appreciated.

    Elijah

  • Limitation of the APEX: sharing pages between several APEX applications

    I was hoping if someone with a little more experience architect APEX could comment on some of the limitations that I see and I have to make good decisions, working around the problem.

    Any suggestions are welcome.

    One of the limitations I've seen, it's how APEX handles applications and pages. Each application appears as an island, it has its own set of pages, the processes of connection, templates, CSS, JS, references etc.. Regarding the CSS and Javascript, you can be defined in a central location, but still, every new developed APEX application must be configured to make use of your 'standard '.

    The more traditional web solutions showing each as stand-alone web page and any web page can call/reference any other page and pass information to session between them.

    With APEX, however this doesn't seem to be the case.

    A solution would be to have a huge demand for APEX, where all the pages are the property of this unique application.

    Unfortunately, we use of APEX and EBS R11 (& R12) together; all APEX applications are started in the menus of the EBS. I had drawn a SSO solution between the two (without using oracle SSO). However, each APEX application is unique, as small modules instead of complete applications. In other words, we tend to use APEX as an alternative for Oracle Forms - each APEX application is a standalone program.

    I always wanted to be able to apply the same connection process and look and feel in the brand new APEX app we write.

    The way I went to this subject has been meticulously creating a 'model' APEX application. Embedded in the application of this model are all our shared CSS, JS and models that apply the site appearance. It also contains our custom library of signature unique code and debugging custom logger (think log4j but for APEX).

    So whenever a developer began work on a new APEX application, they start by cloning the model and automatically inherit all the functionally and website presentation.

    My concern is if this is really the best way to do it, or if I'm missing something?

    I am also concerned move forward when I wants to establish the change in appearance across all of our web applications that I need to touch each APEX application since. I'm trying to mitigate this by ensuring that almost all the programming logic is contained in packages of PL/SQL, CSS and Javascript only referenced and external application of the APEX. But this does not always with models, or with a logic that is rooted in the actual pages of the APEX etc.

    At least APEX allows you to easily enough copy pages between applications, but it does compare not just to have a single page shared between all applications of the APEX.

    Is there a better way to go about this?

    Hi attis.

    I think you can't really compare a module with an APEX application forms. I wouldn't say to create an APEX application every time when you have created a module of forms in the past.
    A forms module is just a few pages of an application to the APEX. Then you really should have more then a few pages in an APEX application. Certainly, a huge application is also not the way to go, but I group them for example by logical areas such as HR, logistics, order...

    As Sc0tt already mentioned, you must use the 'Subscribe' mechanism of shared components to make it easier to update all your applications with the model updates. But there is more, you should also share your user name and just have in one place and use the "simple APEX based SSO" that allows all applications within a workspace can share the same session. Simply set the 'Cookie' namesake in your authentication for all your applications and when you bind an application to another and include a valid session id you should not have to log in again and you can also set the session state in that other application.

    So here's what I'd do

    (1) creating a master application that contains
    (a) your theme and other components shared that you want to share
    (b) must be also some basic navigation lists to navigate between your applications...
    (c) create a sign with the name "Redirect to connect main app" and type accounts APEX (no matter) where you define the name of 'Cookie' to 'Cbx_missmost' and the URL of invalid session to the login page of your creation 'hand connection app '. For example: f? p = 9999:101: & SESSION.

    (2) create a model application which is a copy of the claim, but where change you the "subscription" of your models, authentication scheme and components shared in the main application. This will serve as your App developers if they want to create a new application.

    (3) create your 'hand connection app' (eg. app 9999 id) by
    ) a copy of your new model application
    (b) remove the inside authentication scheme (this is just made for this main connection app)
    (c) create a new type to use. But important: set the name of 'Cookie' to 'Cbx_missmost '. This will ensure that all applications have the same session cookie.
    (d) If you use APEX 4.1.1 you will automatically be redirected to the calling application after successful login.

    (4) start to create new applications by copying your 'model' application that contains all subscriptions.

    (5) If you run this application, it automatically redirects to your main connection application if the current session is not valid. This will avoid to have the same logic of authentication in your applications.

    (6) If you need to change your templates or shared components you just do in the "master" application and click on the "publish" button to push the changes for all your applications.

    But still, try to avoid many small applications, I think that make handling just unnecessarily complicated. It is an APEX application has a few hundred pages. For example, our APEX app Builder (app 4000) has more than 1260 pages.

    Concerning
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • for relaxation: where is the table created by the Wizzard users create in the APEX?

    Hello everyone and Tony in particular since it was followed and mentoring my progress on this.

    Well,.

    Here we have 2 things:



    (1) when the wizzard of Administration > database > manage users creates a user. Where is the table it creates? What name does have? Why is it not visible in the object browser? I need the name of this table to put it on my trigger (I called users_table)



    (2) how to do that whenever a user connects, his formerly generated by the trigger sequence is used by a State to extract personal data (it's sort of VPD) in this case would be, how do you know what surrogate key, we need to call. To do this, I think, the thing would be to request the: = APP_USER (that was created in step 1) and each APP_USER will surrogate that are associated with this key.



    I set up a simple trigger, but just the substring of the concatenation of the given username, the system randomly generated pwd up to 12 characters.



    CREATE OR REPLACE
    GENERATE_SEQUENCE RELAXATION
    AFTER INSERT ON USERS_TABLE
    FOR EACH LINE
    BEGIN
    insert into users_table (surrogate_key)
    values (SUBSTR (¦¦ username password), 1.12);
    END;


    but as I said, this users_table must be the table where the wizzard to create users stores its data,... .but where is this table?


    Thank you very much

    Alvaro

    Published by: Alvaroe on February 6, 2010 09:13

    Published by: Alvaroe on February 6, 2010 10:00

    Hello

    (1) create a table and then start filling in

    I think you need to have a custom table of your patients (and users), say,

    CREATE TABLE patients
      (
        "USER_ID"   NUMBER,
        "USER_NAME" VARCHAR2(100 BYTE),
        "FIRST_NAME" VARCHAR2(100 BYTE),
        "LAST_NAME" VARCHAR2(100 BYTE),
        "PASSWORD"  VARCHAR2(4000 BYTE),
        "CREATED_ON" DATE
        CONSTRAINT patients_PK PRIMARY KEY ("USER_ID")
      );
    

    you need to build customized in your appl authentication and do not use the Apex or Db authentication.
    To do this, you must do this table in the schema that is used in the analysis of your application's schema.
    And you need create the function custom_hash like this:

    create or replace
    function custom_hash (p_username in varchar2, p_password in varchar2)
    return varchar2
    is
      l_password varchar2(4000);
      l_salt varchar2(4000) := '55PSP4P78JLDQ2AMBXQ60DW9OW7G9Z';
    begin
    
    l_password := utl_raw.cast_to_raw(dbms_obfuscation_toolkit.md5
      (input_string => p_password || substr(l_salt,10,13) || p_username ||
        substr(l_salt, 4,10)));
    return l_password;
    end;
    

    (2) then build the trigger when it detects that I completed a line
    It generates this sequence AND inserts it into another table (as you say, I could not put it in the same table)

    users must register themselves?
    Or register?
    Then you must create the free registration form or a form where you fill in your table above users.

    I think that your user_name must be unique. Put a Unique about this strain.

    When creating the patient button is pressed, then the above table is filled (you must and name, user in the form fill password)
    You must calculate USER_ID, user_name, password and created_on, this can be done in the trigger

    create or replace
    TRIGGER patients_trg_bi
      before insert on patients
      for each row
    begin
    if :NEW.USER_ID is null then
        select patients_seq.nextval into :NEW.USER_ID from dual;
    end if;
    
    if :NEW.CREATED_ON is null then
        :NEW.CREATED_ON := SYSDATE;
    end if;
    
    if :NEW.USER_NAME  is null then
        :NEW.USER_NAME  := :NEW.LAST_NAME || :NEW.USER_ID;
    end if;
    
       :NEW.PASSWORD := custom_hash(:NEW.USER_NAME, :NEW.PASSWORD);
    
    end;   
    

    you create the sequence of patients_seq

    In this case the surrogate key be hashed password.
    And you can use it by selecting table using patients: APP_USER
    that is when the user is connected to his USER_NAME, variable APP_USER is filled

    (3) then, the SQL query would recover this surrogate_key and show as connected individual data.

    Yes, when the user logs on, the key is populated by users based on table: APP_USER
    using

    select password
    from patients
    where user_name = :APP_USER;
    

    You must understand how EVP can be implemented at the Apex.

    You can use any application for this SURROGATE_KEY say

    which is calculated by Application of calculation on the new Instance

    4) but in order to know what to ask, surrogate key should be a key with the substitution APP_USER connection

    is that correct?

    Yes. You have the info from the users table

    Do you have examples of Applications Apex somewhere.
    If you use Apex 2.1, you can install it from the repository and if you have 3 Apex, they are normally automatically installed if you create the new workspace.

    You can use it a lot to manage users.

    Concerning
    Oleg

    BTW,

    Alvaro,
    Yo have your appl?
    If you sent your Db and tables all the Pl/SQl, as well as application Apex, you have for me by email, I can check and make/suggest improvements
    (For free, of course)
    I need to check what you did there, otherwise it seems to be a very long subject.
    Well, I have the time to discuss

    Yes, you can make the trigger like this

    CREATE OR REPLACE
    GENERATE_SEQUENCE RELAXATION
    AFTER INSERT ON USERS_TABLE
    FOR EACH LINE
    BEGIN
    insert into GENERATED_SEQUENCES_TABLE (lastinserted_name, surrogate_key)
    values (SELECT name from USER OF USERS_TABLE WHERE USERID..., SUBSTR (lastinsertedname¦¦ password), 1.12);
    END;

    but where the values are made here
    SUBSTR (lastinsertedname¦¦ password), 1.12

    Published by: oleg.lihvoinen on February 6, 2010 14:55

  • Passing parameters in the pages of the apex

    I have two selection lists on my page, is the list of countries and another for the list of airports. Both of them get their values (display and id) of the table. I want to pass the value to display the list of selected countries to the list of the airport to be used as a filter to only airports in the selected country. How do I do that? Similarly, how I pass the values of a top page to another to be used for the same purpose? I am newbie to Apex.

    Rafiq D says:

    If you ask a question APEX, always include the information referred to in these guidelines: How to get the answers from the forum

    I have two selection lists on my page, is the list of countries and another for the list of airports. Both of them get their values (display and id) of the table. I want to pass the value to display the list of selected countries to the list of the airport to be used as a filter to only airports in the selected country. How do I do that?

    Choose lists (and other controls LOV) used in this way are called 'cascading LOVs. Their use is described in the documentation.

    Define airport LOV properties items In cascade LOV article Parent (s) name of the element in the country. Reference this value in the LOV query using bind variables syntax. The Items property of the Page to send can be used to introduce other values of the child depends on LOV.

    Similarly, how I pass the values of a top page to another to be used for the same purpose? I am newbie to Apex.

    It is also covered in the documentation. URL containing ref and itemValues parameter lists may be specified or generated in the columns the report link, map series, calendar events, branches and other components of the APEX.

  • date in the apex 4.1 format

    Hello

    We have a custom to an apex application table. In this table we have type DATE for column1(for eg)

    If Column1 is introduced by APEX, we use date picker standard apex and format DD-MON-RRRR. After we insert and when we refreshh the apex to see page

    We see values such as 10 October 10 October 10, 2010,

    any idea or fix...

    I tried in the select statement to sql source [in this area] with to_date(column1,'DD-MON-YYYY')... but did not

    Also, I followed same insert statement with no luck

    Please notify

    KP

    is a change in the properties of the application and it works now

  • Sessions of the apex to the upcomig WORLD Kscope11 question

    Hope that this applies to ask here, but I see that there are a good number of sessions Apex at this WORLD conference and see a few familiar names I've learned a lot about the format of this list. No one knows if they ever sessions of the Conference such as these on a webcast? I tried to put a note on the WORLD site, but thought I would also ask here. Due to economy travel budgets are tight. It would give another option to learn some new exciting topics and how to apply the Apex, in tight budget times.

    Thank you
    Mark

    Hi Mark,

    WORLD is sometimes webinars, see http://www.odtug.com/apex/f?p=500:235:0:P235_NEWS_ID:3061 (14 June there is an APEX one by Dan McGhan). Not necessarily exactly the same as the Conference.
    Redgate offers free webinars now and then, for instance https://www2.gotomeeting.com/register/251093450 (APEX for Mobile).
    Skillbuilders (where Dan works) also offers free online seminars, see http://skillbuilders.com/

    But the best thing is to be in Long Beach, of course...

    Concerning
    Roel

Maybe you are looking for