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 6676379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:58:50+00:00 2026-05-26T03:58:50+00:00

I am working on an application that will be used by schools. Each school

  • 0

I am working on an application that will be used by schools. Each school will set up their on database. And each school will provide their own “settings” file to the application. The settings file will contain the database url for the specific school who made the settings file. This is so that a student using the application can just load a different settings file if they want to connect to a different database.

My question is, how do i protect the username and password used to connect to the database? So, that ONLY the application has read and write access to the database. And the application has read and write access to only that specific school?

If you need more information, please let me know.

Thanks

  • 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-05-26T03:58:51+00:00Added an answer on May 26, 2026 at 3:58 am

    Take a look at Jasypt, it is a java library which allows the developer to add basic encryption capabilities to his/her projects with minimum effort, and without the need of having deep knowledge on how cryptography works.

    In case you use Spring, you can define your db.properties as:

     jdbc.driver=com.mysql.jdbc.Driver
     jdbc.url=jdbc:mysql://localhost/yourdb
     jdbc.username=userName
     jdbc.password=ENC(A6L729KukPEx7Ps8didIUWb01fdBRh7d)
    

    and configure it with Jasypt and Spring as:

    <bean class="org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer">
       <constructor-arg>
         <bean class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
           <property name="config">
             <bean class="org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig">
               <property name="algorithm" value="PBEWithMD5AndDES" />
               <property name="passwordEnvName" value="APP_ENCRYPTION_PASSWORD" />
             </bean>
           </property>
         </bean>
       </constructor-arg>
       <property name="locations">
         <list>
           <value>classpath:/META-INF/props/db/db.properties</value>
         </list>
       </property>   
    </bean>
    
    <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
        <property name="driverClassName" value="${jdbc.driverClassName}"/>
        <property name="url" value="${jdbc.url}"/>
        <property name="username" value="${jdbc.username}"/>
        <property name="password" value="${jdbc.password}"/>
    </bean>
    

    This would hide the actual password (you can do the same for the username) from students, so they would not be able to derive the connection string from looking at the properties file.

    In case you are not using Spring, here is a Jasypt guide to achive the same “manually”

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

Sidebar

Related Questions

I am working on an application that will be used as an extensible framework
I'm working on a web application that will return a variable set of modules
I'm working on a java swing application that will be used in a psychology
I'm working on a .net application that will be used for auditing the configuration
I am working on a Sometimes Connected CRUD application that will be primarily used
I am working on a GUI application that will be used to perform manual
I'm working on an application that will gather data through HTTP from several places,
I'm working on an application that will have attachments, and I would like to
I am working on an application that will perform a search against an online
We are currently working on an application that will use a WCF service. The

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.