本文介绍了我真的不能用客户端 ID 发布开源吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

开发者凭据(例如密码、密钥和客户端 ID)旨在供您使用并识别您的 API 客户端.您将对您的凭证保密,并尽合理努力防止和阻止其他 API 客户端使用您的凭证.开发者凭据不得嵌入到开源项目中.

(https://developers.google.com/terms/,我的重点)>

这是否意味着我的 Open Source Drive 命令行客户端需要强制我的软件的每个用户在 Google Cloud 控制台中设置一个新项目?有没有更好的选择?

从非开源中提取客户端 ID 和客户端秘密"并不难,为什么要区分?

安装应用程序"客户端 ID 和机密并不是真正的机密,Google 文档似乎也同意:

该过程会生成一个客户端 ID,在某些情况下还会生成一个客户端机密,您将其嵌入到应用程序的源代码中.(在这种情况下,客户端机密显然不被视为机密.)

(https://developers.google.com/accounts/docs/OAuth2,再次强调)

解决方案

2014 年 11 月 5 日 Google 对 API 服务条款进行了一些更改.

像您一样,我对以下行有疑问.

要求开发者做出合理的努力来保护他们的隐私密钥是私有的,而不是将它们嵌入到开源项目中.

我在 GitHub 上有几个开源项目,它们基本上是使用 Google API 的教程,其中一些 API 仍处于测试阶段,需要时间才能获得测试权限.我已经在我的项目中嵌入了我的客户 ID,以便我的用户能够测试应用程序.

现在我在 Google 有一些联系人,所以我希望我能在这里得到某种豁免.我设法找到了上述违规服务变更的作者 Dan Ciruli 并向他发送了电子邮件.

我的电子邮件非常日志,您可以在这里阅读:服务变更

长话短说不,你不能在你的开源项目中发布你的客户 ID,这是 Dan 回复我的电子邮件,解释了原因.

但是,您允许他们在 Google 眼中冒充"您.如果我们的滥用系统检测到滥用(例如,是否有人尝试 DoS我们的服务使用您的密钥),您冒着他们会的风险因此终止您的帐户(请注意 - 他们不会只需切断对密钥的访问,他们就会关闭您的控制台帐户).此外,您已被授予对 API 的白名单访问权限公众无法获得的(而且很可能需要同意单独的服务条款)并共享访问任何想要它的人.毫无疑问是违规这些条款.很抱歉没有您要找的答案,但是键是我们必须告诉谁在调用我们的服务的一种方式.

这只是他给我的电子邮件的一部分.您可以在上面的链接中阅读完整的帖子.因此,如果您将源代码提供给他们,他们就可以看到客户端 ID.您的用户将不得不在 Google Cloud 控制台上创建自己的项目.没有办法解决这个问题.

我希望这会有所帮助.

(https://developers.google.com/terms/, my emphasis)

Does this mean that my Open Source Drive command line client needs to force every user of my software to set up a new project in the Google Cloud console? Is there a better option?

It's not like it's hard to extract client ID and client "secret" from non-opensource, so why the distinction?

"Install applications" client IDs and secrets aren't really secrets, and Google documentation seems to agree:

(https://developers.google.com/accounts/docs/OAuth2, again my emphasis)

解决方案

On November 5th 2014 Google made some changes to the APIs terms of Service.

Like you I had an issue with the following line.

I have several open source projects on GitHub they are basically tutorials for using the Google APIs some of the APIs are still in beta and it takes time to get beta access. I had my client id imbedded in my projects to that my users would be able to test the applications out.

Now I have some contacts at Google so I was hoping I could get some kind of dispensation here. I managed to track down the author of the above offending change of service Dan Ciruli and sent him an email.

My email was quite log you can read it here: Changes of service

To make a long story short No you can't release your client id with your open source project here is Dan's email back to me explaining why.

That is just part of his email back to me. You can read the full post in the link above. So if you are giving them the source code and they can see the client id. Your users are going to have to create there own project on the Google Cloud console. There is no way around this.

I hope this helped.

这篇关于我真的不能用客户端 ID 发布开源吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-16 23:47
查看更多