Hi Chainerit,

The best way to get this working is to start with the working juddi-tomcat bundle.
1. Verify things work then
2. edit the juddiv3.war/WEB-INF/class/juddiv3.properties file.
Here are all the properties you can use:
http://svn.apache.org/viewvc/juddi/tags/juddi-3.0.4/juddi-core/src/main/java/org/apache/juddi/config/Property.java?revision=1030350&view=markup
3. Switch to use

juddi.authenticator = org.apache.juddi.v3.auth.XMLDocAuthenticator

which by default will look to load juddi-users.xml from the classpath (so put it in WEB-INF/classes),
in the unit tests we use
http://svn.apache.org/viewvc/juddi/tags/juddi-3.0.4/juddi-core-openjpa/src/test/resources/juddi-users.xml?revision=1030350&view=markup

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<juddi-users>
<user userid="anou_mana" password="password" />
<user userid="bozo" password="clown" />
<user userid="sviens" password="password" />
</juddi-users>

4. In tomcat you will need to restart any time you add files to a war to get them on to deploy (and on the classpath)

5. Once you have that working you can try encryption.

Good luck!

--Kurt

On 3/25/11 6:42 AM, chainerlt wrote:
Hello again,
somehow I remember I've read this before, but it totally went out from my
head. However I see now I have to manage autentication manually. I've read
Authentication chapter carefully few times, but still got some questions:
I see this chapter talks about "juddi.properties". And setting it up.
1. Where is this property file? in webapps\juddiv3\WEB-INF\classes ? If yes,
seems like after changing it I should reboot tomcat? Do I?
However, no mater where is this file for a now, chapter is talkin about:
juddi.auth = org.apache.juddi.auth.CryptedXMLDocAuthentication
juddi.usersfile = juddi-users.xml
I guess this is what I need to change in juddi.properties file? If yes, I
found some discrepancy:
2. juddi.auth or juddi.authenticator?
3. org.apache.juddi.auth.CryptedXMLDocAuthentication or
CryptedXMLDocAuthenticator?
4. juddi.usersfile = juddi-users-encrypted.xml? where should be this
juddi-users-encrypted.xml?

So far what I've tried:
Editing juddi.properties in (webapps\juddiv3\WEB-INF\classes):
add comment to this line "#juddi.authenticator =
org.apache.juddi.v3.auth.JUDDIAuthenticator"
and adding these two lines:
juddi.authenticator = org.apache.juddi.auth.CryptedXMLDocAuthenticator
juddi.usersfile = juddi-users-encrypted.xml
already found juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor so I
left it as it was.
And after rebooting tomcat I actually dunno how to 'play' with this
autentication in my java code.
I've tried smth like creating autenticator or whatever:
CryptedXMLDocAuthenticator x = new CryptedXMLDocAuthenticator();
But it throws me:
java.util.concurrent.ExecutionException:
org.apache.commons.configuration.ConfigurationException: Cannot locate
configuration source juddiv3.properties

Maybe somebody have some good code example or tutorial or some tips, how to
manage this autentication?
Thank you in andvance




Hi Chainerit,

> From what I read it seems you haven't managed to read Chapter 3 of the
user
guide.

http://juddi.apache.org/docs/3.0/userguide/html/chap-Authentication.html

In particular section 3.2 warns you that the juddi authentication has the
behaviour you describe and of course there is more information on how to
configure juddi properly.

Cheers,
Javier.


Reply via email to