Users table in Postgres DB not synced while using LDAP in Hyperledger Fabric - postgresql

I am trying to register users, client and peers in Hyperledger Fabric network using Postgres as database and using LDAP for authentication.
Although I'm able to generate certificates successfully and everything is working well but still while i check into the Postgres database then the users table is empty and there is no entry in that table, while certificates table is propagated properly and have all the certificates that I have generated.
I have checked postgres database without integrating it with LDAP and then the users table is updating successfully and I can see user entries there.
Is it a normal behavior or I'm missing something?

Related

Mongodb and AWS EC2 security issue

I am trying to connect EC2 and mongodb .. But after the connection is made and database creation... I created a collection and saved some values but they are geting deleted after 48 hours and another database is visible stating all your data are backed up and you need to pay to get the data back else data will be leaked
Amazon EC2 ip adresses known by hackers. They are trying to join database servers which has no password protection. Their scripts tries all ip adresses and mongo db port. If has no protection then copy datas, delete datas and put the some message as pay money to us.
At this point, please search how to add authentication to mongo db server.

AWS RDS Postgres 11 database Connected to pgAdmin 4

Question
What extra do I get if I fix this and get access to the admin database? (MyDataBaseName normal database works perfectly well)
Do I even need to fix this to use this postgres database for a Django 3.0 project?
Done -> ERROR
I have created a free tear AWS RDS Postgres 11 database.
I allowed external connections at creation and have successfully configured the inbound rules.
Than I have connected to pgAdmin (right click on server groups/create/server)
Than I got 3 database:
MyDataBaseName how I have named my database
postgesql that is auto generated
rdsadmin this is also auto generated,
I have problem with this one that it doesn't opens,
it has a rex x at the database icon
if i click on it it gives the following ERROR message
INTERNAL SERVER ERROR
FATAL: SomeConfigFileName.conf rejects connection for host "host.ip.adders.actully.with.numbers", user "myPersonalUsername", database "rdsadmin", SSL on
FATAL: SomeConfigFileName.conf rejects connection for host "host.ip.adders.actully.with.numbers", user "myPersonalUsername", database "rdsadmin", SSL off
"rdsadmin" is used for internal purposes by AWS. There should be no need to "fix" this.
The only things you are missing is things you aren't allowed to do anyway, and indeed not needing to deal with them yourself is what you are paying Amazon for.
Django shouldn't care. If it demands access to this database, that would be a bug in Django (or a configuration error)

WSO2 Identity server - not able to see the users in database table UM_USER after changing the database to PostgreSQL

I have changed default database from H2 to PostgreSQL following the [WSO2]https://is.docs.wso2.com/en/latest/setup/changing-to-postgresql documentation and created tables using the db scripts.
I am able to run the WSO2 identity server and able to add the users using the management console.
But I can't see those users list in um_user table of postgreSQL. Even I can't find those users list in H2 Database also.
Find my deployment.toml file.
[database.identity_db]
type="postgre"
url="jdbc:postgresql://localhost:5432/wso2_identity_db"
username="postgres"
password="postgres"
[database.identity_db.pool_options]
maxActive="80"
maxWait="60000"
minIdle="5"
testOnBorrow=true
validationQuery="SELECT 1;COMMIT"
validationInterval="30000"
defaultAutoCommit=true
[database.shared_db]
type="postgre"
url="jdbc:postgresql://localhost:5432/wso2_shared_db"
username="postgres"
password="postgres"
[database.shared_db.pool_options]
maxActive="80"
maxWait="60000"
minIdle="5"
testOnBorrow=true
validationQuery="SELECT 1;COMMIT"
validationInterval="30000"
defaultAutoCommit=true
I am using the following versions of wso2 and postgreSQL.
WSO2 version = 5.9.0
PostgreSQL Version = 12
Can someone help me to debug this issue?
The identity DB stores the identity-related data such as tokens. Shared DB is responsible for storing registry data. But users are stored in a different location. They are user stores.By default users are stored in ReadWriteLDAP user store. As per your requirement you need to configure a JDBC user store as the primary user store. Please refer to the following documentation. It has the specific configurations related to PostgreSQL user store
https://is.docs.wso2.com/en/5.9.0/setup/configuring-a-jdbc-user-store/

How to create database template on azure postgresql service

While using the database service for postgresql om azure, it looks like it is not possible to create a custom template database.
What I want to achieve, is that a regular account, csn create new databases with a specific extension enabled.
The creation can be delegated, but the enabling of the extension fails in my test for all but the initial database admin account.
I've just tried the following in Azure Database for PostgreSQL and it worked (please bear with me as I walk you through my steps in Azure).
In Azure CLI (bash) followed steps in Quick Start for Azure PostgreSQL to create a new resource group > create a PG server in it > create a new DB (originaldb) on that PG server. All worked just fine.
Then I enabled a earthdistance and cube (pre-req for earthdistance) extensions for orginaldb (the DB I created in step 1).
Then I used CLI to create another DB (dbclone) using orginaldb as a template:
CREATE DATABASE dbclone TEMPLATE originaldb;
It worked just fine and cube and earthdistance extensions are enabled in dbclone DB.
Now on to trying it with another PG user: I created a PG user (user1) and granted this user DB creation privilege.
Then I logged on to my server as user1 and created another DB from CLI using the same command:
CREATE DATABASE dbclone2 TEMPLATE originaldb;
It worked too and I see that cube and earthdistance extensions are enabled in dbclone2 database.
Is that what you're trying to do? Are you hitting errors following the same steps or you're trying to do something different?

Running Heroku Postgres with least privilege

Can I connect to a Heroku Postgres database via an web/application without the risk of dropping a table?
I'm building a Heroku application for a third party which uses Heroku Postgres for the backend. The third party are very security sensitive so I'm looking at applying "Layered security" throughout the application. So for example checking for SQL injection attacks at the web/application layer. Applying a "Layered security" approach I should also secure the database in case a potential SQL injection attack is missed, which might drop a database table.
In other systems I have built there would be a minimum of two users in the database. Firstly the database administrator who creates/drops tables, index, triggers, etc and the application user who would run with less privileges than the database administrator who could only insert and update records for example.
Within the Heroku Postgres setup there doesn't appear to be a way to create another user with less privileges (without the “drop table” option). So the application must connect with the default Heroku Postgres user and therefore the risk of a “drop table” might exist.
I'm running the Heroku Postgres Crane add-on.
Has anyone come up against this or got any creative work arounds for this scenario?
With Heroku Postgres you do only have a single account to connect with. One option that does exist for this type of functionality is to create a follower on Heroku Postgres. A follower is asynchronously kept up to date (usually only a second or so behind) and is read only. This would allow you to grant access to the follower to those that need it while not providing them with the details for the leader db.