1
是否有可能檢查(如不根源的用戶/ SQL問題)來檢查,如果我從客戶端到服務器的連接使用SSL(我的目標服務器cas使用兩者 - 安全和不安全的連接)?Postgresql - 100%肯定會與服務器使用SSL連接?
是否有可能檢查(如不根源的用戶/ SQL問題)來檢查,如果我從客戶端到服務器的連接使用SSL(我的目標服務器cas使用兩者 - 安全和不安全的連接)?Postgresql - 100%肯定會與服務器使用SSL連接?
爲9.5:
https://www.postgresql.org/docs/current/static/monitoring-stats.html#PG-STAT-SSL-VIEW
的pg_stat_ssl視圖可以包含每後端或WAL發送 處理一行,顯示關於該連接上的SSL使用的統計信息。可以將 連接到pid列 上的pg_stat_activity或pg_stat_replication以獲取有關該連接的更多詳細信息。上述
t=# set role notsu ;
SET
Time: 9.289 ms
t=> select * from pg_stat_ssl where pid = pg_backend_pid();
pid | ssl | version | cipher | bits | compression | clientdn
-------+-----+---------+--------+------+-------------+----------
43767 | f | | | | |
(1 row)
Time: 10.846 ms
t=> \du+ notsu
List of roles
Role name | Attributes | Member of | Description
-----------+------------+-----------+-------------
notsu | | {} |
顯示我的連接不是SSL
答案取決於你使用的是PostgreSQL客戶端上。 –
對於任何libpq客戶端,對於PgJDBC,'sslmode = require'或最好是'sslmode = verify-full'。其他客戶可能有所不同 –