users@glassfish.java.net

Re: How can encript database password in Sun App. Server 9.1

From: <glassfish_at_javadesktop.org>
Date: Tue, 11 Nov 2008 21:18:53 PST

The asadmin create-password-alias command updates the domain.xml with the aliased password. You do not have to edit the domain.xml manually.
All you have to do is
1. create a password.txt in any location with the above entries
2. do a asadmin create-password-alias --port 4848 --user admin --passwordfile /opt/password.txt alias1
3. This command puts an entry like
<property name="password" value="${ALIAS=alias1}"/>

where alias1 is your encrypted password. The real password is never stored in clear in the domain.xml.
4. The password.txt contents are like
AS_ADMIN_PASSWORD=adminadmin (the password needed to start the domain or the administrative password)
AS_ADMIN_ALIASPASSWORD=mypassword (password that you need to encrypt ex:the database password that is stored in clear as of now in domain.xml that you want it replaced with alias)

Hope this is clear...
[Message sent by forum member 'sm157516' (sm157516)]

http://forums.java.net/jive/thread.jspa?messageID=316202