OpenAI

如何保障 OpenAI 帐户的安全?

遵循这些最佳实践,保护你的帐户免受欺诈威胁。

更新于:2 hours ago

概览

使用 OpenAI 服务时,确保你的 API 密钥和账户安全非常重要。遵循这些最佳实践,防范 API 密钥泄露和账户盗用。

如果你担心自己的账户或 API 密钥已被泄露,请立即联系 OpenAI 支持团队。你可以在任意帮助中心页面的右下角发起新聊天,联系 OpenAI 支持。

保障你的账户安全

安全是共同的责任。OpenAI 致力于保护账户访问安全,以下步骤有助于降低未经授权使用的风险。如果账户凭据未经许可被使用,请尽快报告该问题。

使用高强度且唯一的登录凭据

如果你使用密码,请使用一个不会在其他网站重复使用的唯一密码。我们建议你使用密码管理器来生成和存储密码。如果你认为自己的密码已泄露、在其他地方重复使用或已共享,请立即更改密码。

启用多因素身份验证 (MFA)

启用多因素身份验证 (MFA),以便在登录时增加另一道验证步骤。如需了解更多信息,请参阅启用或禁用多因素身份验证 (MFA)。即使有人获取了你的密码,也仍需通过第二重验证才能访问你的账户。启用 MFA 不会使现有的登录会话失效。若要阻止已在访问你账户的用户,请先重置密码,然后启用 MFA。如果你希望获得基于硬件的账户保护,并且还没有安全密钥,符合条件的 OpenAI 用户可以了解 OpenAI + Yubico YubiKey 套装。如需了解详情,请参阅:OpenAI + Yubico YubiKey 套装。

使用高级账户安全功能

对于符合条件的个人 ChatGPT 账户,高级账户安全功能会增加更严格的登录要求和账户安全保护措施。如需了解更多信息,请参阅高级账户安全保护。此功能不适用于 ChatGPT Enterprise 用户、企业管理的账户,或与企业管理域名关联的账户。

谨慎对待电子邮件和链接

请谨慎对待要求提供凭据,或引导用户访问需要提供账户详细信息的网页的电子邮件。

务必仔细核实电子邮件地址和 URL,确保它们来自可信来源。

Review account activity and manage sessions

Security history shows past security events. Use Active sessions to review and manage current sessions.

Review your security history

Security history shows recent security events for your OpenAI account. Examples include sign-ins, sign-outs, password changes, and changes to multi-factor authentication (MFA), passkeys, and other security settings.

To open your security history on the web:

  1. In ChatGPT, go to Settings.

  2. Select Security and login.

  3. Select Security history.

Review the event type and time alongside the location and device details. Some details may be approximate or unavailable.

If you see activity you didn’t perform or authorize, follow the steps in Respond to a suspected compromise.

退出所有会话

你可以退出所有设备上的所有活跃会话。如需查看相关说明,请参阅退出所有会话。

在 ChatGPT 中:

  1. 进入“设置”

  2. 选择“安全”。

  3. 选择“活跃会话”。

  4. 找到“退出所有会话”。

  5. 选择“全部退出登录”。

  6. 在确认弹窗中,选择“在所有设备上退出登录”。

该操作会让你退出所有设备上的所有活跃会话,包括当前会话。最多可能需要 30 分钟。在 Platform 中,前往“个人资料” > “安全”,然后选择“在所有设备上退出登录”。其他 ChatGPT 会话最长可能需要 30 分钟才会退出登录。

Protect your API keys

If you use the OpenAI API, protect your API keys as well as your sign-in credentials. An exposed API key can allow unauthorized API usage through your account, which can result in charges or activity that violates our terms of service.

Use environment variables

Store your API key in environment variables within your development environment. This helps keep the key out of application code and reduces the risk of exposure.

If you use GitHub Actions, use GitHub secrets to store your API key.

请勿分发 API 密钥

对于移动应用或类似使用场景,为了省去运行服务器的麻烦,你可能会想直接将 API 密钥嵌入应用。不过,这会使该 API 密钥容易被滥用。

谨慎使用第三方产品

使用请求访问你 API 密钥的第三方库、框架或工具时,请务必保持谨慎。即使某个产品看似信誉良好,也仍然存在密钥泄露或滥用的风险。

在使用需要获取你 API 密钥的第三方产品之前,请仔细审查该公司及其产品。查看评价,阅读隐私政策,并留意社区提出的任何安全问题。

Review code before publishing

Before pushing code to public repositories, review it to make sure no sensitive information, such as API keys, is exposed.

Use automated scanning tools that can flag potential leaks. You can also review GitHub's secret scanning tutorial for more guidance.

When OpenAI detects an API key on the public internet, or leaked inside an app in an app store, the API key is disabled immediately.

实施密钥轮换

定期通过 API 密钥控制面板删除旧密钥并创建新密钥,以更换你的 API 密钥。

Monitor API spending and usage

Set multiple spend thresholds, such as 90% and 95%, against a monthly budget at the organization or project level to monitor monthly spend.

Configure custom email recipients to integrate with mailing lists, incident management platforms, and messaging platforms. This can be configured in Platform settings.

You can also enforce an organization or project hard limit to stop affected API requests when tracked spend reaches that amount. Enforcement is not instantaneous, so recorded spend may slightly exceed the limit. For more information, see: Spend limits.

Use separate API keys for each feature, team, product, or project to make usage easier to track. For more information, see: tracking usage by API key.

应对疑似泄露或入侵

如果你认为自己的 API 密钥已泄露,或怀疑你的账户存在未经授权的活动,请迅速采取行动。

Secure your account after suspected unauthorized access

  1. If you use a password and think it was exposed, reused, or shared, change it right away.

  2. Log out of all sessions using the instructions above.

  3. If you use the OpenAI API, delete your API keys and review your API usage for unexpected activity.

  4. Review your security history for unfamiliar activity. Keep details that may help with account recovery.

  5. Contact OpenAI Support.

删除 API 密钥

通过 API 密钥控制面板删除 API 密钥。

OpenAI 还支持按 API 密钥跟踪使用情况。这样一来,你可以为每项功能、每个团队、每款产品或每个项目分别使用单独的 API 密钥,从而更轻松地按这些维度查看使用情况。

联系 OpenAI 支持团队

你越早报告问题,OpenAI 就能越快帮助解决问题并减少潜在损害。在任意帮助中心页面发起新聊天,即可联系 OpenAI 支持。

这篇文章对你有帮助吗?