Problem with LDAP in the APEX and not in sql query * more
Hello everyone.Hereby, I refer to an existing thread: Query LDAP APEX
I have a problem using LDAP in the APEX (DB version: 11.2.0.2.0;) APEX version: 4.0)
I get "Authentication failed" by their SUMMIT. However, when I run it in SQL * more (SQL Developer) (I created it as seen in the referenced forum thread) it works! Can I use my own function, but that looks like reinventing the wheel.
l_ldap_host := 'oursite.be';
l_ldap_port := '389';
l_ldap_domn := 'oursite';
l_ldap_user := i_username;
l_ldap_pass := i_pw;
l_ldap_base := 'ou=oursite,dc=oursite,dc=be';
dbms_ldap.use_exception := true;
l_session := dbms_ldap.init(l_ldap_host,l_ldap_port);
l_retval := dbms_ldap.simple_bind_s(l_session, l_ldap_domn||'\'||l_ldap_user, l_ldap_pass);
l_attrs(1) := 'name';
l_attrs(2) := 'title';
l_retval := dbms_ldap.search_s(
l_session,
l_ldap_base,
dbms_ldap.scope_subtree,
'(sAMAccountName='||l_ldap_user||')',
l_attrs,
0,
l_message
);
l_retval := dbms_ldap.count_entries(l_session, l_message);
We must search the sAMAccountName because that contains our login credentials (dennis.surname). The common name is just our full name (Dennis Surname)At the SUMMIT, I have these settings:
* LDAP host: oursite.be
* Port: 389
Use SSL: No SSL
Use exact DN: No.
* String DN: ou = oursite, dc = oursite, dc = be
* Search filter: sAMAccountName = % LDAP_USER %
When I try to test it I get "Authentication failed" but I don't know why. It works very well in sql * more (in the the same pattern of course!) so I have really no idea what I'm doing wrong. In addition, the message comes instantly and sql * more it takes about a second to authenticate.
I tried so many things! remove the 'or '. Connect with my name, change 'cn = % LDAP_USER %' filter, connect with dennis.surname and Dennis Surname, using exact DN,... and all the possible combinations of them... Nothing works.
I can go further by using my own function, but I really want to use the settings of the APEX, because it's so much easier.
Thanks in advance for help out me!
Dennis
Hi Dennis,
Try this
The exact use DN Yes value
Change your DN string to
%LDAP_USER%@domain
or
domain\%LDAP_USER%
The authentication uses a simple_bind_s. You must use the same syntax in these text boxes. You actually do a single with bond
dbms_ldap.simple_bind_s(l_session, 'sAMAccountName=' || l_ldap_user, l_ldap_pass);
It does not work. It's the syntax to use in the search for search_s filter.
Please keep in mind that the apex_040100 (for apex 4.1) user must connect the rights on the domain server.
Tags: Database
Similar Questions
-
Problem with using of the audit and the APEX triggers
Hello community,
I have a little problem with the help of a trigger to audit. I can't operate the trigger takes the reality of the user to record in the audit table:
DDL in the table:
DDL audit table:create table BOOKS ( B_ID NUMBER not null, B_NAME VARCHAR2(100), B_DESCRIPTION VARCHAR2(500) );
ddl trigger:create table AUDIT_BOOKS ( B_ID NUMBER not null, B_NAME VARCHAR2(100), B_DESCRIPTION VARCHAR2(500), AUDIT_USER VARCHAR2(50), AUDIT_DATE DATE, AUDIT_ACTION VARCHAR2(6) );
Column AUDIT_USER always gets "APEX_PUBLIC_USER" as a value of insertion. How can I change to the user real "& APP_USER."?CREATE OR REPLACE TRIGGER trg_audit_books AFTER DELETE OR UPDATE ON books FOR EACH ROW DECLARE v_trg_action VARCHAR2(6); BEGIN IF updating THEN v_trg_action := 'UPDATE'; ELSIF deleting THEN v_trg_action := 'DELETE'; ELSE v_trg_action := NULL; END IF; INSERT INTO audit_books ( B_ID, B_NAME, B_DESCRIPTION, AUDIT_USER, AUDIT_DATE, AUDIT_ACTION) VALUES (:OLD.B_ID, :OLD.B_NAME, :OLD.B_DESCRIPTION, UPPER(USER), SYSDATE, v_trg_aktion); END trg_audit_books;
I tried under Home > Application Builder > application 100 > shared components > change attributes for security > authentication > Public user
And added & APP_USER. and: P101_USERNAME both have not changed anything.
Is there a way to get to work with & APP_USER. instead of APEX_PUBLIC_USER?
I use the standard authentication scheme 'Application Express'. I use ldap via a process to the login page.
Kind regards
TobiasHello Tobias,.
In the trigger instead of the USER code, use v('APP_USER') to catch the real user of APEX.
Greetings,
Roelhttp://roelhartman.blogspot.com/
http://www.bloggingaboutoracle.org/
http://www.Logica.com/You can assign this answer to your question in marking it as useful or Correct ;-)
-
HP 255 G4: problem with sensitivity to the touch and slider jump
My question - problem could be funny, but it's a problem.
I bought HP 255 nine G4, from the box. First impression was: a pleasant experience, but first touch was terrible. I had several laptops, but never the same problem: cursor is wavering and being so inprecise it is almost impossible to locate some details using the key.
I have included a picture of the surface of the laptop. Should I maybe take off this perforated layer and reach the brilliant below surface? I tried to peel on the rounded corners, but he can't go easily, so I didn't damage it.
Please give me a sugestion. :-)
I'll answer myself, could someone help.
When I installed WIN 10, all problems are gone.
With WIN 7, nothing worked, I was responsible for the search and looking for drivers, but USB 3.0 has not worked, F keys did not work, touchpad was terrible, all together, very bad.
With 10 WIN, everything worked, only a few development was necessary.
With the new computer (product end of September 2015) the new system (WIN 10) so enjoy.
-
Original title: problem with upgrading the computer and Windows activation
I have improved my week to loast of computer of an Intel Core 2 Duo to an Intel Core 2 Quad processor. Now Windows tells me I need to register my product. When I tried to do, he said that "the failure of key you entered is already in use. To activate Windows, you will need another product key Windows Vista Home Premium. "How can I get MIcrosoft to realize that I have not installed Windows on multiple computers. I just put my equipment?
Hi Tkelleyaustin,
I suggest to check the following items and check if the problem still persists.
Resolve activation problems
http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-activation-problems
Activate Windows on this computer
http://Windows.Microsoft.com/en-us/Windows-Vista/activate-Windows-on-this-computer
How to activate Windows Vista
http://support.Microsoft.com/kb/940315
I hope this helps.
-
I'm working on our catalogue on INDesign CC 2015, I have a links to my libraries, I worked every day without any problem. I work on a Mac and Win system, I put the file on my disk hard or on files of cc.
2 days ago, I opened the file and as a result with any missed links, when I tried to re-link on my library the program shown Indesign files missed this message "the file does not exist, you may not, or the file may be in use by another application", I contacted Italian cat Adobe they suggested me to change the name of the file I did but nothing happened, they suggested to create a new owner of the computer, but it did not work because I work within a team and the file is opened to others of collaboration. I have 333 links so what I shell do? Please help me, I have to finish this work, we need print it out as soon as possible.
I had this problem after an Indesign file that we've been working on the opening of my colleague. She has made a few changes and then when I went back to work on the file of the library of all the links were broken and I had him "you don't have to leave."
I've corrected the problems by opening Illustrator and rename the library. InDesign revived and everything from the library was connected properly.
-
Weird problem with control of the ring and foot
So I have some sort of weird issue with a control of the ring and a chart. I'm with LabWindows/CVI on a Windows 7 computer. The part of the program I'm looking at is basically to navigate through data - there are several "transition" (rehearsals experience), and you can choose the one that you want to watch in the list.
Normally, you would select transitional in the list, it plots the data, then it is done, basically. However, all of a sudden (don't know how long it spent for), when I select anything except 'Average', he made all the tracing and such, then it changes control of the ring to 'Average' (it is not plot the average data or generate all the reminders that I can tell).
Now the thing the more bizarre as you can see below, it seems that the switch happens just when I draw something on the chart:
So, it's just weird. The code in this section is here:
if(uidc.polyon) { polynomial_subtraction(curr_data, np, uidc.polyord, 0); // 0 Skip for now } // Scale the curr_data for gains, then pre-scale the FFT data // to have no change in the power spectrum (multiply by (2/np) for(j = 0; j < np; j++) { fft_data[j] = curr_data[j]*2/np; curr_data[j] = curr_data[j]*uidc.fgain[i] + uidc.foff[i]; } uidc.fplotids[i] = PlotY(dc.fid, dc.fgraph, curr_data, np, VAL_DOUBLE, VAL_THIN_LINE, VAL_NO_POINT, VAL_SOLID, 1, uidc.fchans[i]?uidc.fcol[i]:VAL_TRANSPARENT); // Prepare the data. FFTEx(fft_data, np, npfft, NULL, FALSE, curr_fft); // Do the fourier transform
DC is a structure that I use to better organize some UI controls and uidc is for display RAM variables, then dc.fid is the Panel that is embedded in the tab "FID", dc.fgraph = FID_Graph and corresponds to the chart control. Control of the ring is actually in a child Panel, dc.cloc [0]. FID_Graph has a point, it can produce, but the reminder is empty (no not coded something there yet).
I have also considered that perhaps something in another thread (I don't think there is, but whatever) I see is the cause, however, this behavior still happens on that line. I tried to break in different locations, on hold, then continues, as well by adding a loop containing Delay (0.01), a loop of 100 times. Always happens after the conspiracy.
Does anyone have any idea why this might be happening?
Hi Paul,.
I don't have a solution, but I wanted to point out that, even if you see the ring to change its value only when you call the function of tracing, that doesn't say what this function call that really changes the value of the ring. In CVI, some drawing operations are batched, for performance reasons, and the Panel updates only visually at certain times. One of those moments when you draw a chart data. Yes, the ring changes visually at this time there, but it is probably just 'catch up' a change earlier.
As you are looking through the code, when the value of the ring, you can use the term > command update UI to force the update panel, so that you don't have to wait for the tracing function and see if all goes well this change happening earlier.
Luis
-
On outlook express, I get the following error message "the message could not sent because the server rejected the sender's e-mail address. How can I eliminate this problem, please?
I can find no trace messages claim are waiting for shipment.Unsent Mail file, do you mean the Outbox? Check: File | Work offline and in: reviews | Layout: uncheck the preview pane and delete the messages. Otherwise, delete the Outbox.dbx file in the message store.
-
Problem with image extract the content and the tile at the same time show on ListField
My application is Application News get JSON webservice to appear on ListField.
On each line in the list, it will show you the image thumbnail, title and Teaser as below.
_______________________________________
| | Title
| Thumb |_______________________________
|_______ | Teaser
First of all, I have to get JSON that contains the url of the thumbnail image, title and Teaser.
I managed to view the title and Teaser, but the thumbnail is not. When I Fetch image with the url of the thumbnail image, it returns only bitmap = null for me.
My method is first call httpdispatcher to get the thumbnail image, title and Teaser and then wait and call another httpdispatcher to retrieve the url of the image thumbnail, then added to listfield.
Here is my code
Class helloScreen{ public void requestSucceeded(byte[] result, String contentType) { if (contentType.equals("image/png") || contentType.equals("image/jpeg") || contentType.equals("image/gif") ||contentType.equals("image/jpg")) { bitmap_temp = Bitmap.createBitmapFromBytes(result, 0, result.length, 1); synchronized (UiApplication.getEventLock()) { } } else if (contentType.startsWith("text/")) { strResult = new String(result); try { ja = new JSONArray(strResult); } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } synchronized (UiApplication.getEventLock()) { int temp_int_next=0; try { callback.erase(); for(int x=0;x<10;x++){ j = (JSONObject) ja.get(x); String get_htmlOff_first = j.get("teaser").toString().substring(j.get("teaser").toString().indexOf(">")+1); final String thumb = replace(j.get("thumb").toString(),"files/","http://www.eng.chula.ac.th/files/"); UiApplication.getUiApplication().invokeAndWait(new Runnable() { public void run() { getImageURL(thumb); }}); callback.insert(j.get("title")+" ", ""+get_htmlOff_first.trim(), bitmap_temp , temp_int_next , "Event"); temp_int_next++; } } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } else { synchronized (UiApplication.getEventLock()) { Dialog.alert("Unknown content type: " + contentType); } }
public void getImageURL(String url) { HttpRequestDispatcher dispatcher2 = new HttpRequestDispatcher(url, "GET", this); }
}
httpRequest, class Dispatcher is used to get the data from the url
public HttpRequestDispatcher(String url, String method, helloScreen screen) { this.url = url; this.method = method; this.screen = screen; } public String getType(){ return type; } public void run() { try { if(WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED) { connection = (HttpConnection)Connector.open(url+";interface=wifi"); }else{ String uid = getWap2Uid(); connection = (HttpConnection)Connector.open(url+";deviceside=true;ConnectionUID=" + uid); } connection.setRequestMethod(method); connection.setRequestProperty("Accept","text/html, image/jpg, image/jpeg, image/,image/gif"); int responseCode = connection.getResponseCode(); if (responseCode != HttpConnection.HTTP_OK) { screen.requestFailed("Unexpected response code: " + responseCode); connection.close(); return; } final String contentType = connection.getHeaderField("Content-type"); final ByteArrayOutputStream baos = new ByteArrayOutputStream(); InputStream responseData = connection.openInputStream(); byte[] buffer = new byte[10000]; int bytesRead = responseData.read(buffer); while(bytesRead > 0) { baos.write(buffer, 0, bytesRead); bytesRead = responseData.read(buffer); } baos.close(); connection.close(); UiApplication.getUiApplication().invokeAndWait(new Runnable() { public void run() { screen.requestSucceeded(baos.toByteArray(), contentType); } }); } catch (IOException ex) { screen.requestFailed(ex.toString()); } }
The point here is that I have JSON and get the url of the thumbnail to fetch before add to listfield. The image should be ready in bitmap_temp but it still get null.
UiApplication.getUiApplication().invokeAndWait(new Runnable() { public void run() { getImageURL(thumb); }});
public void getImageURL(String url) { HttpRequestDispatcher dispatcher2 = new HttpRequestDispatcher(url, "GET", this); }
callback.insert(j.get("title")+" ", ""+get_htmlOff_first.trim(), bitmap_temp , temp_int_next , "Event");
All day trying to fix it but no success, so I need help from you guys.
Thank you
"Is it possible to leave only 1 thread completely pick 10 pictures.
Yes and this is how I would recommend that do you it this way. So have a Thread that you give a list of things to do and let it work through each.
-
Problem with menus on the right and the image is too right.
Note the difference in size of menus, (unusual with the correct terminology). I can't the adjustments, layers, properties, etc. for all have the same size, increase width. Note that the loaded image is too far to the right under the menus. I have to go to the window/rearrange/float in the window to move the image to the left. Also I can not get the expand/collapse button to work. How can I solve these problems.
Try the Menu window > workspace > Essentials or Reset Essentials.
ALT - w is the shortcut key for the menu of the window. (Windows OS)
ALT-space you will get the menu resize, if you can not reach the buttons on the main window of the program.
Gene
-
Problem with security of the ports and disabled learning MAC addresses?
Hello
Is there a problem, or incompatibility, if you configure the port-security on "n" ports that belong to X vlan and also disable mac-address-table of learning on this vlan?
Someone did he do reference, links or PDFs on this problem?
Thank you very much
Best regards.
Hi Javier,
As I showed above, the combination is valid. I did not all static entries in the security of the ports, but all entries learned through port security will be shown as static on the show see the mac address table. All dynamic learning is disabled.
I don't know what kind of security problem, that you try to resolve, but the configuration is valid.
Daniel Dib
CCIE #37149Please evaluate the useful messages.
-
Problems with synchronization of the settings and the list of sites
Hello!
Recently got Adobe Creative Cloud CC 2015 but I'm a little disappointed that the version of cloud does not behave like a cloud version. Dreamweaver CM³ in synchronization settings, I set always use the Cloud version and then import the sync settings. Everything is marked in sync settings. My main computer at home has welcome screen off, and he has two sites in the list of sites. At work, I have always the Welcome screen and 1 single site in the site list. Tried to restart and apply updates whenever he says but its not doing anything.
Hi Johnny,.
We will not sync preference screen between different versions.
In regards to the sites not getting not migrated, could you please follow the mentioned below as follows:
1. open Dw CC and create a new site (dummy) and synchronize it to the cloud. This will ensure that all sites are synchronized to the cloud.
2. close Dw CC and open Dw CC 2015, go to the Preferences dialog box > synchronize settings category and check the box "import the sync settings.
3. close the Dw CC 2015 and restart the application. Let the full synchronization and push the button apply. This will get all the settings from the previous version.
Let me know if you need help most.
Thank you
Confidante
-
Hi, I try to connect to hotmail and received the following message ' sorry, there's a problem with Hotmail right now Hotmail was not able to complete this application. Microsoft may contact you about any matter that you declare "what steps should I take as I have urgent e-mail to check." THX
Hello
Looks like a temporary problem.
Answers is a peer group supported and unfortunately has no real influence on Hotmail.
HotMail has its own Forums, so you can ask your questions there.
Windows Live Solution Center - HotMail - HotMail Forums Solutions
http://windowslivehelp.com/Hotmail - Forums
http://windowslivehelp.com/forums.aspx?ProductID=1Hotmail - Solutions
http://windowslivehelp.com/solutions.aspx?ProductID=1How to contact Windows Live Hotmail Support
http://email.about.com/od/hotmailtips/Qt/et_hotmail_supp.htmWindows Live Hotmail Top issues and Support information
http://support.Microsoft.com/kb/316659/en-usError message "your account has been locked" when trying to connect
http://windowslivehelp.com/thread.aspx?ThreadId=77be7d82-a0e9-49c7-b46d-040ec654a9e2Compromised account - access unauthorized account - how to recover your account
http://windowslivehelp.com/solution.aspx?SolutionID=6ea0c7b3-1473-4176-b03f-145b951dcb41Hotmail hacked? Take these steps
http://blogs.msdn.com/b/securitytipstalk/archive/2010/07/07/Hotmail-hacked-take-these-steps.aspxI hope this helps.
Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="" -="" mark="" twain="" said="" it="">->
-
Hello, I had a problem with my band. It does not really suppose he numbered scenes everything in order and he has so far in until I missed an and changed for the good order. But now when I go back to where I left and I have create a new scene number come up as * it and I need to change personally. is their any way I can change it to order normally?
Hello
You can manage this through the "Manage scene numbers" option in the menu 'Production '.
There is a setting in this dialog box to assign scene numbers automatically to the new scenes.
-
I had endless problems with Lightroom since the purchase of subscription for one year in December 2014. Now, the development Module was disabled, as they claim that my subscription has expired... He spent more time to work does not, and I bitterly regret it. Help, please!
Open the Adobe Creative Cloud application then go to preferences then sign out and then sign back with the same Adobe ID that you used to purchase the subscription photographers, that is to say the same e-mail address and password.
Then open Lightroom and go to the Help menu and make sure that it is signed in with that Adobe ID email address.
-
Separated from this thread.
Joachim
When first pose the problem? Was it before or after the December updates?
KB3004394 and KB3024777 appear in view update history? Or do they appear in installed updates?
Gerry, thanks for your post. I have the same problem as Joachim started this thread. I am running Windows 7 sp1. I have a Dell computer and it's certainly a legitimate copy of Windows (confirmed computer 'properties' and it is enabled).
By your post, I saw just to update and the KB3004394 (installed on 12/10/2014) and KB3024777 (installed on 12/12/2014) show as comfortable. I usually leave the Windows download updates automatically and I install them to stop. I watched the second update and according to Microsoft.com:
Install KB3024777 to fix a problem with KB3004394 on Windows 7 and Windows Server 2008 R2
The KB 3004394 update which was dated December 10, 2014 can cause additional problems on computers that run Windows 7 Service Pack 1 (SP1) and Windows Server 2008 R2 SP1. This includes the inability to install future updates. This new update is available to remove KB 3004394 from your computer.
My problem is, as of today 14/12/2014, I still get the pop up "this computer is running not windows genuine', even with KB3024777 installed.
Any thoughts?
Thank you
Bob C
Right-click on CMD
Click on run as administrator
At the command prompt, type the following commands:
slmgr.vbs - ipk xxxx-xxxx-xxxx-xxxx (to replace the specified in the current product key)
xxxx-xxxx-xxxx-xxxx - represents your product key
Press enter on your keyboard
Then type: slmgr.vbs - ato (this will force the activation)
Leave the command prompt
Restart your computer
Maybe you are looking for
-
How to connect by Satellite Pro C to TV?
Hello worldThank you. I would like to connect my C series to my TV.The C series has only one external video Port.My TV has RCA inputs and a SVHS, S_Video entry imput. Can anyone help?John
-
He said I have a connected projector and my screen is upside down what I do?
I put it to extend but if I try to play a game or something like it my screen goes in upside down, and when I turn my computer on my screen is upside down. Help, please
-
I went to Skype, and wanted to put my main upward volume, when I went down to my taskbar, the small button itself had disappeared. I went to the start menu to my control panel and there customizing the taskbar, it let me just select my clock and powe
-
HI: Just found a problem after you uninstall old software. The system configuration / startup? The program still shows upwards, in the start menu. The source folder is empty. Program search returns no results. Is no longer present in the control/appw
-
Why timestamp before the time displayed with bad seconds
WhySelect TO_TIMESTAMP (31.12.1969 '23:59:59:01', 'dd.mm.yyyy hh24:mi:ss:ff2') "t" from dual;Returns31.12.1969 23:59:58, 010000000Char conversion shows correctly. Also to time after time.SelectTO_TIMESTAMP (1.1.1970 '00:00:00:01', 'dd.mm.yyyy hh24:mi