You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2013/09/15 00:16:08 UTC
[Bug 55559] New: UserDatabaseRealm enhacement: may use local JNDI
https://issues.apache.org/bugzilla/show_bug.cgi?id=55559
Bug ID: 55559
Summary: UserDatabaseRealm enhacement: may use local JNDI
Product: Tomcat 8
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P2
Component: Catalina
Assignee: dev@tomcat.apache.org
Reporter: outsider404@gazeta.pl
Created attachment 30841
--> https://issues.apache.org/bugzilla/attachment.cgi?id=30841&action=edit
Patch
DataSourceRealm may use global or local JNDI registry to look for resources,
but UserDatabaseRealm can use only global resources.
Tomcat has implemented authentication users agains XML file, and I wanted to
use that feature for my application. The problem is that thr file with users
must be registered in global Tomcat configuration file, but I wanted to have
the file managed by application, not a server.
Then I modified a class UserDatabaseRealm in similar manner as DataSourceRealm
is implemented. I also updated a documentation. Class MBeanUtils is modified to
avoid error on shutdown.
Patch is constructed against revision 93bcdde55f62c6598f0dde9de2a575705e6b5abb
(origin/trunk)
I could attach application for patch verification, but it seems to me that only
one attachement is allowed. However, main idea is allow the following
configuration in application META-INF/context.xml file:
<Context>
<Resource name="MyUserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase" description="User database that can
be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/example-users.xml" />
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="MyUserDatabase" localDataSource="true"/>
</Context>
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 55559] UserDatabaseRealm enhacement: may use local JNDI
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55559
--- Comment #3 from Michal Domagala <ou...@gazeta.pl> ---
Proposed test:
1. Copy the sample XML file to $(TOMCAT)/conf directory and name it
example-users.xml
2. Deploy sample application and try to open.
If everything is OK, browser ask you for username and password and only q/qq
will be accepted, as defined is sample XML file
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 55559] UserDatabaseRealm enhacement: may use local JNDI
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55559
--- Comment #2 from Michal Domagala <ou...@gazeta.pl> ---
Created attachment 30843
--> https://issues.apache.org/bugzilla/attachment.cgi?id=30843&action=edit
sample application
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 55559] UserDatabaseRealm enhacement: may use local JNDI
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55559
--- Comment #1 from Michal Domagala <ou...@gazeta.pl> ---
Created attachment 30842
--> https://issues.apache.org/bugzilla/attachment.cgi?id=30842&action=edit
sample XML file with user definition
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org