DB auth issue
In sensor log error:
"unable to decrypt the password" and DB connect is failing"
with ./manager we can decrypt the password but starting the service it failing with decrypt.
Workaround:
update the unravel properties file with decrypted password and restarted the service.
restart unravel service
Related
I am following this guide to make remote JMS listener, it works fine.
I need to use the hashed password value in the pooled-connection-factory.
But I don't want to use the plain password in the password param, I tried with hashed password value it is not allowing to connect.
Is there any way to use the management user encrypted password ?
Exception:
org.jboss.resteasy.spi.UnhandledException:
javax.jms.JMSSecurityException: AMQ229031: Unable to validate user
from /127.0.0.1:61662. Username: testuser; SSL certificate subject DN:
Code:
<pooled-connection-factory name="remote-artemis" entries="java:/jms/remoteCF" connectors="remote-artemis" user="testuser" password="16b322f4cfe1023d67ecc13d626cb32c"/>
If you are using elytron you can use:
https://wildfly-security.github.io/wildfly-elytron/blog/wildfly-encrypted-expressions/
For older WildFly there is the vault, which is removed now:
https://subscription.packtpub.com/book/networking-and-servers/9781784392413/11/ch11lvl1sec97/securing-and-protecting-passwords-using-a-vault
I want to connect to the heroku postgres database I have set up using spring boot java. But before that I wanted to try and connect using pgAdmin 4. When I tried this I got an error saying the authentication for the 'username' had failed.
Then I started adding the database to my application.proporties file in spring boot to test it there. I got the samen error message.
This is the error message I got in spring boot: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "username".
I then even tried it in DBeaver. But still the same error.
heroku postgres credentials
application.properties in spring boot java
I checked multiple times if the password and username are the same. I really don't know what to do now, because I can't find any documantation on the heroku website
I'm NO EXPERT but I did have the same problem. I think I fixed it on the page with fields for Host, Port, Maintenance database, Username, Password, ... and then by toggling "save password."
when creating a new connection and when inserting the password for the username in mysql workbench i'm getting the error of "Could not encrypt password cache"
can anyone suggest a solution ?
That's part of the security concept in Windows. Once you encrypted data with a specific user, only this user can also decrypt it. It's not possible to use a different user, even if that was created with the same name + password.
You have to remove the password vault from the MySQL Workbench data dir and enter (and store) the MySQL password(s) again.
Following the instructions here, I'm having problem connecting to the DB from Azure Data Studio using the token I generate. It connects to the DB successfully, but as soon as I want to run a simple query ( I already gave my user read access there), it gives me this connection error, and I need to connect using the token again and the disconnection happens again randomly after a short while:
FATAL: Cloud SQL IAM user authentication failed for user
"user#company.com" FATAL: pg_hba.conf rejects connection for host
"...", user "user#company.com", database "db-name",
SSL off
I did some search and found there is also a way of logging in with IAM database authentication using the Cloud SQL Auth proxy but the documentation is limited to Postgress command line and not a GUI database tool like Azure Data Studio. Can anyone shed some light on this about what's needed if you want to connect with a GUI tool in this case?
And about changing the pg_hba.conf file, since I work with a cloud SQL instance, I'm not sure how to turn sslmode off on the cloud instance. I checked the connection tab of my instance and SSL encryption wasn't checked there (not sure if that's the same),and I changed the sslmode to disable on my Azure Data Studio for the connection but it won't allow me to connect after this change:
FATAL: pg_hba.conf rejects connection for host "*.*.*.*", user "user#company.com", database "database", SSL off
Help, anyone?
I've found the answer: we can connect using IAM database authentication using the Cloud SQL Auth proxy. The only step after to be done from the GUI DB tool (mine is Azure Data Studio) would be, to connect to the IP (127.0.0.1 in my case)the Cloud SQL Auth proxy listens on(127.0.0.1 is the default) after starting the Cloud SQL Auth proxy using:
./cloud_sql_proxy -instances=<GCPproject:Region:DBname>=tcp:127.0.0.1:5432
When trying to connect to my postgres server in Azure from psql client, I get the following error, even though I am using the correct username. How can I fix this?
psql: FATAL: Invalid Username specified. Please check the Username and retry connection. The Username should be in <username#hostname> format.
As noted in the error text, you are required to follow the <username#hostname> format when trying to connect to postgresql server, whether you are doing it from psql client or using pgadmin. Using <username#hostname> format instead of just <username> should get rid of the error.
Read the quick-start documents for Azure portal and CLI to understand more about how to create and configure your postgres server.
The # sign in username works fine for objects but not connect strings. According to URI RFC-3986 username allows hex encoding. So replace the # with %40. user#host:pw#fullhost becomes user%40host:pw#fullhost