强制使用查看者凭据
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
社区连接器可对从连接器创建的所有数据源强制使用查看者凭据。
必读资源
数据洞察报告可以附加一个或多个数据源。用户通过连接器创建新数据源时,可以选择数据源应使用所有者的凭据还是查看者的凭据。
在访问用户身份属性时,有效用户取决于已向连接器授权的人员。
- 对于使用所有者凭据的数据源,有效用户是数据源所有者。数据源所有者在创建数据源时向连接器授权。
- 对于使用查看者凭据的数据源,有效用户是报告查看者。报告查看者将在查看报告时向连接器授权。
优势
- 您可以确保数据机密性。
- 数据访问权限不会从一位用户共享给另一位用户。
- 您可以确保用户仅能看到与他们相关的数据。
- 您的用户可以更轻松地创建可扩展信息中心。
实现步骤
对连接器强制使用查看者凭据的过程分为两步:
- 在连接器的清单中,将
dataStudio.forceViewersCredentials
设为 true
。如需了解详情,请参阅清单参考。
- 根据您的使用情形,您可以实现访问控制逻辑。确保仅从连接器返回报告查看者的相关数据。如需了解您的代码如何访问用户身份/电子邮件地址,请参阅访问用户身份属性。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eA Community Connector can enforce viewer's credentials for all its data sources, ensuring only the report viewer's authorization is used to access data.\u003c/p\u003e\n"],["\u003cp\u003eWhen viewer's credentials are enforced, data access is personalized to each viewer, enhancing data confidentiality and preventing unauthorized sharing.\u003c/p\u003e\n"],["\u003cp\u003eTo implement this, developers need to enable the \u003ccode\u003eforceViewersCredentials\u003c/code\u003e setting in the connector's manifest and adjust the access control logic to utilize the viewer's identity.\u003c/p\u003e\n"],["\u003cp\u003eThis approach simplifies creating scalable dashboards while ensuring users only see relevant data based on their individual access rights.\u003c/p\u003e\n"]]],[],null,["# Force viewer's credentials\n\nA Community Connector can enforce [viewer's credentials](https://support.google.com/looker-studio/answer/6371135?#types&zippy=%2Cin-this-article%2Cviewers-credentials) for all data sources\ncreated from the connector.\n\nRequired reading\n----------------\n\n- [Data source credentials](https://support.google.com/looker-studio/answer/6371135)\n- [Access user identity properties](/looker-studio/connector/user-identity)\n\nData Studio reports can have one or more data sources attached to them. When a\nuser creates a new data source from a connector, they can select whether the\ndata source should use\n[*Owner's credentials* or *Viewer's credentials*](https://support.google.com/looker-studio/answer/6371135).\n\n\nWhen you [Access user identity properties](/looker-studio/connector/user-identity), the *effective user* is based on who\nhas authorized the connector.\n\n- For data sources with *Owner's credentials* , the data source owner is the *effective user*. The data source owner authorizes the connector when they create the data source.\n- For data sources with *Viewer's credentials* , the *effective user* is the report viewer. The report viewer will authorize the connector when they view a report.\n\nBenefits\n--------\n\n- You can ensure data confidentiality.\n- Data access cannot be shared from one user to another.\n- You can ensure users will only be able to see data relevant to them.\n- It becomes easier for your users to create scalable dashboards.\n\nImplementation steps\n--------------------\n\nThere are two steps to enforcing viewer's credentials for your connector:\n\n1. In your connector's manifest, set `dataStudio.forceViewersCredentials` to `true`. See [Manifest reference](/looker-studio/connector/manifest) for details.\n2. Depending on your use case, you can implement your access control logic. Ensure that only the relevant data for the report viewer is returned from the connector. See [Access user identity properties](/looker-studio/connector/user-identity) to understand how your code can access the user identity/email address."]]