RE: Slide and JBoss Authentication

2003-02-25 Thread Adam Booth
Hi James,

I haven't put the JBoss login module together yet but will be in the next week or so, 
whenever I get some time. I'll post when its ready so you can get a copy. If in the 
mean time anyone happens across one that is already done...

Cheers,
Adam

-Original Message-
From: James Higginbotham [mailto:[EMAIL PROTECTED]
Sent: 25 February 2003 00:30
To: Slide Users Mailing List; Adam Booth
Subject: RE: Slide and JBoss Authentication


Adam,

Did you ever compose that JBoss login module? Just wondering if someone
submitted one to you or if you composed one that you could share.. 

Thanks,
James

 -Original Message-
 From: Adam Booth [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, February 13, 2003 4:47 AM
 To: [EMAIL PROTECTED]
 Subject: Slide and JBoss Authentication
 
 
 Hi all,
 
 I'm in the process of deploying slide with JBoss 3.0 / Jetty 
 using realm authentication. I was wonder if anyone has 
 already done this and written the custom authentication class 
 needed. If so would it possible get a copy. Any assistance 
 would be greatly appreciated.
 
 Thanks
 
 Adam
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Problems with flushing cached objects / multiple slide instances

2003-02-25 Thread Troels Rossing
Perhaps I should clear what I mean by multiple instances. I have a
DAVExplore and my own servlet-application, changes made in one does not
appear in the other until the server has been restarted. That's my
problem, so it is multiple instances accessing the same slide server.


-Original Message-
From: Troels Rossing [mailto:[EMAIL PROTECTED] 
Sent: 25. februar 2003 10:19
To: Slide
Subject: Problems with flushing cached objects / multiple slide
instances

Hi

 

A problem with accessing slide from different instances has been
discussed earlier.  A proposal was to extend the ObjectCache and then
create your own store.

 

I am currently using the helper-classes, any chance of reaching the
ObjectCache from a helper class or in some other way force the cached
objects to the store? 

 

It is critical for my application that I can flush the cache to reflect
changes in other slide instances.

 

Any help would be most welcome. 

 

Regards 

 

Troels Rossing

 

www.Qualiware.com

 

 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Stop WW3- Sorry if it is out of the blue for the mailing list

2003-02-25 Thread B. Shadgar
STAND FOR PEACE. War is NOT the Answer. Today we are
at a point of
imbalance
in the world and are moving toward what may be the
beginning of a THIRD
WORLD WAR. If you are against this possibility, the UN
is gathering
signatures in an effort to avoid a tragic world event.
Your signing up
may
look a minor thing, but many names will help the UN to
direct much
energy in
a more peaceful direction. PLEASE COPY (rather than
forward) this
e-mail IN
A NEW MESSAGE, sign at the end of the list, and send
it to all the
people
whom you know. If you receive this list will more than
500 names
signed,
please send a copy of the message to :

[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
Even if you decide not to sign, please consider
forwarding the petition
on
instead of eliminating it.
Thank you.
---

Les Itats-Unis sont sur le point de diclarer la
guerre.
Aujourd'hui, nous nous trouvons dans une situation de
disiquilibre
mondial,
ce qui pourrait initier une TROISIHME GUERRE MONDIALE.
Si vous jtes
contre,
l'ONU est en train de compiler les signatures pour
iviter ce tragique
ivinement mondial. S'IL VOUS PLANT, FAITES UNE COPIE
de ce message
(pluttt
que de le transmettre) et placez-le DANS UN NOUVEAU
MESSAGE, icrivez
votre
nom ` la fin de la liste et envoyez- la ` toutes les
personnes que vous
connaissez. Si vous recevez cette liste et qu'elle
contient plus de 500
noms, s'il vous plant, envoyez une copie ` cette
adresse :
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
De plus, si vous n'ajoutez pas votre nom ` la liste,
s'il vous plant,
n'effacez pas la pitition. Faites-la suivre `
quelqu'un d'autre. Merci.
---

Estados Unidos esta a punto de declarar la guerra. Hoy
nos encontramos
en un
punto en desequilibrio mundial por lo que puede dar
inicio a una
TERCERA
GUERRA MUNDIAL. Si tu estas en contra, la ONU se
encuentra recopilando
firmas para evitar este tragico acontecimiento
mundial. POR FAVOR COPIA
este
e-mail en un mensaje nuevo, firma al final de la lista
que veras a
continuacisn, y mandalo a todas las personas que
conozcas. Si recibes
esta
lista con + de 500 nombres en ella, por favor envma
una copia del
mensaje a
:
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
Incluso si decides no firmar, por favor se considerado
y no elimines la
peticisn. SSLO REENVMALO PARA JUNTOS HACER ALGO.
Gracias.


1) Suzanne Dathe, Grenoble, France
2) Laurence Comparat, Grenoble, France
3) Philippe Motte, Grenoble, France
4) Jok Ferrand, Mont St Martin, France
5) Emmanuelle Pignol, St Martin d'Hhres, France
6) Marie Gauthier, Grenoble, France
7) Laurent Vescalo, Grenoble, France
8) Mathieu Moy, St Egreve, France
9) Bernard Blanchet, Mont St Martin, France
10) Tassadite Favrie, Grenoble, France
11) Loic Godard, St Ismier, France
12) Benedicte Pascal, Grenoble, France
13) Khedaidja Benatia, Grenoble, France
14) Marie-Therese Lloret, Grenoble, France
15) Benoit Theau, Poitiers, France
16) Bruno Constantin, Poitiers, France
17) Christian Cognard, Poitiers, France
18) Robert Gardette, Paris, France
19) Claude Chevillard, Montpellier, France
20) Gilles Freiss, Montpellier, France
21) Patrick Augereau, Montpellier, France
22) Jean Imbert, Marseille, France
23) Jean-Claude Murat, Toulouse, France
24) Anna Bassols, Barcelona, Catalonia
25) Mireia Dunach, Barcelona, Catalonia
26) Michel Villaz, Grenoble, France
27) Frederique Pages , Dijon, France
28) Rodolphe Fischmeister, Chatenay-Malabry, France
29) Francois Bouteau, Paris, France
30) Patrick Peter, Paris, France
31) Lorenza Radici, Paris, France
32) Monika Siegenthaler, Bern, Switzerland
33) Mark Philp, Glasgow, Scotland
34) Tomas Andersson, Stockholm, Sweden
35) Jonas Eriksson, Stockholm, Sweden
36) Karin Eriksson, Stockholm, Sweden
37) Ake Ljung, Stockholm, Sweden
38) Carina Sedlmayer, Stockholm, Sweden
39) Rebecca Uddman, Stockholm, Sweden
40) Lena Skog, Stockholm, Sweden
41) Micael Folke, Stockholm, Sweden
42) Britt-Marie Folke, Stockholm, Sweden
43) Birgitta Schuberth, Stockholm, Sweden
44) Lena Dahl, Stockholm, Sweden
45) Ebba Karlsson, Stockholm, Sweden
46) Jessica Carlsson, Vaxjo, Sweden
47) Sara Blomquist, Vaxjo, Sweden
48) Magdalena Fosseus, Vaxjo, Sweden
49) Charlotta Langner, Goteborg, Sweden
50) Andrea Egedal, Goteborg, Sweden
51) Lena Persson, Stockholm, Sweden
52) Magnus Linder, Umea , Sweden
53) Petra Olofsson, Umea, Sweden
54) Caroline Evenbom, Vaxjo, Sweden
55) Asa Pettersson, Grimsas, Sweden
56) Jessica Bjork, Grimsas, Sweden
57) Linda Ahlbom Goteborg, Sweden
58) Jenny Forsman, Boras, Sweden
59) Nina Gunnarson, Kinna, Sweden
60) Andrew Harrison, New Zealand
61) Bryre Murphy, New Zealand
62) Claire Lugton, New Zealand
63) Sarah Thornton, New Zealand
64) Rachel Eade, New Zealand
65) Magnus Hjert, London, UK
67) Madeleine Stamvik, Hurley, UK
68) Susanne 

J2EE Store and transactions

2003-02-25 Thread Joseph Carew
I set up Slide and WebLogic 6.1 a couple of weeks ago with minimal
authentication issues.  I've got a newer build of Slide now and am getting
this error.  I'm using native Oracle 9i drivers and I've included my
connection pool and data source xml.  There doesn't seem to be any support
for the SupportsLocalTransaction attribute (you'll see I added it with no
effect) in the connection pool setup.
 
25 Feb 2003 08:42:39 - slidestore.j2ee.J2EEDescriptorsStore - ERROR -
java.sql.SQLException: SQL ope
rations are not allowed with no global transaction by default for XA
drivers. If the XA driver suppo
rts performing SQL operations with no global transaction, explicitly allow
it by setting SupportsLo
calTransaction JDBC connection pool property to true. In this case, also
remember to complete the l
ocal transaction before using the connection again for global transaction,
else a XAER_OUTSIDE XAExc
eption may result. To complete a local transaction, you can either set auto
commit to true or call C
onnection.commit() or Connection.rollback().
java.sql.SQLException: SQL operations are not allowed with no global
transaction by default for XA d
rivers. If the XA driver supports performing SQL operations with no global
transaction, explicitly a
llow it by setting SupportsLocalTransaction JDBC connection pool property
to true. In this case, a
lso remember to complete the local transaction before using the connection
again for global transact
ion, else a XAER_OUTSIDE XAException may result. To complete a local
transaction, you can either set
 auto commit to true or call Connection.commit() or Connection.rollback().
at
weblogic.jdbc.jta.Statement.checkIfLocalTxSupported(Statement.java:106)
at
weblogic.jdbc.jta.PreparedStatement.executeQuery(PreparedStatement.java:61)
at
weblogic.jdbc.rmi.internal.PreparedStatementImpl.executeQuery(PreparedStatem
entImpl.java:
56)
at
weblogic.jdbc.rmi.SerialPreparedStatement.executeQuery(SerialPreparedStateme
nt.java:42)
at
slidestore.j2ee.J2EEDescriptorsStore.retrieveObject(J2EEDescriptorsStore.jav
a:198)
at
org.apache.slide.store.StandardStore.retrieveObject(StandardStore.java:171)
at
org.apache.slide.common.NamespaceConfig.getActionNode(NamespaceConfig.java:1
106)
at
org.apache.slide.common.NamespaceConfig.initializeNamespaceConfig(NamespaceC
onfig.java:59
6)
at
org.apache.slide.common.Namespace.loadConfiguration(Namespace.java:888)
at org.apache.slide.common.Domain.initNamespace(Domain.java:864)
at org.apache.slide.common.Domain.init(Domain.java:478)
at org.apache.slide.common.Domain.init(Domain.java:412)
at org.apache.slide.common.Domain.init(Domain.java:375)
at
org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:286)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:228)
at
weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java
:731)
at
weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.ja
va:658)
at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.jav
a:603)
at
weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletC
ontext.java:2
360)
at
weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServlet
Context.java:
2301)
at
weblogic.servlet.internal.HttpServer.preloadServlets(HttpServer.java:558)
at
weblogic.servlet.internal.WebService.preloadServlets(WebService.java:450)
at weblogic.t3.srvr.ServletInitRunner.run(ServletInitRunner.java:49)
at java.lang.Thread.run(Thread.java:479)
 
The relevant elements from config.xml:
JDBCConnectionPool CapacityIncrement=5
DriverName=oracle.jdbc.pool.OracleConnectionPoolDataSource
InitialCapacity=5 MaxCapacity=500 Name=realm1
Properties=user=icare75;password=icare75;dll=ocijdbc9;protocol=oci
Targets=myserver
SupportsLocalTransaction=true
URL=jdbc:oracle:oci:@kanaebiz/
JDBCTxDataSource EnableTwoPhaseCommit=true
JNDIName=KANA/jdbc/realm1 Name=realm1 PoolName=realm1
Targets=myserver/
 
And the Domain.xml:
store name=j2ee
nodestore classname=slidestore.j2ee.J2EEDescriptorsStore
parameter
name=datasourceKANA/jdbc/realm1/parameter
/nodestore


 
 

 


RE: J2EE Store and transactions

2003-02-25 Thread Joseph Carew
I got past the original problem by using a non-transactional data source and
another problem (the J2EEStore class was pretending java:comp/env to the
beginning of the data source name) and yet another one that was a result of
the J2EEStore not creating the tables (the how-to for JDBC indicates that
it's done for you, the how-to for J2EE does not and it really didn't).  I
made the getDatabaseCreateStatements method of JDBCDescriptorStore public
and got the commands from there.  Then, those statements failed because the
varchar field sizes indicated in the Slide documentation (3200) is not what
is in the code (65536).  

Am I breaking new ground here (WebLogic/J2EE/Oracle)?  I find it hard to
believe that no one, if I trust the searches of the mailing list archives,
has run into these problems.  Has anyone included Slide in a commercially
viable product that isn't using only Apache sub-projects to support it?

Thanks
Joe

-Original Message-
From: Joseph Carew 
Sent: Tuesday, February 25, 2003 08:58
To: '[EMAIL PROTECTED]'
Subject: J2EE Store and transactions


I set up Slide and WebLogic 6.1 a couple of weeks ago with minimal
authentication issues.  I've got a newer build of Slide now and am getting
this error.  I'm using native Oracle 9i drivers and I've included my
connection pool and data source xml.  There doesn't seem to be any support
for the SupportsLocalTransaction attribute (you'll see I added it with no
effect) in the connection pool setup.
 
25 Feb 2003 08:42:39 - slidestore.j2ee.J2EEDescriptorsStore - ERROR -
java.sql.SQLException: SQL ope
rations are not allowed with no global transaction by default for XA
drivers. If the XA driver suppo
rts performing SQL operations with no global transaction, explicitly allow
it by setting SupportsLo
calTransaction JDBC connection pool property to true. In this case, also
remember to complete the l
ocal transaction before using the connection again for global transaction,
else a XAER_OUTSIDE XAExc
eption may result. To complete a local transaction, you can either set auto
commit to true or call C
onnection.commit() or Connection.rollback().
java.sql.SQLException: SQL operations are not allowed with no global
transaction by default for XA d
rivers. If the XA driver supports performing SQL operations with no global
transaction, explicitly a
llow it by setting SupportsLocalTransaction JDBC connection pool property
to true. In this case, a
lso remember to complete the local transaction before using the connection
again for global transact
ion, else a XAER_OUTSIDE XAException may result. To complete a local
transaction, you can either set
 auto commit to true or call Connection.commit() or Connection.rollback().
at
weblogic.jdbc.jta.Statement.checkIfLocalTxSupported(Statement.java:106)
at
weblogic.jdbc.jta.PreparedStatement.executeQuery(PreparedStatement.java:61)
at
weblogic.jdbc.rmi.internal.PreparedStatementImpl.executeQuery(PreparedStatem
entImpl.java:
56)
at
weblogic.jdbc.rmi.SerialPreparedStatement.executeQuery(SerialPreparedStateme
nt.java:42)
at
slidestore.j2ee.J2EEDescriptorsStore.retrieveObject(J2EEDescriptorsStore.jav
a:198)
at
org.apache.slide.store.StandardStore.retrieveObject(StandardStore.java:171)
at
org.apache.slide.common.NamespaceConfig.getActionNode(NamespaceConfig.java:1
106)
at
org.apache.slide.common.NamespaceConfig.initializeNamespaceConfig(NamespaceC
onfig.java:59
6)
at
org.apache.slide.common.Namespace.loadConfiguration(Namespace.java:888)
at org.apache.slide.common.Domain.initNamespace(Domain.java:864)
at org.apache.slide.common.Domain.init(Domain.java:478)
at org.apache.slide.common.Domain.init(Domain.java:412)
at org.apache.slide.common.Domain.init(Domain.java:375)
at
org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:286)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:228)
at
weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java
:731)
at
weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.ja
va:658)
at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.jav
a:603)
at
weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletC
ontext.java:2
360)
at
weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServlet
Context.java:
2301)
at
weblogic.servlet.internal.HttpServer.preloadServlets(HttpServer.java:558)
at
weblogic.servlet.internal.WebService.preloadServlets(WebService.java:450)
at weblogic.t3.srvr.ServletInitRunner.run(ServletInitRunner.java:49)
at java.lang.Thread.run(Thread.java:479)
 
The relevant elements from config.xml:
JDBCConnectionPool CapacityIncrement=5
DriverName=oracle.jdbc.pool.OracleConnectionPoolDataSource

RE: Slide and JBoss Authentication

2003-02-25 Thread James Higginbotham
Ok.. I needed it today, so I went ahead and wrote it and javadoc'ed its
use for those interested. Hopefully, the slide maintainers will change
the package to whatever they like, update the single javadoc like that
refs the package, and commit this into CVS. I built it against JBoss
3.0.4 but it should work for any 3.0.x and probably 3.2/4.0+ - AFAIK,
they aren't changing the security APIs on those trees. 

Slide maintainers - please let me know if there is a preferred way for
me to submit contribs in the future.. It's a small file, so I figured
attaching here would be ok for now.

Regards,
James

 -Original Message-
 From: Adam Booth [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, February 25, 2003 3:20 AM
 To: James Higginbotham; Slide Users Mailing List
 Subject: RE: Slide and JBoss Authentication
 
 
 Hi James,
 
 I haven't put the JBoss login module together yet but will be 
 in the next week or so, whenever I get some time. I'll post 
 when its ready so you can get a copy. If in the mean time 
 anyone happens across one that is already done...
 
 Cheers,
 Adam
 
 -Original Message-
 From: James Higginbotham [mailto:[EMAIL PROTECTED]
 Sent: 25 February 2003 00:30
 To: Slide Users Mailing List; Adam Booth
 Subject: RE: Slide and JBoss Authentication
 
 
 Adam,
 
 Did you ever compose that JBoss login module? Just wondering 
 if someone submitted one to you or if you composed one that 
 you could share.. 
 
 Thanks,
 James
 
  -Original Message-
  From: Adam Booth [mailto:[EMAIL PROTECTED]
  Sent: Thursday, February 13, 2003 4:47 AM
  To: [EMAIL PROTECTED]
  Subject: Slide and JBoss Authentication
  
  
  Hi all,
  
  I'm in the process of deploying slide with JBoss 3.0 / Jetty
  using realm authentication. I was wonder if anyone has 
  already done this and written the custom authentication class 
  needed. If so would it possible get a copy. Any assistance 
  would be greatly appreciated.
  
  Thanks
  
  Adam
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: Versioning woes (resolved)

2003-02-25 Thread James Higginbotham
Apparently, when obtaining revision information, a lockcheck is
required. If there isn't a principal associated to the client, then the
lock check fails (no user to do a role check against). The JBoss login
module I submitted to the list previous to this email allows me to
authenticate and now see the revisions and content for files submitted
to Slide (even via Microsoft web folders). 

As a followup question then, why is the lock check required for
obtaining revision info for a file? Is this something in the spec I
don't understand or just something that was determined necessary to the
internals of Slide?

Thanks,
James

 -Original Message-
 From: James Higginbotham 
 Sent: Monday, February 24, 2003 7:19 AM
 To: Slide Users Mailing List
 Subject: RE: Versioning woes
 
 
 Thanks Martin and Peter for your quick responses.. After some 
 further debugging, I've found the following issues:
 
 1) It seems that lockHelper.checkLock() doesn't honor the 
 xxx.xxx.security=false property, so its failing and throwing 
 an exception
 2) The tags seem to want to use the Delta/V revisions, as if 
 this check would pass, it would call revisionDescriptors = 
 objectUri.getStore().retrieveRevisionDescriptors(objectUri);
 3) Not sure what this means (ContentImpl:204):
 // FIXME: createRevisionDescriptors shouldn't be 
 done in this read-only method
 objectUri.getStore()
 .createRevisionDescriptors(objectUri,
 revisionDescriptors);
 
 I'll look into how much work it would take to make the lock 
 helper support the flag, followed by turning on auth if that 
 seems to be too tough (shouldn't be, it's a props file!)
 
 Best Regards,
 James
 
 
 
  -Original Message-
  From: Nevermann, Dr., Peter [mailto:[EMAIL PROTECTED]
  Sent: Monday, February 24, 2003 6:27 AM
  To: 'Slide Users Mailing List'
  Subject: RE: Versioning woes
  
  
   I have been using a daily build from Nov 13th and just
  upgraded to the
   Feb 23rd daily build.. When using either memory or hsql stores for
   either version, I cannot seem to get the versioning to show 
  up using
   the struts tag lib slide:node tag. All I see is a node 
 that says 
   versioned == false, and the list of revisions returned from the 
   taglib is empty..
   Since this is happening, I cannot pull the content back for 
  the latest
   revision using the tags, nor the properties for the latest
   revision. 
  
  I'm not very aware of the taglib, but as far as I could see,
  the taglib accesses directly the, let me call it Slide Core 
  API, i.e. the layer of the helpers. As DeltaV is mainly 
  implemented in the WebDAV layer, the taglib probably is not 
  yet able to access the DeltaV-related data.
  Example: if you are accessing a DeltaV-versioned resource at 
  /files/foo.txt (a VCR in DeltaV terminology), this resource - 
  viewed as Slide resource - is
  *not* versioned. The list of revisions is in the associated 
  *history* resource (the VHR) at, say, /history/17. The URI of 
  the history resource can be derived from the value of the 
  DAV:checked-in property of VCR.
  
   So, I am assuming:
   
   1) That versioning isn't working.. I don't believe this 
 is the case, 
   as I've turned it on in the Domain.xml and I am seeing 
 files showing 
   up under the history directory.. I don't have a Delta/V client
  other than
   the web interface I'm building and any metadata SkunkDAV is
  seeing...
   Any good windows clients out there that support Delta/V I can
   use to try
   and confirm this possible bug?
  
  Try either of the following FREE protocol-level tools: 
 Tamino WebDAV 
  BasicClient 1.1.1 at: 
  http://developer.softwareag.com/tamino/webdav/default.htm
  or
  NetTool at:
  http://sourceforge.net/project/showfiles.php?group_id=55568re
  lease_id=11544
  4
  
  I can recommend the 1st one :-).
  
   4) Versioning doesn't work without security being turned 
 on - I have 
   it turned off for now for quicker development
  
  By without security do you mean that you switched-off
  authentication in web.xml? I tried that but didn't get any 
  problems. Could you please send details (stack traces, log 
  files, etc.)?
  
   I am seeing the following properties via SkunkDAV:
   
   host  localhost
   port  8080
   name  
  /slide/files/sites/www.calvaryaustin.org/xml/homepage/home.xml
   creation date 2003-02-24T01:09:49Z
   last modified dateMon, 24 Feb 2003 01:09:49 GMT
   content type  text/xml
   content length405
   content language  en
   display name  home.xml
   resource type 
   etag  397939377_48563_405
   supported locks   Lock [scope=exclusive, type=write], 
   Lock [scope=shared,
   type=write]
   active locks  
   links 
   
   Should I be seeing some properties related to versioning at all?
  
  No, as specified in the RFC 3253 (DeltaV), the DeltaV-related
  properties are not shown in a DAV:allprop PROPFIND request 
  and are to be requested 

RE: Slide and JBoss Authentication

2003-02-25 Thread James Higginbotham
Sorry, Outlook ate the attachment.. Pasting inline.. 

SlideLoginModule.java:

package org.calvaryaustin.jbossext;

import java.security.Principal;
import java.security.acl.Group;
import java.util.Enumeration;
import java.util.Map;

import javax.security.auth.Subject;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.login.LoginException;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.slide.authenticate.CredentialsToken;
import org.apache.slide.authenticate.SecurityToken;
import org.apache.slide.common.Domain;
import org.apache.slide.common.NamespaceAccessToken;
import org.apache.slide.common.SlideException;
import org.apache.slide.common.SlideToken;
import org.apache.slide.common.SlideTokenImpl;
import org.apache.slide.content.Content;
import org.apache.slide.content.NodeProperty;
import org.apache.slide.content.NodeRevisionDescriptor;
import org.apache.slide.content.NodeRevisionDescriptors;
import org.apache.slide.security.Security;
import org.apache.slide.structure.ObjectNode;
import org.jboss.security.SimpleGroup;
import org.jboss.security.SimplePrincipal;
import org.jboss.security.auth.spi.UsernamePasswordLoginModule;

/**
 * A custom JBoss 3.x login module that talks directly to the Slide
kernel to authenticate
 * a user. The module adheres to the internal JBoss mechanism for
establishing an authenicated
 * user's credentials. Thus, calls to hasRole() from the servlet API are
honored and checks for
 * 'user', 'guest', and 'root' can be made from the web tier. 
 * p
 * To setup this login module:
 *   ol
 * liEdit the JBoss login-config.xml and add the following entry
(substituting the namespace 
 *   based on the context you are deploying the war under):
 *pre
 *lt;application-policy name = SlideRealmgt;
 *  lt;authenticationgt;
 *   lt;login-module code =
org.calvaryaustin.jbossext.SlideLoginModule flag = requiredgt;
 *   lt;module-option name =
namespacegt;slidelt;/module-optiongt;
 *   lt;/login-modulegt;
 *  lt;/authenticationgt;
 *lt;/application-policygt;
 */pre
 * /li
 * liUncomment the security section in the web.xml for the slide
WAR/li
 * liChange the realm entry to read:
 *pre
 *lt;realm-namegt;SlideRealmlt;/realm-namegt;
 */pre
 * /li
 * liCompile this class, jar it up and place it under
$JBOSS_HOME/server/default/lib
 * (change default to all if you are using the clustering
configuration)/li
 * liDeploy the slide war with the updated web.xml descriptor and
sign in as root/root 
 *  (assuming a default installation of Slide)/li
 *   /ol
 * /p  
 * @author a href=mailto:[EMAIL PROTECTED]James
Higginbotham/a
 */
public class SlideLoginModule extends UsernamePasswordLoginModule
{

   /**
* Initializes the login module with the references to its
environment
* @see javax.security.auth.spi.LoginModule#initialize(Subject,
CallbackHandler, Map, Map)
*/
public void initialize(Subject subject, CallbackHandler
callbackHandler, 
Map sharedState, Map
options)
{
super.initialize(subject, callbackHandler, sharedState,
options);

// init the namespace using the module's config 
String namespace = (String) options.get(namespace);
log.debug(SlideLoginModule initializing...);

// create an access token
if (accessToken == null)
accessToken = Domain.accessNamespace
(new SecurityToken(this), namespace);

if (accessToken == null)
throw new IllegalStateException
(Invalid Slide Realm configuration : 
 + Couldn't access namespace  + namespace);

// initialize other Slide helpers
contentHelper = accessToken.getContentHelper();
securityHelper = accessToken.getSecurityHelper();

usersPath = accessToken.getNamespaceConfig().getUsersPath();
log.debug(SlideLoginModule initialized...);
}

/**
 * Return the password for the current username that is being
authenticated
 * @see
org.jboss.security.auth.spi.UsernamePasswordLoginModule#getUsersPassword
()
 */
protected String getUsersPassword() throws LoginException
{
String username = getUsername();
log.debug(SlideLoginModule getUsersPassword() for +username);
if( username == null )
{
// no sense in looking up /users/null...
return null;
}
Principal userPrincipal = getPrincipal(username);
CredentialsToken credToken = new
CredentialsToken(userPrincipal);
SlideToken slideToken = new SlideTokenImpl(credToken);

// Fetch the Slide object representing the user.
try {

ObjectNode user = securityHelper.getPrincipal(slideToken);

} catch (SlideException e) {