How to use encrypted password in glassfish4 datasoruce - glassfish

I've created a data source in Glassfish 4 and I want to encrypt the password in the data source.So, is there any scenario to do this?

Instead of encrypting password I've used password alias in Glassfish 4.
create password alias
asadmin > create-password-alias
Enter the value for the aliasname operand > my_alias
Enter the alias password > *****
Enter the alias password again > *****
edit the JDBC Connection Pool Password property as
${ALIAS=my_alias}
Glassfish 4 JDBC Connection Pool Configuration
if anybody has another scenario, please mention it.

Related

Cannot connect to aws rds Postgresql using master password and username but pgAdmin works

I Cannot connect to AWS rds Postgresql using master password and username but pgAdmin connection with the certificate works perfectly.
My website, when it tries to connect to the database, says:
net::ERR_CONNECTION_TIMED_OUT
I ssh into my ec2 instance of the Elastic Beanstalk and it gives me the following error when I am trying to connect to the rds:
psql: error: FATAL: PAM authentication failed for user "user"
FATAL: pg_hba.conf rejects connection for host "111.11.1.11", user "user", database "database", SSL off
The command I use to connect is this:
psql --host=rds_endpoint --port=5432 --username=user --password --dbname=database
I changed the master password and still, it does not work.
Again, If I use pgAdming with ssl certificate and that token that it generates, the connection is successful and I have full access to the database.
Also, the command
nc -zv rds_endpoint 5432
gives the successfull result:
Ncat: Connected to 111.11.11.11:5432.
The master username is and password does not contain any special character.
Master username: user
I have had this issue when the password contained special characters. I need to escape them in the connection URL used in psql
Percent-encoding may be used to include symbols with special meaning in any of the URI parts, e.g., replace = with %3D.
https://www.postgresql.org/docs/11/libpq-connect.html#id-1.7.3.8.3.6

how to login in to psql with your admin details

hi am following the following tutorial
https://www.youtube.com/watch?v=qw--VYLpxG4&t=2224s
and when i add psql into my path and then type it into the terminal it asks for my administrator datails of which i give then it shows this
psql: error: FATAL: password authentication failed for user "aarushsharma"
how do i find out the password for aarushsharma?
try to change METHOD in pg_hba.conf file from md5 to trust, restart postgresql server and change your user password
ALTER USER aarushsharma WITH PASSWORD 'your_password';
and set METHOD to md5 again

The target principal name is incorrect. Cannot generate SSPI context (SPN in cmd prompt showing existing)

We are getting the above error when tried to connect Sql server
The target principal name is incorrect. Cannot generate SSPI context
In SQL error log , I found 2 can't register SPN and Windows 0x2098 error
In cmd prompt when I checked
setspn -l Sql_service_account
It returned 2 records, 1 with FQDN and another one with 1433 port number
Please guide me how to proceed now please.

Tectia SSH Logon via CMD with password as argument

hello I'm trying out Tectia 6.4 via cmd but I'm having trouble login in with password as argument. I always get the error "too many argument"
I tried
sftpg3.exe host password
sftpg3.exe host --password=password
sftpg3.exe host -p password
If i just enter host-name i get the prompt for the password in order to login. there no way to use password as argument in order to log in via cmd? I look into help and they have option for password but it does not seems to be working for me
Thanks
sftp3.exe --password=yourpassword username#host
Make sure your options are first and you are including your username#host in the command also.
optional -B file.txt where file.txt includes your FTP command to execute after connecting.
NOTE: Having your password in cleartext is considered a security risk.

PostgreSQL: Why can I connect to a user with a set password without having to give the password?

After creating a new user john with: CREATE USER john PASSWORD 'test';
CREATE DATABASE johndb OWNER john; I can connect to the PostgreSQL server with: psql -U john johndb The problem is that psql never asks me for the password. I realy need to know what's wrong, because of obvious reasons.
Your pg_hba.conf file probably has local connections set to "trust". The default contains a section like this:
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
This means that for all connections from the local machine, trust whatever the client says. If the client says "I am user john", then the server will permit that.
The PostgreSQL documentation has a whole section on the pg_hba.conf file.