Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8351661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:42:15+00:00 2026-06-09T08:42:15+00:00

I am developing a web application, and in the web.xml I have some queries

  • 0

I am developing a web application, and in the web.xml I have some queries for authentication process. So if a person sees the query he could easily have access to those tables of security. Is it possible to have access to my web.xml or I should not be worried at all?

To be more specific, I intorduced my security configuration in web.xml and in that security context file I have queries for authentication. Here is the part which I’m talking about (I’m using Spring Security)

<sec:authentication-manager alias="authenticationManager">
    <sec:authentication-provider>
        <sec:jdbc-user-service data-source-ref="dataSource"
            group-authorities-by-username-query="
                                    SELECT acg.ID, acg.GROUP_NAME, a.ROLE_NAME AS AUTHORITY 
                                    FROM USER_GROUP acg, USER_GROUP_MAPPING agm, PRINCIPAL_ROLE_MAPPING ga, ROLE a, INVESTOR_USER us
                                    WHERE us.USERNAME = ? and agm.USER_ID = us.ID and acg.ID = ga.PRINCIPAL_ID and acg.ID = agm.USER_GROUP_ID and ga.ROLE_ID = a.ID
                                "
            users-by-username-query="SELECT USERNAME,PASSWORD,IS_ACTIVE FROM INVESTOR_USER where USERNAME = ?"
            authorities-by-username-query="
                                    SELECT ua.PRINCIPAL_ID AS USERNAME, a.ROLE_NAME AS AUTHORITY 
                                    FROM PRINCIPAL_ROLE_MAPPING ua, ROLE a, INVESTOR_USER us 
                                    WHERE us.USERNAME = ? and ua.PRINCIPAL_ID = us.ID and ua.ROLE_ID = a.ID
                                " />

        <sec:password-encoder ref="passwordEncoder"/>                               
        <!-- <<<<<<<<<<<<<<<< Encoding Password >>>>>>>>>>>>>>>> -->
    </sec:authentication-provider>
</sec:authentication-manager>

Is it bad? Shouldn’t I be using it?

Please justify your answers with some references.
And of course, please enlighten me with other alternatives.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T08:42:17+00:00Added an answer on June 9, 2026 at 8:42 am

    Is web.xml accessible from client side?

    No. Why ? Because as per the Servlet Specification all accessible resources are exposed via servlets. If you haven’t explicitly defined a servlet (or a filter, or a listener) to handle/expose .xml resources you don’t need to worry.

    In general it is the web container’s responsibility to protect configuration resources. You can be fairly certain it does so successfully.

    The code you have given as an example is not your web.xml, but your security namespace config. This as the web.xml is also something you should not be worried about.

    In general a servlet container will not make anything publicly accesible unless you specifically tell it to.

    Is it bad? Shouldn’t I be using it?

    In general no its not bad. You can also conclude that if spring security supports SQL in its configuration then they also view it as a normal practice.

    As a personal preference however I tend to prefer using custom UserDetailsService and AuthenticationManager implementations to handle user authentication as this keeps database related code out of the security definitions. This however is just a preference.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im developing a web application in a maven project. I also have a second
Im Developing a web application which is very critical. So authentication has to be
I'm developing a web application and I'm using a gridview and sqldatasource. I have
I have been developing a web application with asp.net and I have smoe question
I'm developing a web application with asp.net and I have a file called Template.docx
I am developing a Java web application that bases it behavior through large XML
I am developing a web application about books. We all knows that books have
I am developing a web application, in which I have used session management to
I am developing a Java application that is to have two web interfaces: a
I am developing silverlight web part for sharepoint 2010. I have an xml file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.