Re: How to hide a secret value in my Java code?

2023-10-04 Thread Richard Grin
Thanks to everyone who replied with different solutions, especially to Neil for this detailed explanation about how to use the actions. Le 04/10/2023 à 19:07, Neil C Smith a écrit : On Wed, 4 Oct 2023 at 10:16, Richard Grin wrote: Is it possible to add an environment variable for *only one*

RE: How to hide a secret value in my Java code?

2023-10-04 Thread Nelligan, Steven M
I use keepass and the command line interface to access passwords through java. Keepass would require a password and I also use a Key File(stored on a server), and by isolate this password in one class, you should be able to limit access to this one source. Steven M Nelligan From: Laszlo

Re: How to hide a secret value in my Java code?

2023-10-04 Thread Neil C Smith
On Wed, 4 Oct 2023 at 10:16, Richard Grin wrote: > Is it possible to add an environment variable for *only one* Java > project in NetBeans? ... > I use Maven to build the project. Incidentally, to do this with Maven projects, use the project properties. Under Actions, choose eg. `Run project`

Re: How to hide a secret value in my Java code?

2023-10-04 Thread Laszlo Kishalmi
Well, the zero secret problem (the secret which allows you to access further secrets), are usually solved by providing an environment. It could be as simple as an environment variable, or some confinement, entitled with policies. On 10/4/23 08:33, Richard Grin wrote: I answer your question:

RE: How to hide a secret value in my Java code?

2023-10-04 Thread Richard Grin
I answer your question: it could be, for example, a password of a user of a database, put in a Java variable or used in an annotation, or a secret key for an API. Any way of hiding the secret value in the source code would be appropriate., using Maven or nor. Envoyé depuis mon appareil

Re: How to hide a secret value in my Java code?

2023-10-04 Thread Alonso Del Arte
I suppose you could encrypt the value in a String field or function in one class and then have another class that decrypts that value. This would be a slightly more laborious version of hiding the key under the welcome mat, but not much safer. Maybe I'm misunderstanding. Is the secret value for