ISecuritySettingsService
This service provides access to security settings defined on backend.
export interface ISecuritySettingsService
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
| string | The scope in which is security settings accessed (URI of organization, workspace, user profile). |
Methods
Method | Description |
|---|---|
Validate plugin URL against list of allowed hosting locations. | |
Validate URL against backend list of allowed URLs. |
Property details
ISecuritySettingsService.scopeproperty
The scope in which is security settings accessed (URI of organization, workspace, user profile).
readonly scope: string;
Method details
ISecuritySettingsService.isDashboardPluginUrlValid()method
Validate plugin URL against list of allowed hosting locations.
isDashboardPluginUrlValid(url: string, workspace: string): Promise<boolean>;
Parameters
Parameter | Type | Description |
|---|---|---|
url | string | plugin content URL |
workspace | string | workspace in context of which the validation is done |
Returns
Promise<boolean>
Remarks
Dashboard plugins MUST be loaded only from allowed locations. If the plugin is hosted elsewhere, it MUST NOT be loaded.
ISecuritySettingsService.isUrlValid()method
Validate URL against backend list of allowed URLs.
isUrlValid(url: string, context: ValidationContext): Promise<boolean>;
Parameters
Parameter | Type | Description |
|---|---|---|
url | string | URL for validation. |
context | context in which the URL must be valid. |
Returns
Promise<boolean>
promise with boolean: true when validated URL is allowed as external host, false if it is not.