How Authorization Works with an Authorization Server in JavaScript-Based Embedding?
The Authorization Server is a crucial component for applications that embed Bold BI dashboards and widgets. It serves as an endpoint within the embedding application that facilitates the authentication process with the Bold BI server. This article outlines the functionality and importance of the Authorization Server in the context of embedding Bold BI dashboards.
What is the Authorization Server?
The Authorization Server is an endpoint implemented in the embedding application. It receives details from the Bold BI embed SDK instance and communicates with the Bold BI server for validation. This process is essential for ensuring that the embedded dashboards are accessed securely and appropriately.
How the Authorization Server Works
-
Request from Embed Instance: The Bold BI embed instance initiates a call to the authorization endpoint, providing necessary details such as:
- Dashboard ID
- Dashboard path
- Expiration time
- Other relevant information
-
Updating Secure Information: Upon receiving the details, the Authorization Server updates secure information, including:
- User email
- Group details
- Embed signature
-
Validation with Bold BI Server: The Authorization Server sends this information to the Bold BI server for validation. The server checks:
- If the dashboard is valid
- If the user is valid
- If the user has access to the specified dashboard
- If the application is permitted to embed the dashboard
-
Response Handling: After validation, the Bold BI server responds to the Authorization Server:
- If the details are valid, an access token and other internal embed details are sent back.
- If the details are invalid, error information is provided.
-
Rendering the Dashboard: The Authorization Server then relays the received information back to the Bold BI embed instance. Depending on the response, the embed instance will either render the dashboard or display an error message.
Importance of User Email
The user’s email is a critical piece of information required for rendering the dashboard. The Bold BI server uses the email to:
- Validate the user and their permissions for the specific dashboard.
- Customize the dashboard data according to the logged-in user, ensuring that the information displayed is relevant and secure.
Only authorized users can engage with the dashboard features, such as commenting, filtering, and managing views, which enhances collaboration and user experience.
Conclusion
The Authorization Server plays a vital role in the secure embedding of Bold BI dashboards. By managing the authentication flow and ensuring that only authorized users can access specific dashboards, it helps maintain data integrity and user-specific customization.