无需 SSL 即可远程访问 Heroku Postgres Hobby 层
Remote access to Heroku Postgres Hobby tier without SSL
为什么我可以在没有 SSL 的情况下访问 Heroku 中的 hobby-dev Postgres?
这是我的节点代码:
const { Client } = require('pg');
const connectionString = process.env.DATABASE_URL;
const client = new Client({
connectionString: connectionString,
ssl: false
})
heroku pg:credentials:url DATABASE
returns sslmode=require
但我也可以使用 psql DATABASE_URL
进行远程连接,而无需 sslmode=require
作为查询参数。
根据 Heroku docs and code samples it shouldn't be the case. The only thing that could explain it is that Heroku does not support encryption at rest on the Hobby tier 那么为什么要在运输途中呢?
我联系了 Heroku 支持,得到的答复是目前 未 在 server side
上强制执行
他们的数据团队确认这是 "known-but-undocumented" 的事情。不幸的是,这些文档具有误导性,例如here and here:
If you leave off sslmode=require you will get a connection error
静态加密与 Postgres 实例的安全连接关系不大。毕竟,'at rest' 与在客户端和数据库主机之间来回移动字节完全相反。
这几乎可以肯定是由于数据库主机本身的配置造成的,但不能肯定地说。据推测,这里的推理是为了降低使用该服务的难度,因为业余爱好层是免费的,并且受到业余爱好者和新开发人员的欢迎。
为什么我可以在没有 SSL 的情况下访问 Heroku 中的 hobby-dev Postgres?
这是我的节点代码:
const { Client } = require('pg');
const connectionString = process.env.DATABASE_URL;
const client = new Client({
connectionString: connectionString,
ssl: false
})
heroku pg:credentials:url DATABASE
returns sslmode=require
但我也可以使用 psql DATABASE_URL
进行远程连接,而无需 sslmode=require
作为查询参数。
根据 Heroku docs and code samples it shouldn't be the case. The only thing that could explain it is that Heroku does not support encryption at rest on the Hobby tier 那么为什么要在运输途中呢?
我联系了 Heroku 支持,得到的答复是目前 未 在 server side
上强制执行
他们的数据团队确认这是 "known-but-undocumented" 的事情。不幸的是,这些文档具有误导性,例如here and here:
If you leave off sslmode=require you will get a connection error
静态加密与 Postgres 实例的安全连接关系不大。毕竟,'at rest' 与在客户端和数据库主机之间来回移动字节完全相反。
这几乎可以肯定是由于数据库主机本身的配置造成的,但不能肯定地说。据推测,这里的推理是为了降低使用该服务的难度,因为业余爱好层是免费的,并且受到业余爱好者和新开发人员的欢迎。