Buộc dùng thông tin đăng nhập của người xem
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Trình kết nối cộng đồng có thể thực thi thông tin đăng nhập của người xem đối với tất cả nguồn dữ liệu được tạo từ trình kết nối.
Cần đọc
Báo cáo Data Studio có thể có một hoặc nhiều nguồn dữ liệu đi kèm. Khi tạo một nguồn dữ liệu mới từ trình kết nối, người dùng có thể chọn xem nguồn dữ liệu đó sẽ sử dụng thông tin xác thực của chủ sở hữu hay thông tin xác thực của người xem.
Khi bạn Truy cập vào các thuộc tính danh tính người dùng, người dùng hiệu quả sẽ dựa trên người đã uỷ quyền cho trình kết nối.
- Đối với các nguồn dữ liệu có thông tin xác thực của chủ sở hữu, chủ sở hữu nguồn dữ liệu sẽ là người dùng hiệu quả. Chủ sở hữu nguồn dữ liệu uỷ quyền cho trình kết nối khi họ tạo nguồn dữ liệu.
- Đối với các nguồn dữ liệu có Thông tin xác thực của người xem, Người dùng hiệu quả là người xem báo cáo. Trình xem báo cáo sẽ cho phép trình kết nối khi họ xem báo cáo.
Lợi ích
- Bạn có thể đảm bảo tính bảo mật cho dữ liệu.
- Bạn không thể chia sẻ quyền truy cập dữ liệu giữa người dùng này với người dùng khác.
- Bạn có thể đảm bảo rằng người dùng chỉ có thể xem dữ liệu có liên quan đến họ.
- Người dùng có thể dễ dàng tạo trang tổng quan có thể mở rộng.
Các bước triển khai
Có hai bước để thực thi thông tin đăng nhập của người xem cho trình kết nối của bạn:
- Trong tệp kê khai của trình kết nối, hãy đặt
dataStudio.forceViewersCredentials
thành true
. Xem Tài liệu tham khảo về tệp kê khai để biết thông tin chi tiết.
- Tuỳ thuộc vào trường hợp sử dụng, bạn có thể triển khai logic kiểm soát quyền truy cập.
Đảm bảo rằng trình kết nối chỉ trả về dữ liệu có liên quan cho trình xem báo cáo. Hãy xem bài viết Truy cập vào thuộc tính danh tính người dùng để hiểu cách mã của bạn có thể truy cập vào danh tính/địa chỉ email của người dùng.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\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."]]