---
# System prepended metadata

title: 匿名登入
tags: [Edge365]

---

# 匿名登入
---
## Dashboard開啟匿名登入功能
1. 需要有Root Tenant Admin權限
- 這種user在Dashboard那邊會具有System Admin權限, 能看到Server admin選單
![](https://hackmd.io/_uploads/Hk8iK7P8h.png)

2. 進入Dashboard Server Admin -> Settings
![](https://hackmd.io/_uploads/Skse9Qv8h.png)

3. 找到auth.anonymous選項, 點選編輯
![](https://hackmd.io/_uploads/HJxI9XvU2.png)

4. 編輯`enabled`, 選擇true
![](https://hackmd.io/_uploads/Hyts9XvLn.png)

5. 編輯`org_name`, 選擇你想要做匿名登入的org, 權限選Viewer, 按下Add新增
![](https://hackmd.io/_uploads/HJxNjQw8h.png)

6. 完成步驟5後, 按下Settings分頁的綠色更新按鈕, 完成本次變更
![](https://hackmd.io/_uploads/ByUDiQv8n.png)

## Datasource配置
1. 進入你要配置的組織的Data Sources setting
![](https://hackmd.io/_uploads/SJrIhQwIn.png)

2. 找到deviceon-bi-simplejson, 點進去
![](https://hackmd.io/_uploads/rkOKhQw82.png)

3. 需要額外新增的設定如下：
- Assign SSO Url：開啟
- SSO URL：輸入SSO API URL, 以Edge365 master站為例, URL為
  - https://api-sso-ensaas.edge365.advantech.com
- Skip TLS Verify：開啟
- Anonymous：開啟
- Anonymous.user：輸入這個環境中的一個帳號, 會以這個帳號當作匿名登入的登入者
- Anonymous.password：輸入帳號的密碼
![](https://hackmd.io/_uploads/rJLETmD82.png)

4. 按下`Save & Test`, 出現設定成功的訊息
![](https://hackmd.io/_uploads/H1yjJ4PIn.png)

## 從Command Center建立一個匿名登入的SRPFrame
1. 新增可以給public看的dashboard
![](https://hackmd.io/_uploads/SystgEDL3.png)

2. 在新增/編輯Dashboard時, 將這一張Dashboard 的 Visibility設定成General即可 
![](https://hackmd.io/_uploads/HkDkWNvL3.png)

3. 進入Menu List功能, 新增or編輯一個Menu, 將Availability設定為Public
![](https://hackmd.io/_uploads/HJJ_-VP8h.png)

4. 編輯Menu中的Dashboard, 請選擇步驟2中,Visibility設定成General的Dashboard
這邊會發現, 這類型的Dashboard會被放置於Dashboard/General資料夾下
![](https://hackmd.io/_uploads/HyqCbNvIn.png)

5. 設定完畢後,複製這個Menu的URL
![](https://hackmd.io/_uploads/rJ6Hf4PL3.png)

6. 以訪客權限開啟一個新的browser
![](https://hackmd.io/_uploads/BJmMQ4wIh.png)

7. 貼上Menu URL, 確認不需登入的狀態下, 能看到Dashboard內容
![](https://hackmd.io/_uploads/S1swXEwIh.png)

## 手動新增Dashboard權限, 讓Visibility = Private的Dashboard也能匿名使用
Edge365因為安全性的考量, 目前有將Group的User權限新增到Folder權限中
- group user = Dashboard folder user
- 移除Dashboard folder user中的 "Viewer"權限, 否則這個org下的其他user都能看到這個Folder中的Dashboard內容
![](https://hackmd.io/_uploads/ByI4HVv82.png)
- 如果認為Folder中的Dashboard都是要做匿名登入可公開的內容, 可以直接加上Viewer權限到該Folder上
  1. Dashboards選單 -> Manage
  ![](https://hackmd.io/_uploads/SJHL8VPI3.png)

  2. 找你要編輯的folder, 點選設定
  ![](https://hackmd.io/_uploads/Skd9U4vU2.png)

  3. 切換到Permission分頁,點選Add permission
  ![](https://hackmd.io/_uploads/SkTa8NPIn.png)

  4. 選`Everyone With Viewer Role` 與 `View`, 按下Save保存設定
  ![](https://hackmd.io/_uploads/SJxZwVvIn.png)

  5. 可以看到folder人員列表中多了一個Viewer
  ![](https://hackmd.io/_uploads/BkQDwND83.png)

  6. 去Menu設定中, 設定一張Dashboard是放置在你這個Group中的
  ![](https://hackmd.io/_uploads/rJZ-OVv8n.png)

  7. 開啟訪客瀏覽器, 確認這張Dashboard也能正常顯示
  ![](https://hackmd.io/_uploads/rkBVd4w8n.png)


---
# Anonymous Login
---
## Enabling Anonymous Login in the Dashboard

1. You need to have Root Tenant Admin permissions.
- Users with Root Tenant Admin permissions in the Dashboard have System Admin privileges and can access the Server Admin menu.
![Example Image](https://hackmd.io/_uploads/Hk8iK7P8h.png)

2. Go to Dashboard Server Admin -> Settings.
![Example Image](https://hackmd.io/_uploads/Skse9Qv8h.png)

3. Find the `auth.anonymous` option and click on `Edit`
![Example Image](https://hackmd.io/_uploads/HJxI9XvU2.png)

4. Edit the `enabled` option and select "true"
![Example Image](https://hackmd.io/_uploads/Hyts9XvLn.png)

5. Edit the `org_name` option and select the organization for which you want to enable anonymous login. Choose the "Viewer" role and click `Add` to add it.
![Example Image](https://hackmd.io/_uploads/HJxNjQw8h.png)

6. After completing Step 5, click the green update button on the Settings page to apply the changes.
![Example Image](https://hackmd.io/_uploads/ByUDiQv8n.png)

## Configuring the Datasource

1. Go to the Data Sources settings of the organization you want to configure.
![Example Image](https://hackmd.io/_uploads/SJrIhQwIn.png)

2. Find `deviceon-bi-simplejson` and click on it.
![Example Image](https://hackmd.io/_uploads/rkOKhQw82.png)

3. The following additional settings need to be added:
- Assign SSO URL: Enable
- SSO URL: Enter the SSO API URL, for example, for Edge365 master site:
  - https://api-sso-ensaas.edge365.advantech.com
- Skip TLS Verify: Enable
- Anonymous: Enable
- Anonymous.user: Enter a username from your environment to be used for anonymous login.
- Anonymous.password: Enter the password for the above user.
![Example Image](https://hackmd.io/_uploads/rJLETmD82.png)

4. Click `Save & Test` to confirm the successful configuration.
![Example Image](https://hackmd.io/_uploads/H1yjJ4PIn.png)

## Creating an Anonymous Login SRPFrame from Command Center

1. Create a dashboard that can be viewed by the public.
![Example Image](https://hackmd.io/_uploads/SystgEDL3.png)

2. When adding/editing the dashboard, set its Visibility to "General".
![Example Image](https://hackmd.io/_uploads/HkDkWNvL3.png)

3. Access the Menu List feature and add/edit a menu. Set the Availability to "Public".
![Example Image](https://hackmd.io/_uploads/HJJ_-VP8h.png)

4. Edit the Dashboard within the menu and select the dashboard with General Visibility (as set in Step 2). This type of dashboard will be placed in the Dashboard/General folder.
![Example Image](https://hackmd.io/_uploads/HyqCbNvIn.png)

5. After configuring, copy the URL of this menu.
![Example Image](https://hackmd.io/_uploads/rJ6Hf4PL3.png)

6. Open a new browser in guest mode.
![Example Image](https://hackmd.io/_uploads/BJmMQ4wIh.png)

7. Paste the Menu URL and verify that the dashboard content is visible without the need for login.
![Example Image](https://hackmd.io/_uploads/S1swXEwIh.png)

## Manually Adding Dashboard Permissions for Anonymous Usage of Private Dashboards

For security reasons, Edge365 has added Group User permissions to Dashboard Folder permissions. This means that:
- Group User = Dashboard Folder User
- "Viewer" permissions are removed from Dashboard Folder permission, other users within the organization will not be able to see the contents of that folder.

![Example Image](https://hackmd.io/_uploads/ByI4HVv82.png)

If you want to allow anonymous access to all Dashboards within a specific folder, you can directly add "Viewer" permissions to that folder:

1. Go to the Dashboards menu and select `Manage`
![Example Image](https://hackmd.io/_uploads/SJHL8VPI3.png)

2. Find the folder you want to edit and click on `Settings`
![Example Image](https://hackmd.io/_uploads/Skd9U4vU2.png)

3. Switch to the Permissions tab and click `Add permission`
![Example Image](https://hackmd.io/_uploads/SkTa8NPIn.png)

4. Select `Everyone With Viewer Role` and choose `View`. Then click `Save` to save the settings.
![Example Image](https://hackmd.io/_uploads/SJxZwVvIn.png)

5. You will see that a new `Viewer` is added to the list of people in the folder.
![Example Image](https://hackmd.io/_uploads/BkQDwND83.png)

6. In the Menu settings, select a Dashboard that is placed within your Group.
![Example Image](https://hackmd.io/_uploads/rJZ-OVv8n.png)

7. Open a guest browser and verify that the Dashboard is displayed correctly.
![Example Image](https://hackmd.io/_uploads/rkBVd4w8n.png)
---
###### tags: `Edge365`