集中凭证

发布于 2024-12-13 04:34:47 字数 796 浏览 1 评论 0原文

我正在寻找设置测试和暂存环境。我们有许多取决于环境的配置参数,即在测试环境中,它应该向 [email  ;protected] 在生产过程中,它应该发送电子邮件至 [电子邮件受保护]。此外,我们还使用许多第三方服务(即 Salesforce、PayPal),它们提供单独的凭据/URL 来访问测试环境。

我正在考虑创建一个安全的 Web 服务,该服务将根据请求 IP 地址返回给定密钥的值。即,如果请求来自测试服务器计算机,那么它将返回 [email protected]而如果相同的代码在生产中运行,它将返回 [email protected]

基本上,我想保留我的代码和配置部署更易于管理。

您能评论一下并提出建议吗?

I am looking to setup testing & staging environments. We have many config parameters that depends on environment i.e on test environment it should send out email to [email protected] while on production it should send email to [email protected]. Also, we are using many third-party services (i.e Salesforce, PayPal) that provides separate credentials/URL to access test environments.

I am thinking of creating a secured web service that will return value for a given key based on request IP address. i.e if request is from testing server machine then it will return [email protected] while if same code is running in production it will return [email protected]

Basically, I want to keep my code & config deployment easier to manage.

Can you please review and suggest?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

余生一个溪 2024-12-20 04:34:47

如果您考虑为每个环境配置的属性列表很小,那么您可以从构建环境中可靠地实现这一点,在该环境中构建可以从属性文件中获取所需的详细信息。然而,风险在于在开发环境中运行生产凭证,因此您需要小心。

IF the list of properties that you are considering to configure for each environment is small, then you can achieve that reliably from a build environment, where the build can pick up from properties file the required details. However the risk is running production credentials on a development environment, for that you need to be careful.

哥,最终变帅啦 2024-12-20 04:34:47

我认为您所描述的机制称为(企业)单点登录。也许已经有合适的解决方案可用?

如果没有合适的解决方案可用,我宁愿使用不同的哈希值来识别测试/生产服务器而不是 IP 地址,因为后者可以很容易地更改

I think the mechanism you're describing is known as (enterprise) single sign-on. Maybe there is a fitting solution already available?

If there isn't a fitting solution already available, I'd rather use different hashes to identify test/production server instead of IP address, because the latter can change quite easily

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文