[tomcat] 03/03: Remove deprecated JDBCRealm
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git commit c714bfdfbeb37a7fcc679143a35fd72ac40cdabf Author: Mark Thomas AuthorDate: Tue Sep 15 15:01:18 2020 +0100 Remove deprecated JDBCRealm --- build.xml | 1 - java/org/apache/catalina/mbeans/MBeanFactory.java | 32 - .../apache/catalina/mbeans/mbeans-descriptors.xml | 9 - java/org/apache/catalina/realm/JDBCRealm.java | 745 - .../apache/catalina/realm/LocalStrings.properties | 7 - .../catalina/realm/LocalStrings_de.properties | 3 - .../catalina/realm/LocalStrings_es.properties | 7 - .../catalina/realm/LocalStrings_fr.properties | 7 - .../catalina/realm/LocalStrings_ja.properties | 7 - .../catalina/realm/LocalStrings_ko.properties | 7 - .../catalina/realm/LocalStrings_zh_CN.properties | 7 - .../apache/catalina/realm/mbeans-descriptors.xml | 71 -- res/findbugs/filter-false-positives.xml| 19 +- webapps/docs/config/realm.xml | 126 webapps/docs/manager-howto.xml | 2 +- webapps/docs/realm-howto.xml | 113 webapps/docs/security-howto.xml| 4 - 17 files changed, 2 insertions(+), 1165 deletions(-) diff --git a/build.xml b/build.xml index 349c1d4..717912d 100644 --- a/build.xml +++ b/build.xml @@ -561,7 +561,6 @@ - diff --git a/java/org/apache/catalina/mbeans/MBeanFactory.java b/java/org/apache/catalina/mbeans/MBeanFactory.java index bf2970e..8ef53ce 100644 --- a/java/org/apache/catalina/mbeans/MBeanFactory.java +++ b/java/org/apache/catalina/mbeans/MBeanFactory.java @@ -323,38 +323,6 @@ public class MBeanFactory { /** - * Create a new JDBC Realm. - * - * @param parent MBean Name of the associated parent component - * @param driverName JDBC driver name - * @param connectionName the user name for the connection - * @param connectionPassword the password for the connection - * @param connectionURL the connection URL to the database - * @return the object name of the created realm - * - * @exception Exception if an MBean cannot be created or registered - * - * @deprecated This method will be removed in Tomcat 10. Use a - * DataSourceRealm instead. - */ -@Deprecated -public String createJDBCRealm(String parent, String driverName, -String connectionName, String connectionPassword, String connectionURL) -throws Exception { - -// Create a new JDBCRealm instance -org.apache.catalina.realm.JDBCRealm realm = new org.apache.catalina.realm.JDBCRealm(); -realm.setDriverName(driverName); -realm.setConnectionName(connectionName); -realm.setConnectionPassword(connectionPassword); -realm.setConnectionURL(connectionURL); - -// Add the new instance to its parent component -return addRealmToParent(parent, realm); -} - - -/** * Create a new JNDI Realm. * * @param parent MBean Name of the associated parent component diff --git a/java/org/apache/catalina/mbeans/mbeans-descriptors.xml b/java/org/apache/catalina/mbeans/mbeans-descriptors.xml index 913830f..9597210 100644 --- a/java/org/apache/catalina/mbeans/mbeans-descriptors.xml +++ b/java/org/apache/catalina/mbeans/mbeans-descriptors.xml @@ -105,15 +105,6 @@ type="int"/> - - - - http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -package org.apache.catalina.realm; - - -import java.security.Principal; -import java.sql.Connection; -import java.sql.Driver; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.Properties; - -import org.apache.catalina.LifecycleException; -import org.apache.tomcat.util.ExceptionUtils; - - -/** -* -* Implementation of Realm that works with any JDBC supported database. -* See the JDBCRealm.howto for more details on how to set up the database and -* for configuration options. -* -* For a Realm implementation that supports connection pooling and -* doesn't require synchronisation of authenticate(), -* getPassword(), roles() and -* getPrincipal() or the ugly connection logic use the -* DataSourceRealm. -* -* @author Craig R. McClanahan -* @author Carson McDonald -* @author Ignacio Ortega -* -* @deprecated Will be removed in Tomcat 10 onwards.
Re: Deprecated JDBCRealm
On Tue, Sep 15, 2020 at 3:26 PM Mark Thomas wrote: > On 15/09/2020 14:12, Konstantin Kolinko wrote: > > пн, 14 сент. 2020 г. в 21:53, Mark Thomas : > >> > >> All, > >> > >> I'd like to proposed the following: > >> - Deprecated the JDBCRealm in 7.0.x, 8.5.x and 9.0.x > >> - Remove the JDBCRealm in 10.0.x > >> > >> The reasons for this are: > >> - The JDBCRealm is single threaded > >> - The DataSourceRealm is a better solution > >> > >> Thoughts? > > > > +1 > > > > Looking at documentation [1], it may be improved: > > > > a) Change ordering. It would be better to list DataSourceRealm first, > > followed by JDBCRealm.. (Currently JDBCRealm is the first one). > > I'll fix that. > > > b) Explicitly mention that JDBCRealm uses a single connection in its > > own documentation. (Currently documentation for DataSourceRealm > > mentions it, but the one for JDBCRealm itself does not). > > And that. > > > BTW, JNDIRealm also does not mention that it uses a single connection. > > Only by default and we could/should change that. How about changing the > default to, say, 10? > I didn't get any feedback, so it's only in Tomcat 10. It seems risky to backport if it hasn't been really tested. Rémy > > Mark > > > > > > [1] https://tomcat.apache.org/tomcat-9.0-doc/config/realm.html > > > > Best regards, > > Konstantin Kolinko > > > > - > > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > > For additional commands, e-mail: dev-h...@tomcat.apache.org > > > > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > >
Re: Deprecated JDBCRealm
On 15/09/2020 14:12, Konstantin Kolinko wrote: > пн, 14 сент. 2020 г. в 21:53, Mark Thomas : >> >> All, >> >> I'd like to proposed the following: >> - Deprecated the JDBCRealm in 7.0.x, 8.5.x and 9.0.x >> - Remove the JDBCRealm in 10.0.x >> >> The reasons for this are: >> - The JDBCRealm is single threaded >> - The DataSourceRealm is a better solution >> >> Thoughts? > > +1 > > Looking at documentation [1], it may be improved: > > a) Change ordering. It would be better to list DataSourceRealm first, > followed by JDBCRealm.. (Currently JDBCRealm is the first one). I'll fix that. > b) Explicitly mention that JDBCRealm uses a single connection in its > own documentation. (Currently documentation for DataSourceRealm > mentions it, but the one for JDBCRealm itself does not). And that. > BTW, JNDIRealm also does not mention that it uses a single connection. Only by default and we could/should change that. How about changing the default to, say, 10? Mark > > [1] https://tomcat.apache.org/tomcat-9.0-doc/config/realm.html > > Best regards, > Konstantin Kolinko > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Deprecated JDBCRealm
пн, 14 сент. 2020 г. в 21:53, Mark Thomas : > > All, > > I'd like to proposed the following: > - Deprecated the JDBCRealm in 7.0.x, 8.5.x and 9.0.x > - Remove the JDBCRealm in 10.0.x > > The reasons for this are: > - The JDBCRealm is single threaded > - The DataSourceRealm is a better solution > > Thoughts? +1 Looking at documentation [1], it may be improved: a) Change ordering. It would be better to list DataSourceRealm first, followed by JDBCRealm.. (Currently JDBCRealm is the first one). b) Explicitly mention that JDBCRealm uses a single connection in its own documentation. (Currently documentation for DataSourceRealm mentions it, but the one for JDBCRealm itself does not). BTW, JNDIRealm also does not mention that it uses a single connection. [1] https://tomcat.apache.org/tomcat-9.0-doc/config/realm.html Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Deprecated JDBCRealm
2020年9月15日(火) 3:53 Mark Thomas : > All, > > I'd like to proposed the following: > - Deprecated the JDBCRealm in 7.0.x, 8.5.x and 9.0.x > - Remove the JDBCRealm in 10.0.x > > The reasons for this are: > - The JDBCRealm is single threaded > - The DataSourceRealm is a better solution > > Thoughts? > > +1 > Mark > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > > -- Keiichi.Fujino
Re: Deprecated JDBCRealm
On Mon, Sep 14, 2020 at 9:53 PM Mark Thomas wrote: > All, > > I'd like to proposed the following: > - Deprecated the JDBCRealm in 7.0.x, 8.5.x and 9.0.x > - Remove the JDBCRealm in 10.0.x > > The reasons for this are: > - The JDBCRealm is single threaded > - The DataSourceRealm is a better solution > > Thoughts? > +1 > > Mark > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > >
Re: Deprecated JDBCRealm
Am 14. September 2020 20:53:15 MESZ schrieb Mark Thomas : >All, > >I'd like to proposed the following: >- Deprecated the JDBCRealm in 7.0.x, 8.5.x and 9.0.x >- Remove the JDBCRealm in 10.0.x > >The reasons for this are: >- The JDBCRealm is single threaded >- The DataSourceRealm is a better solution > >Thoughts? Good idea Felix > >Mark > >- >To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org >For additional commands, e-mail: dev-h...@tomcat.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Deprecated JDBCRealm
Easy choice. +1 On Mon, Sep 14, 2020 at 11:53 Mark Thomas wrote: > All, > > > > I'd like to proposed the following: > > - Deprecated the JDBCRealm in 7.0.x, 8.5.x and 9.0.x > > - Remove the JDBCRealm in 10.0.x > > > > The reasons for this are: > > - The JDBCRealm is single threaded > > - The DataSourceRealm is a better solution > > > > Thoughts? > > > > Mark > > > > - > > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > > For additional commands, e-mail: dev-h...@tomcat.apache.org > > > >
Deprecated JDBCRealm
All, I'd like to proposed the following: - Deprecated the JDBCRealm in 7.0.x, 8.5.x and 9.0.x - Remove the JDBCRealm in 10.0.x The reasons for this are: - The JDBCRealm is single threaded - The DataSourceRealm is a better solution Thoughts? Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org