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: 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 Galaxy
-------- Message d'origine --------
De : Alonso Del Arte <alonso.dela...@gmail.com>
Date : 04/10/2023 16:49 (GMT+01:00)
À : Richard Grin <richard.g...@univ-cotedazur.fr>, NetBeans Mailing
List <users@netbeans.apache.org>
Objet : Re: How to hide a secret value in my Java code?
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 Maven's use?
Al
On Wed, Oct 4, 2023 at 5:16 AM Richard Grin
<richard.g...@univ-cotedazur.fr> wrote:
Hello,
Is it possible to add an environment variable for *only one* Java
project in NetBeans? I have added a Windows user variable in the
system
parameters but I find the process a bit cumbersome.
Is there a better way of hiding a secret value than using an
environment
variable?
A similar problem, but perhaps more difficult to solve: how to hide a
secret value used in an *annotation* in my code (I can't use
System.getenv).
I use Maven to build the project.
Kind regards,
Richard
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists