How can I perform connectionless ldap call using Java? - java

In order to work with AD's Global Catalog from a Java program , I am required to perform a CLDap (Connectionless ldap) call from my Java program.
I am looking for some open source to perform this task, but in vain.
Has someone experienced creating CLDAP connection in Java and can help around?
Many thanks
Zaske

Surprising requirement. CLDAP was moved to 'historic status' in 2003, see RFC 3352. Based on that, (a) I doubt you will ever see a Java API for it, and (b) I would just use LDAP over TCP: it will work at least as well. See also here where its removal from OpenLDAP is discussed.

Related

ECCP (Elastix Call Center Protocol) Java-based implementation

I've been working in a Java-based version of Elastix Call Center Protocol for something around 6 months and I need some help.
Everything I found on the Internet was implemented in PHP and, in the most of case, very poor examples.
I even found an implementation in Java in SourceForge but it seems to be abandoned for 10 years.
My points are:
In my app I have to write campaigns and queues directly into Asterisk and Elastix database; there isn't an Eccp operation to do that, according to Eccp Docs.
I wasn't able to create a campaign through Eccp protocol either, because it seems that Eccp doesn't support that kind of operation.
And many other issues. I'm trying to work around these problems mixing Java Code to http calls to Elastix server in order to get these operations done.
Has anybody already worked with Elastix Call Center Protocol in Java? If so, could you give some directions, 'cause everything I've been doing ends up looking like an terrible workaround.
Any kind of help will be appreciated.
Open source Eccp2Java project (beta):
https://github.com/xbrain-dev/eccp2java/tree/master/src/main/java/br/com/xbrain/eccp2java

LDAP Server Updates and Event Notifications

Is it possible to receive object content change events from an LDAP server? Basically, I'm searching for a solution to integrate light weight directory services with our software via JNDI to setup active directory synchronization. (i.e. I'd like for the consumer application to be notified when a new entry is made or an object state has changed)
Below are a few possibilities I've came up with so far:
Enable auditing policy on directory objects and register a listener to read incoming changes from the change log.
Implement persistent search against the directory.
Mechanism to poll the directory for changes.
Could someone with more intimate knowledge of LDAP care recommending an optimal approach to a novice person like me?
Thanks in advance!
I'm not an ultimate expert on the topic, but I've had very similar requirements in my previous project, and made a thorough research on possible ways to implement synchronization from Active Directory. As far as I know, there is no other solution than the three options you listed above.
I think the third option is the most viable in most of the cases. It's not very difficult to implement the polling logic yourself, but you might be interested in a small java library that already does most of the hard work. It can help you getting started with change tracking in Active Directory very quickly.
Check it out here: https://github.com/zagyi/adsync4j
Disclaimer: I'm the author of the library and would love to get some feedback if you end up making use of it.
Your best bet with Microsoft Active Directory is to implement the DirSync Control.
Not sure of code in JNDI to implement DirSync Control but I know there is an implementation with UNBOUNDID LDAP SDK.
-jim

Java authentication/authorization server

I've been thrown in at the deep end a bit here, as I never expected I would have to do something like this and I have no idea where to start; so I'm helping somebody will be able to help me (ideally by providing some java code)...
In my effort to protect my Java software from piracy I have found that it is completely impossible unless I continusely check online - so thats what I want to do. Only, the only details I know are that, my program needs to communicate with some sort of script online and verify the licence key the program is using and then report back accordingly.
However, that's all I know - I am still stuck as to what the server side actually consists of. I'm hoping that the fact I am not hosting the website myself (an using JustHost) will not stop me from being able to do what I need.
So basically, I would like some help in creating a setup that allows my prevent anyone from pirating my software while connected to the internet. I though about having something like a login system; the users licence key would act as a username and password, but to be honest I really have no idea because if I did it that way would have to manually login and logout each time they wanted to use the software.
And not to run before I can walk but what happens when the user is not connected to internet? Even worse, how do I tell if somebody has stealed an legitamate users licence key? etc.
Thanks in Advance,
Andy
PS If it helps, I plan to use PostgreSQL (or maybe MySQL) and I am not paying for a dedicated server with JustHost.com...
Once your code is on their machine they can modify to simply ignore your checks. You can make it as hard as possible but it will never be hack proof.
In general your question is identical to this one which has some good discussion.
Try to delegate part of your business logic to server side. This way some core processes can not complete unless the application license is valid. Of course, if you have some logic that can be delegated. If your application is client-only than this approach is a bad choice.
If your application will be sold for a lot of money, try implementing solution using HASP key approach (which is investment by itself) instead of server authentication I understand this is not what you asked, I am just giving another idea.
try to create security by obfuscation/encryption and you will fail if your application becomes popular, since there will always be someone who will crack it in 5 minutes :(

Disable libraries in Java?

Assume I have a webpage where people submit java source code (a simple class).
I want to compile and run the code on my server, but naturally I want to prevent people from harming my server, so how do I disable java.io.* and other functions/libraries of my choice?
A regexp on the source code would be one way, but it would be "nicer" if one could pass some argument to javac or java.
(This could be useful when creating an AI competition or something where one implements a single class, but I want to prevent tampering with the java environment.)
If you are in complete control of the JVM, then you can use security policies to do this. It's the same approach taken by web browsers when they host applets.
http://java.sun.com/j2se/1.5.0/docs/guide/security/permissions.html
Hope this helps.
Depending on your intent, you might be able to speak with Nick Parlante, who runs javabat.com - it does pretty much exactly what you're describing. I don't know whether he's willing to share his solution, but he might be able to give you some specific help.
My advice is don't do it. At least, don't do it unless you are willing and prepared to accept the consequences of the machine that runs your server being hacked. And maybe other machines on the same network.
The Google App Engine uses an approach where classes are white listed - that is, they are probably either not loaded, or the classes themselves changed and the libraries recompiled, so that no IO, or other system calls can be made. perhaps you could try this by recompiling a jvm like http://jikesrvm.org/.
You can always run the code in a custom classloader. This allows you full control about what you will accept to load.

Where can I find an AS400 to Java interface?

Does anyone have links and resources to connect to an AS400 from Java?
I remember years ago, somebody told me about a connector that simulates KeyStrokes from the keyboard and other "purest" approach that connected directly.
On the web I have found a lot of links, but I cannot find a complete product to do this (I am probably not using the right keywords).
EDIT
Thanks for the answers:
What we are looking for is a way to access the data inside the AS400 and/or the screens it uses and expose them for other new applications re-use. Either as a webservice of some sort, or directly through Java ( and java will expose the operations using webservices )
Thanks in advance.
EDIT
As per MicSim post, I've also found this link:
http://www.ibm.com/developerworks/library/ws-as400/index.html
What you are looking for is probably the Toolbox for Java™ & JTOpen from IBM. There is also an AS400 class in the toolbox for performing specific AS400 tasks. You can look here and here for more details. Just googled it and hope it's helpful.
IBM's 5250 screen-scraping technology was "WebFacing" - I would post a link but you're probably better off Googling it, since IBM's documentation is so scattered. There are other technologies available too but: Screen-scraping was never anyone's favourite since typically you end up with something which, although it looks more up-to-date, actually is harder to use than a green screen and no more functional. The 5250 is probably the single best data entry platform I've ever used - web forms in a browser are one of the worst.
As mentioned, jt400 is the way to go for most other things. In particular:
JDBC - for all things SQL. If you do it right and address your files as though they really are tables, it's a way to get away from the 400 entirely.
Record-level access - write Java programs using a similar database API to RPGLE (all those chains, setlls that 400 programmers love)
Call programs, system commands, manage resources (data queues, data areas, prints / spools, jobs etc etc)
Good luck
If you just want to run Java on the AS/400 (or iSeries, or System i, or whatever IBM's marketing department has decided to call it this month), that's a supported language. You can access the pseudo-DB2 database directly. Or are you after some other form of integration?
This obviously depends on what you want to do, however if you want to simulate keystrokes across a network connection to an AS400 process then Expect4j may be the library you are looking for.
This is generally a really nasty hack though and there are frequently better ways to achieve your goals. What are you trying to do?
The expect4J library can be found here. Expect was originally a unix command that allowed you to specify a string that you are expecting to see and then a string of characters to return. It was frequently used for automating logins etc and for screen-scraping applications.
Even better is the TN5250j Console, which can be used to extract data from the AS/400.
jacada makes tools to do what your looking for
http://www.jacada.com/

Categories

Resources