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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:00:00+00:00 2026-06-03T09:00:00+00:00

I have an existing Java web application running on Linux using embedded Jetty. The

  • 0

I have an existing Java web application running on Linux using embedded Jetty. The application is loaded using jsvc, which runs as root, listens on port 443, and relays requests to the Java app, which is run under a less privileged user “appname” on port 8443.

Currently, the application reads an encryption key from a file we’ll call “secrets.properties”. It is writable by “root”, and readable by “appname” (technically, by members of the “appname” group). My preference, however, would be that the file is only readable by “root”, and that jsvc reads the file and passes the contents of that file (or even just a single property) to the application. My goal is that if someone were able to subvert the app and gain system access with the app’s “appname” account, that they couldn’t retrieve the key.

Is that possible without having the key visible to someone running “ps -ex”?

  • 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-03T09:00:02+00:00Added an answer on June 3, 2026 at 9:00 am

    They may not be able to retrieve the key, but they would still be able to use it

    Since the attacker now controls the application, they could send any messages they want and whatever is signing/encrypting them would, believing that the application was uncompromised , dutifully sign or encrypt them. There is little point in doing this if you are merely trying to authenticate data coming from the application.

    No matter what, you’d be smart to revoke your keys if the server was compromised, so it doesn’t save you their either.

    Now, if your worried about the compromise of a long lived key allowing an attacker to read previously sent (but no longer stored in the app) messages , thats a different problem. I would suggest using a crypto system with perfect forward secrecy. TLS/SSL has this if you use authenticated Diffie-Helmen key exchange which are the schemes with ECDHE or DHE in them(e.g. ECDHE-ECDSA-AES128-GCM-SHA256 or TLS-DHE-RSA-with-AES-256-CBC-SHA)

    If for some reason your still worried about keys being compromised, you could write a proxy. It either could run as root or run as a different group and have the key handed to it. For TLS/SSL this is easy. For some custom encryption/signing system, who knows . But again, there is very little reason to want to do this.

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

Sidebar

Related Questions

I have an existing Java EE web application running on GlassFish 3.1. Sign in
I have existing Java application that is using Acegi for authentication/authorization. Our new web
I have an existing large(ish) PHP web app (using Apache and MySQL) which now
I'm refactoring an existing (Ajax) Java Web application, which currently holds lots of its
Let's say I have a running Java-based web application with 0 or more valid
I have been developed a web application using java servlet at server side and
I have existing Linux shared object file (shared library) which has been stripped. I
I have an existing application (say 'A') and I want to call a java
I have a Java EE application that has REST web services attached to it.
I am developing a dynamic web project j2ee web application using eclipse. I have

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.