Security Requirements and Controls
ManageCluster
API permission
API Stability |
Long-Term
|
The updateSharedDashboardsSecurityPolicies() GraphQL mutation is used to update the shared dashboards security policies for the organization. Updating the policies will update or delete all existing tokens that don't fit into the changes. For instance, enforcing an IP filter will set the IP filter on all shared dashboard tokens. Disabling shared dashboard tokens will delete them.
Syntax
Below is the syntax for the updateSharedDashboardsSecurityPolicies() mutation:
updateSharedDashboardsSecurityPolicies(
input: SharedDashboardsSecurityPoliciesInput!
): Organization!
Below is an example of how this mutation field might be used:
mutation {
updateSharedDashboardsSecurityPolicies( input:
{
sharedDashboardsEnabled: true
}
)
{ id }
}
curl -v -X POST $YOUR_LOGSCALE_URL/graphql \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d @- << EOF
{"query" : "mutation {
updateSharedDashboardsSecurityPolicies( input:
{
sharedDashboardsEnabled: true
}
)
{ id }
}"
}
EOF
curl -v -X POST $YOUR_LOGSCALE_URL/graphql \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d @- << EOF
{"query" : "mutation {
updateSharedDashboardsSecurityPolicies( input:
{
sharedDashboardsEnabled: true
}
)
{ id }
}"
}
EOF
curl -v -X POST $YOUR_LOGSCALE_URL/graphql ^
-H "Authorization: Bearer $TOKEN" ^
-H "Content-Type: application/json" ^
-d @'{"query" : "mutation { ^
updateSharedDashboardsSecurityPolicies( input: ^
{ ^
sharedDashboardsEnabled: true ^
} ^
) ^
{ id } ^
}" ^
} '
curl.exe -X POST
-H "Authorization: Bearer $TOKEN"
-H "Content-Type: application/json"
-d '{"query" : "mutation {
updateSharedDashboardsSecurityPolicies( input:
{
sharedDashboardsEnabled: true
}
)
{ id }
}"
}'
"$YOUR_LOGSCALE_URL/graphql"
#!/usr/bin/perl
use HTTP::Request;
use LWP;
my $INGEST_TOKEN = "TOKEN";
my $uri = '$YOUR_LOGSCALE_URL/graphql';
my $json = '{"query" : "mutation {
updateSharedDashboardsSecurityPolicies( input:
{
sharedDashboardsEnabled: true
}
)
{ id }
}"
}';
my $req = HTTP::Request->new("POST", $uri );
$req->header("Authorization" => "Bearer $TOKEN");
$req->header("Content-Type" => "application/json");
$req->content( $json );
my $lwp = LWP::UserAgent->new;
my $result = $lwp->request( $req );
print $result->{"_content"},"\n";
#! /usr/local/bin/python3
import requests
url = '$YOUR_LOGSCALE_URL/graphql'
mydata = r'''{"query" : "mutation {
updateSharedDashboardsSecurityPolicies( input:
{
sharedDashboardsEnabled: true
}
)
{ id }
}"
}'''
resp = requests.post(url,
data = mydata,
headers = {
"Authorization" : "Bearer $TOKEN",
"Content-Type" : "application/json"
}
)
print(resp.text)
const https = require('https');
const data = JSON.stringify(
{"query" : "mutation {
updateSharedDashboardsSecurityPolicies( input:
{
sharedDashboardsEnabled: true
}
)
{ id }
}"
}
);
const options = {
hostname: '$YOUR_LOGSCALE_URL/graphql',
path: '/graphql',
port: 443,
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Content-Length': data.length,
Authorization: 'BEARER ' + process.env.TOKEN,
'User-Agent': 'Node',
},
};
const req = https.request(options, (res) => {
let data = '';
console.log(`statusCode: ${res.statusCode}`);
res.on('data', (d) => {
data += d;
});
res.on('end', () => {
console.log(JSON.parse(data).data);
});
});
req.on('error', (error) => {
console.error(error);
});
req.write(data);
req.end();
{
"data": {
"updateSharedDashboardsSecurityPolicies": {
"id": "SINGLE_ORGANIZATION_ID"
}
}
}
Given Datatypes
The SharedDashboardsSecurityPoliciesInput has a couple of parameters. Below is a list of them and a description of each:
Table: SharedDashboardsSecurityPoliciesInput
Parameter | Type | Required | Default | Stability | Description |
---|---|---|---|---|---|
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column. | |||||
Table last updated: Sep 19, 2024 | |||||
enforceIpFilterId | string | The IP filter that will be enforced on all shared dashboard tokens. | |||
sharedDashboardsEnabled | boolean | yes | Whether shared dashboard tokens should be enabled. |
Returned Datatypes
As indicated by the syntax above, this mutation will return data using the datatype, Organization. Below is a list of the parameters of that datatype:
Table: Organization
Parameter | Type | Required | Default | Stability | Description |
---|---|---|---|---|---|
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column. | |||||
Table last updated: Sep 27, 2024 | |||||
cid | string | Short-Term | The CID corresponding to the organization. | ||
configs | OrganizationConfigs | yes | Short-Term | Organization configurations and settings. See OrganizationDetails . | |
createdAt | long | Short-Term | Date organization was created. | ||
defaultCachePolicy | CachePolicy | Preview | The default cache policy of the organization. See CachePolicy . This is a preview and subject to change. | ||
description | string | Short-Term | The description for the Organization. Can be null. | ||
details | OrganizationDetails | yes | Short-Term | Any additional details related to the organization. See OrganizationDetails . | |
externalGroupSynchronization | boolean | yes | Short-Term | Whether there is group synchronization. | |
externalPermissions | boolean | yes | Short-Term | Whether permissions are managed externally. | |
id | string | yes | Short-Term | The unique id for the Organization. | |
ingestUrl | string | Short-Term | The ingest URL for the organization. | ||
isActionAllowed | multiple | yes | Short-Term | Check if user has a permission in organization. The datatype consists of (action: OrganizationAction): boolean . For OrganizationAction , give the action to check if a user is allowed to perform on the organization. See OrganizationAction . | |
limits | [Limit ] | yes | Short-Term | Limits assigned to the organization. See Limit . | |
limitsV2 | [LimitV2 ] | yes | Short-Term | Limits assigned to the organization. See LimitV2 . | |
name | string | yes | Short-Term | The name for the Organization. | |
publicUrl | string | Short-Term | The public URL for the organization. | ||
readonlyDashboardIPFilter | string | Short-Term | IP filter for readonly dashboard links. | ||
searchDomains | [SearchDomain ] | yes | Short-Term | Search domains within the organization. See SearchDomain . | |
stats | OrganizationStats | yes | Short-Term | Statistics of the organization. See OrganizationStats . | |
trialStartedAt | long | Short-Term | Date organization's trial started. |