### SGNL AI Integration Guides Overview Source: https://sgnl.ai/llms-full.txt Guides for integrating SGNL with various cloud providers, identity providers, and development platforms. These resources detail the steps and considerations for setting up SGNL in different environments. ```APIDOC Integration Guides: Cloud & Infrastructure: AWS Integration: URL: https://help.sgnl.ai/articles/protected-systems/protected-system-infra-aws/ Description: Guide for integrating SGNL with Amazon Web Services (AWS) environments. Azure Integration: URL: https://help.sgnl.ai/articles/protected-systems/protected-system-idp-aad/ Description: Guide for integrating SGNL with Microsoft Azure Active Directory (AAD) and Azure environments. Development Platforms: GitHub Integration: URL: https://help.sgnl.ai/articles/protected-systems/protected-system-dev-github/ Description: Guide for integrating SGNL with GitHub repositories and workflows. Identity Providers: Okta Integration: URL: https://help.sgnl.ai/articles/protected-systems/protected-system-idp-okta/ Description: Guide for integrating SGNL with Okta as an identity provider. SaaS Applications: Salesforce Integration: URL: https://help.sgnl.ai/articles/protected-systems/protected-system-saas-salesforce/ Description: Guide for integrating SGNL with Salesforce. ``` -------------------------------- ### SGNL Policy Action Execution Example Source: https://help.sgnl.ai/articles/protected-systems/protected-system-dev-github/ This example demonstrates the parameters passed to the SGNL policy action during a workflow run. It includes details like the authentication token, principal ID, action type, asset ID, bypass mode, and the SGNL API domain. ```APIDOC Run SGNL-ai/policy-action@v1 with: token: *** principalId: marc-sgnl action: deploy assetId: SGNL-ai/sgnl-github-demo bypassMode: false domain: access.sgnlapis.cloud ``` -------------------------------- ### Grafana Faro Web SDK Initialization Source: https://sgnl.ai/2023/08/caep-and-ssf-your-questions-answered/ Dynamically loads the Grafana Faro Web SDK and initializes it with specific configuration. This setup enables performance monitoring and error tracking for the web application, sending data to a Grafana collector endpoint. ```javascript (function(){var e=document.createElement("script");e.onload=()=>{window.GrafanaFaroWebSdk.initializeFaro({url:"https://faro-collector-prod-us-central-0.grafana.net/collect/fd99a14e27fd8a4a5966909a0aefdc5f",app:{name:"sgnl-ai",version:"1.0.0"}})},e.src="https://unpkg.com/@grafana/faro-web-sdk@^1.4.0/dist/bundle/faro-web-sdk.iife.js",document.head.appendChild(e)})() ``` -------------------------------- ### SGNL Policy Action Output Example Source: https://help.sgnl.ai/articles/protected-systems/protected-system-dev-github/ This snippet shows the expected output from the SGNL policy action within a GitHub Actions workflow. It captures the access decision and any associated reason provided by the SGNL platform. ```shell echo "Decision 'true', Reason ''" echo "Decision 'true', Reason ''" shell: /usr/bin/bash -e {0} Decision 'true', Reason '' ``` -------------------------------- ### Search Assets using C with libcurl Source: https://developer.sgnl.ai/ Provides a C code example using the libcurl library to make a POST request to the SGNL AI Assets Search API. It covers initializing curl, setting options for URL, method, headers, and the request body. ```c package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://access.sgnlapis.cloud/access/v2/search" payload := strings.NewReader("{\"principal\":{\"id\":\"john.doe@sgnl.ai\",\"ipAddress\":\"172.217.22.14\",\"deviceId\":\"48:65:ee:17:7e:0b\"},\"queries\":[{\"action\":\"delete\"}]}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Content-Type", "application/json") req.Header.Add("Accept", "application/json") req.Header.Add("X-Request-Id", "bfe9eb29-ab87-4ca3-be83-a1d5d8305716") req.Header.Add("Authorization", "Bearer {access-token}") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` -------------------------------- ### Python: Send POST Request with http.client Source: https://developer.sgnl.ai/ Provides a Python example for making a POST request to the SGNL AI API using the `http.client` library. Demonstrates setting up the connection, payload, headers, and handling the response for asset search. ```python import http.client conn = http.client.HTTPSConnection("access.sgnlapis.cloud") payload = "{\"principal\":{\"id\":\"john.doe@sgnl.ai\",\"ipAddress\":\"172.217.22.14\",\"deviceId\":\"48:65:ee:17:7e:0b\"},\"queries\":[{\"action\":\"delete\"}]}" headers = { 'Content-Type': "application/json", 'Accept': "application/json", 'X-Request-Id': "bfe9eb29-ab87-4ca3-be83-a1d5d8305716", 'Authorization': "Bearer {access-token}" } conn.request("POST", "/access/v2/search", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` -------------------------------- ### SGNL AI API: Search Endpoint Documentation Source: https://developer.sgnl.ai/ Documentation for the /access/v2/search API endpoint, which returns accessible assets for a principal based on integration configuration. Includes request parameters, body structure, and example responses. ```APIDOC POST /access/v2/search _Returns accessible assets for a principal given integration configuration_ > Body parameter { "principal": { "id": "john.doe@sgnl.ai", "ipAddress": "172.217.22.14", "deviceId": "48:65:ee:17:7e:0b" }, "queries": [ { "action": "delete" } ] } ### Parameters Name In Type Required Description X-Request-Id header string false Arbitrary string identifier used to correlate requests with responses. The response will contain the X-Request-Id header with the same value. pageToken query string false Token to use to get the next set of assets pageSize query integer false Maximum number of assets returned in a single page body body [SearchRequest](#schemasearchrequest) false none principal body [Principal](#schemaprincipal) true Principal trying to access a protected asset id body string true Identifier for the principal ipAddress body string false IP address from which the principal is making the request deviceId body string false The identifier for the device making the request queries body [SearchQuery] true Collection of actions action body string false Action the principal is trying to perform on the asset > Example responses > > 200 Response { "issuedAt": "2023-01-04T22:06:54.530672786Z", "principalId": "john.doe@sgnl.ai", "evaluationDuration": 2550, "decisions": [ { "action": "delete", "assetId": "3cdd2459-d9d3-4df4-abbd-8cee6fecea2d", "decision": "Allow", "assetAttributes": {} } ], "nextPageToken": "NWU0OGFiZTItNjI1My00NTQ5LWEzYTctNWQ1YmE1MmVmM2Q4" } ``` -------------------------------- ### Google Tag Manager Initialization Source: https://help.sgnl.ai/articles/protected-systems/protected-system-api-apim/ This script initializes Google Tag Manager by creating a dataLayer array and asynchronously loading the GTM script. It's a standard setup for integrating Google Tag Manager into a web page. ```javascript (function(e,t,n,s,o){e[s]=e[s]||[],e[s].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var a=t.getElementsByTagName(n)[0],i=t.createElement(n),r=s!="dataLayer"?"&l="+s:"";i.async=!0,i.src="https://www.googletagmanager.com/gtm.js?id="+o+r,a.parentNode.insertBefore(i,a)})(window,document,"script","dataLayer","GTM-5JRNBQ6") ``` -------------------------------- ### Search Assets using Go Source: https://developer.sgnl.ai/ Shows how to execute an asset search request in Go using the standard `net/http` package. The code demonstrates creating a POST request, setting headers, and sending the JSON payload. ```go package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://access.sgnlapis.cloud/access/v2/search" payload := strings.NewReader("{\"principal\":{\"id\":\"john.doe@sgnl.ai\",\"ipAddress\":\"172.217.22.14\",\"deviceId\":\"48:65:ee:17:7e:0b\"},\"queries\":[{\"action\":\"delete\"}]}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Content-Type", "application/json") req.Header.Add("Accept", "application/json") req.Header.Add("X-Request-Id", "bfe9eb29-ab87-4ca3-be83-a1d5d8305716") req.Header.Add("Authorization", "Bearer {access-token}") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` -------------------------------- ### Okta Claim Path Examples Source: https://help.sgnl.ai/articles/protected-systems/protected-system-idp-okta/ Common examples of claim paths used for configuring Okta inline hooks with SGNL, illustrating how to specify locations for claims. ```text /claims/https:~1~1aws.amazon.com~1SAML~1Attributes~1Role ``` ```text /claims/https:~1~1aws.amazon.com~1SAML~1PrincipalTag:cost-center ``` ```text /claims/https:~1~1aws.amazon.com~1SAML~1PrincipalTag:{$.sfdcAccount.Id} ``` -------------------------------- ### GitHub Codespaces Feature Link Source: https://github.com/SGNL-ai Link to the GitHub Codespaces feature page, highlighting instant development environments. ```html Codespaces Instant dev environments ``` -------------------------------- ### Accessibility Keyboard Shortcuts Documentation Link Source: https://github.com/SGNL-ai Link to GitHub's documentation on keyboard shortcuts for accessibility. ```html Keyboard Shortcuts ``` -------------------------------- ### Search Assets using C# with RestSharp Source: https://developer.sgnl.ai/ Provides a C# example for calling the SGNL AI Assets Search API using the RestSharp library. It configures the POST request with appropriate headers and the JSON payload. ```csharp var client = new RestClient("https://access.sgnlapis.cloud/access/v2/search"); var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddHeader("Accept", "application/json"); request.AddHeader("X-Request-Id", "bfe9eb29-ab87-4ca3-be83-a1d5d8305716"); request.AddHeader("Authorization", "Bearer {access-token}"); request.AddParameter("application/json", "{\"principal\":{\"id\":\"john.doe@sgnl.ai\",\"ipAddress\":\"172.217.22.14\",\"deviceId\":\"48:65:ee:17:7e:0b\"},\"queries\":[{\"action\":\"delete\"}]", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` -------------------------------- ### GitHub Copilot Feature Link Source: https://github.com/SGNL-ai Link to the GitHub Copilot feature page, highlighting its AI-powered code writing capabilities. ```html GitHub Copilot Write better code with AI ``` -------------------------------- ### Search Assets using Java with Unirest Source: https://developer.sgnl.ai/ Illustrates how to call the SGNL AI Assets Search API from Java using the Unirest library. The example shows setting the request URL, headers, and the JSON request body. ```java HttpResponse response = Unirest.post("https://access.sgnlapis.cloud/access/v2/search") .header("Content-Type", "application/json") .header("Accept", "application/json") .header("X-Request-Id", "bfe9eb29-ab87-4ca3-be83-a1d5d8305716") .header("Authorization", "Bearer {access-token}") .body("{\"principal\":{\"id\":\"john.doe@sgnl.ai\",\"ipAddress\":\"172.217.22.14\",\"deviceId\":\"48:65:ee:17:7e:0b\"},\"queries\":[{\"action\":\"delete\"}]}") .asString(); ``` -------------------------------- ### Initialize Grafana Faro Web SDK Source: https://sgnl.ai/2024/01/the-least-privilege-fallacy-or-how-i-learned-to-stop-worrying-and-love-zero-standing-privilege/ This JavaScript code initializes the Grafana Faro Web SDK, enabling frontend observability. It configures the SDK with a specific collector URL and application details ('sgnl-ai', version '1.0.0'). ```javascript (function(){var e=document.createElement("script");e.onload=()=>{window.GrafanaFaroWebSdk.initializeFaro({url:"https://faro-collector-prod-us-central-0.grafana.net/collect/fd99a14e27fd8a4a5966909a0aefdc5f",app:{name:"sgnl-ai",version:"1.0.0"}})},e.src="https://unpkg.com/@grafana/faro-web-sdk@^1.4.0/dist/bundle/faro-web-sdk.iife.js",document.head.appendChild(e)})() ``` -------------------------------- ### Demandbase Tracking Script Source: https://sgnl.ai/product/ This script integrates the Demandbase tracking library to facilitate website analytics and marketing automation. It initializes the library asynchronously and appends it to the document's head. ```javascript (function(e,t,n,s,o){var i=t.createElement(n),a=t.getElementsByTagName(n)[0];i.async=1,i.id=o,i.src=s,a.parentNode.insertBefore(i,a)})(window,document,"script","https://tag.demandbase.com/ad5637775a2bce4b.min.js","demandbase_js_lib") ``` -------------------------------- ### SGNL Action Configuration Example Source: https://help.sgnl.ai/articles/protected-systems/protected-system-idp-aad/ Demonstrates how to configure an 'Add to Group' action in Entra ID within SGNL. It shows how to specify the user's Principal Name and the target group ID, which can be static or dynamically retrieved from the graph. ```sgnl-config Configure the required fields * The userPrincipalName should be the UPN of the Entra ID User: e.g. {$.EntraIDUser.userPrincipalName} * The groupId should be the Id of the Group you want the user added to, this can be statically assigned (e.g. 05f35c53-8393-489d-ac18-b57d4ab7a97e) or retrieved from an object in the graph, e.g. {$.PagerDutyOnCall.escalation_policy_summary} ``` -------------------------------- ### Initialize Grafana Faro Web SDK Source: https://sgnl.ai/2024/08/zsp-vs-manual-privileges/ This JavaScript code initializes the Grafana Faro Web SDK for frontend observability. It configures the SDK with a collector URL and application details, enabling the collection and sending of telemetry data to Grafana for monitoring. ```javascript (function(){var e=document.createElement("script");e.onload=()=>{window.GrafanaFaroWebSdk.initializeFaro({url:"https://faro-collector-prod-us-central-0.grafana.net/collect/fd99a14e27fd8a4a5966909a0aefdc5f",app:{name:"sgnl-ai",version:"1.0.0"}})},e.src="https://unpkg.com/@grafana/faro-web-sdk@^1.4.0/dist/bundle/faro-web-sdk.iife.js",document.head.appendChild(e)})() ``` -------------------------------- ### Entra ID SSO Data Mapping with JSONPath Source: https://help.sgnl.ai/articles/protected-systems/protected-system-idp-aad/ Examples of JSONPath expressions used to extract data from Entra ID requests for SGNL Transforms. These expressions map user principal names and IP addresses from the incoming request. ```jsonpath {$.data.authenticationContext.user.userPrincipalName} ``` ```jsonpath {$.data.authenticationContext.client.ip} ``` ```text sign-on ``` -------------------------------- ### Search Assets using Kotlin with OkHttpClient Source: https://developer.sgnl.ai/ Demonstrates making an asset search request in Kotlin using OkHttpClient. The code sets up the request with the correct URL, headers, and JSON body. ```kotlin val client = OkHttpClient() val mediaType = MediaType.parse("application/json") val body = RequestBody.create(mediaType, "{\"principal\":{\"id\":\"john.doe@sgnl.ai\",\"ipAddress\":\"172.217.22.14\",\"deviceId\":\"48:65:ee:17:7e:0b\"},\"queries\":[{\"action\":\"delete\"}]}") val request = Request.Builder() .url("https://access.sgnlapis.cloud/access/v2/search") .post(body) .addHeader("Content-Type", "application/json") .addHeader("Accept", "application/json") .addHeader("X-Request-Id", "bfe9eb29-ab87-4ca3-be83-a1d5d8305716") .addHeader("Authorization", "Bearer {access-token}") .build() val response = client.newCall(request).execute() ``` -------------------------------- ### Initialize Grafana Faro Web SDK Source: https://sgnl.ai/2022/10/securing-aws-access-with-sgnl/ This JavaScript snippet initializes the Grafana Faro Web SDK for application performance monitoring. It configures the SDK with a collector URL and application details, then appends the SDK script to the document's head. ```javascript var e=document.createElement("script");e.onload=()=>{window.GrafanaFaroWebSdk.initializeFaro({"url":"https://faro-collector-prod-us-central-0.grafana.net/collect/fd99a14e27fd8a4a5966909a0aefdc5f","app":{"name":"sgnl-ai","version":"1.0.0"}})},e.src="https://unpkg.com/@grafana/faro-web-sdk@^1.4.0/dist/bundle/faro-web-sdk.iife.js",document.head.appendChild(e) ``` -------------------------------- ### LinkedIn Insight Tag and Partner ID Setup Source: https://sgnl.ai/blog/ This code configures the LinkedIn Insight Tag for website analytics and conversion tracking. It includes setting the partner ID and initializing the tracking script to collect data for LinkedIn advertising campaigns. ```javascript _linkedin_partner_id="4340292",window._linkedin_data_partner_ids=window._linkedin_data_partner_ids||[],window._linkedin_data_partner_ids.push(_linkedin_partner_id) (function(e){e||(window.lintrk=function(e,t){window.lintrk.q.push([e,t])},window.lintrk.q=[])})(window.lintrk) var n=document.getElementsByTagName("script")[0],t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://snap.licdn.com/li.lms-analytics/insight.min.js",n.parentNode.insertBefore(t,n) ![](https://px.ads.linkedin.com/collect/?pid=4340292&fmt=gif) ``` -------------------------------- ### Initialize Grafana Faro Web SDK Source: https://sgnl.ai/contact/ This script initializes the Grafana Faro Web SDK for frontend monitoring. It configures the SDK to send application performance and error data to a specified Grafana collector URL. ```javascript var e=document.createElement("script");e.onload=()=>{window.GrafanaFaroWebSdk.initializeFaro({url:"https://faro-collector-prod-us-central-0.grafana.net/collect/fd99a14e27fd8a4a5966909a0aefdc5f",app:{name:"sgnl-ai",version:"1.0.0"}})},e.src="https://unpkg.com/@grafana/faro-web-sdk@^1.4.0/dist/bundle/faro-web-sdk.iife.js",document.head.appendChild(e) ``` -------------------------------- ### Initialize Grafana Faro Web SDK Source: https://sgnl.ai/blog/ This JavaScript code initializes the Grafana Faro Web SDK to collect and send application performance monitoring data. It configures the SDK with a specific collector URL and application details. ```javascript var e=document.createElement("script");e.onload=()=>{window.GrafanaFaroWebSdk.initializeFaro({"url":"https://faro-collector-prod-us-central-0.grafana.net/collect/fd99a14e27fd8a4a5966909a0aefdc5f","app":{"name":"sgnl-ai","version":"1.0.0"}})},e.src="https://unpkg.com/@grafana/faro-web-sdk@^1.4.0/dist/bundle/faro-web-sdk.iife.js",document.head.appendChild(e) ``` -------------------------------- ### Auth0 Token Response Example Source: https://help.sgnl.ai/articles/protected-systems/protected-system-idp-auth0/ This JSON object represents a sample response from the Auth0 authorization server's token endpoint. It includes the access token, ID token, scope, expiration time, and token type, which are essential for the application to authenticate and authorize user actions. ```json { "access_token": "{Access token string.}", "id_token": "{ID Token string.}", "scope": "openid profile email", "expires_in": 86400, "token_type": "Bearer" } ``` -------------------------------- ### AWS IAM Policy with Principal Tag Source: https://help.sgnl.ai/articles/protected-systems/protected-system-idp-okta/ An example AWS IAM policy statement that uses a Principal Tag to dynamically specify resource access. The policy allows all S3 actions on buckets prefixed with 'sensitive-prod-' followed by a customer ID derived from the Principal Tag, enabling role-based access control. ```json { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "s3:*", "Resource": "arn:aws:s3:::sensitive-prod-${aws:PrincipalTag/customerId}*" } ] } ``` -------------------------------- ### Initialize Grafana Faro Web SDK Source: https://sgnl.ai/2024/04/sgnl-demonstrates-standards-based-interoperability-with-okta-cisco-sailpoint-and-helisoft/ This JavaScript code initializes the Grafana Faro Web SDK for frontend observability. It configures the SDK with a specific collector URL and application details, enabling the collection of telemetry data from the web application. ```javascript (function(){var e=document.createElement("script");e.onload=()=>{window.GrafanaFaroWebSdk.initializeFaro({"url":"https://faro-collector-prod-us-central-0.grafana.net/collect/fd99a14e27fd8a4a5966909a0aefdc5f","app":{"name":"sgnl-ai","version":"1.0.0"}})},e.src="https://unpkg.com/@grafana/faro-web-sdk@^1.4.0/dist/bundle/faro-web-sdk.iife.js",document.head.appendChild(e)})() ``` -------------------------------- ### Sgnl AI Evaluations API POST Request Source: https://developer.sgnl.ai/ This snippet demonstrates how to make an HTTP POST request to the Sgnl AI Access API's evaluations endpoint. It includes setting up the request body with principal and query information, configuring necessary headers like Content-Type, Accept, X-Request-Id, Accept-Language, and Authorization, and executing the request. The examples cover common client libraries and built-in modules for various languages. ```kotlin import okhttp3.Request import okhttp3.RequestBody // Assuming 'client' is an OkHttpClient instance val body = RequestBody.create(mediaType, "{\"principal\":{\"id\":\"john.doe@sgnl.ai\",\"ipAddress\":\"172.217.22.14\",\"deviceId\":\"48:65:ee:17:7e:0b\"},\"queries\":[{\"action\":\"delete\",\"assetId\":\"3cdd2459-d9d3-4df4-abbd-8cee6fecea2d\"}]}") val request = Request.Builder() .url("https://access.sgnlapis.cloud/access/v2/evaluations") .post(body) .addHeader("Content-Type", "application/json") .addHeader("Accept", "application/json") .addHeader("X-Request-Id", "bfe9eb29-ab87-4ca3-be83-a1d5d8305716") .addHeader("Accept-Language", "en, en-US;q=0.8, es;q=0.7") .addHeader("Authorization", "Bearer {access-token}") .build() val response = client.newCall(request).execute() ``` ```csharp using RestSharp; var client = new RestClient("https://access.sgnlapis.cloud/access/v2/evaluations"); var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddHeader("Accept", "application/json"); request.AddHeader("X-Request-Id", "bfe9eb29-ab87-4ca3-be83-a1d5d8305716"); request.AddHeader("Accept-Language", "en, en-US;q=0.8, es;q=0.7"); request.AddHeader("Authorization", "Bearer {access-token}"); request.AddParameter("application/json", "{\"principal\":{\"id\":\"john.doe@sgnl.ai\",\"ipAddress\":\"172.217.22.14\",\"deviceId\":\"48:65:ee:17:7e:0b\"},\"queries\":[{\"action\":\"delete\",\"assetId\":\"3cdd2459-d9d3-4df4-abbd-8cee6fecea2d\"}]}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```go package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://access.sgnlapis.cloud/access/v2/evaluations" payload := strings.NewReader("{\"principal\":{\"id\":\"john.doe@sgnl.ai\",\"ipAddress\":\"172.217.22.14\",\"deviceId\":\"48:65:ee:17:7e:0b\"},\"queries\":[{\"action\":\"delete\",\"assetId\":\"3cdd2459-d9d3-4df4-abbd-8cee6fecea2d\"}]}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Content-Type", "application/json") req.Header.Add("Accept", "application/json") req.Header.Add("X-Request-Id", "bfe9eb29-ab87-4ca3-be83-a1d5d8305716") req.Header.Add("Accept-Language", "en, en-US;q=0.8, es;q=0.7") req.Header.Add("Authorization", "Bearer {access-token}") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```javascript const data = JSON.stringify({ "principal": { "id": "john.doe@sgnl.ai", "ipAddress": "172.217.22.14", "deviceId": "48:65:ee:17:7e:0b" }, "queries": [ { "action": "delete", "assetId": "3cdd2459-d9d3-4df4-abbd-8cee6fecea2d" } ] }); const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("POST", "https://access.sgnlapis.cloud/access/v2/evaluations"); xhr.setRequestHeader("Content-Type", "application/json"); xhr.setRequestHeader("Accept", "application/json"); xhr.setRequestHeader("X-Request-Id", "bfe9eb29-ab87-4ca3-be83-a1d5d8305716"); xhr.setRequestHeader("Accept-Language", "en, en-US;q=0.8, es;q=0.7"); xhr.setRequestHeader("Authorization", "Bearer {access-token}"); xhr.send(data); ``` ```nodejs const https = require("https"); const options = { "method": "POST", "hostname": "access.sgnlapis.cloud", "port": null, "path": "/access/v2/evaluations", "headers": { "Content-Type": "application/json", "Accept": "application/json", "X-Request-Id": "bfe9eb29-ab87-4ca3-be83-a1d5d8305716", "Accept-Language": "en, en-US;q=0.8, es;q=0.7", "Authorization": "Bearer {access-token}" } }; const req = https.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({ principal: { id: 'john.doe@sgnl.ai', ipAddress: '172.217.22.14', deviceId: '48:65:ee:17:7e:0b' }, queries: [{action: 'delete', assetId: '3cdd2459-d9d3-4df4-abbd-8cee6fecea2d'}] })); req.end(); ``` ```python import http.client conn = http.client.HTTPSConnection("access.sgnlapis.cloud") # The following lines are a conceptual continuation for Python, as the provided snippet was incomplete. # payload = "{\"principal\":{\"id\":\"john.doe@sgnl.ai\",\"ipAddress\":\"172.217.22.14\",\"deviceId\":\"48:65:ee:17:7e:0b\"},\"queries\":[{\"action\":\"delete\",\"assetId\":\"3cdd2459-d9d3-4df4-abbd-8cee6fecea2d\"}]}" # headers = { # 'Content-Type': 'application/json', # 'Accept': 'application/json', # 'X-Request-Id': 'bfe9eb29-ab87-4ca3-be83-a1d5d8305716', # 'Accept-Language': 'en, en-US;q=0.8, es;q=0.7', # 'Authorization': 'Bearer {access-token}' # } # conn.request("POST", "/access/v2/evaluations", payload, headers) # res = conn.getresponse() # data = res.read() # print(data.decode("utf-8")) # conn.close() ``` -------------------------------- ### Google Tag Manager Initialization Source: https://sgnl.ai/product/ Initializes Google Tag Manager (GTM) by asynchronously loading the GTM script. This snippet is typically found in the head of a web page to enable tracking and analytics. ```javascript (function(e,t,n,s,o){e[s]=e[s]||[],e[s].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var a=t.getElementsByTagName(n)[0],i=t.createElement(n),r=s!="dataLayer"?"&l="+s:"";i.async=!0,i.src="https://www.googletagmanager.com/gtm.js?id="+o+r,a.parentNode.insertBefore(i,a)})(window,document,"script","dataLayer","GTM-5JRNBQ6") ``` -------------------------------- ### Initialize Google Tag Manager Source: https://help.sgnl.ai/articles/protected-systems/protected-system-saas-salesforce/ This JavaScript snippet initializes Google Tag Manager for the website, embedding the necessary script to load the tag manager container. ```javascript (function(e,t,n,s,o){e[s]=e[s]||[];e[s].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var a=t.getElementsByTagName(n)[0],i=t.createElement(n),r=s!="dataLayer"?"&l="+s:"";i.async=!0,i.src="https://www.googletagmanager.com/gtm.js?id="+o+r,a.parentNode.insertBefore(i,a)})(window,document,"script","dataLayer","GTM-5JRNBQ6") ``` -------------------------------- ### Grafana Faro Web SDK Initialization Source: https://sgnl.ai/product/ Initializes the Grafana Faro Web SDK to collect frontend application performance and error data. It configures the SDK with a specific collector URL and application details. ```javascript var e=document.createElement("script");e.onload=()=>{window.GrafanaFaroWebSdk.initializeFaro({"url":"https://faro-collector-prod-us-central-0.grafana.net/collect/fd99a14e27fd8a4a5966909a0aefdc5f","app":{"name":"sgnl-ai","version":"1.0.0"}})},e.src="https://unpkg.com/@grafana/faro-web-sdk@^1.4.0/dist/bundle/faro-web-sdk.iife.js",document.head.appendChild(e) ``` -------------------------------- ### Initialize Grafana Faro Web SDK Source: https://sgnl.ai/2022/06/announcing-just-in-time-access-management/ This JavaScript code initializes the Grafana Faro Web SDK for frontend telemetry. It configures the SDK with a collector URL and application details to send performance and error data. ```javascript var e=document.createElement("script");e.onload=()=>{window.GrafanaFaroWebSdk.initializeFaro({"url":"https://faro-collector-prod-us-central-0.grafana.net/collect/fd99a14e27fd8a4a5966909a0aefdc5f","app":{"name":"sgnl-ai","version":"1.0.0"}})},e.src="https://unpkg.com/@grafana/faro-web-sdk@^1.4.0/dist/bundle/faro-web-sdk.iife.js",document.head.appendChild(e) ``` -------------------------------- ### Initialize Grafana Faro Web SDK Source: https://sgnl.ai/2025/04/dynamic-access-management-during-cloud-incident/ Initializes the Grafana Faro Web SDK for frontend telemetry collection. It configures the SDK with a specific collector URL and application details for monitoring. ```javascript var e=document.createElement("script");e.onload=()=>{window.GrafanaFaroWebSdk.initializeFaro({"url":"https://faro-collector-prod-us-central-0.grafana.net/collect/fd99a14e27fd8a4a5966909a0aefdc5f","app":{"name":"sgnl-ai","version":"1.0.0"}})},e.src="https://unpkg.com/@grafana/faro-web-sdk@^1.4.0/dist/bundle/faro-web-sdk.iife.js",document.head.appendChild(e) ``` -------------------------------- ### GitHub Models Feature Link Source: https://github.com/SGNL-ai Link to the GitHub Models feature page, focusing on managing and comparing prompts. ```html GitHub Models New Manage and compare prompts ``` -------------------------------- ### Demandbase Tracking Script Source: https://sgnl.ai/2024/08/zsp-vs-manual-privileges/ Loads the Demandbase JavaScript library asynchronously to enable tracking and analytics. It injects a script tag into the document's head for execution. ```javascript (function(e,t,n,s,o){var i=t.createElement(n),a=t.getElementsByTagName(n)[0];i.async=1,i.id=o,i.src=s,a.parentNode.insertBefore(i,a)})(window,document,"script","https://tag.demandbase.com/ad5637775a2bce4b.min.js","demandbase_js_lib") ``` -------------------------------- ### Grafana Faro Web SDK Initialization Source: https://sgnl.ai/2023/07/implementing-contextual-access-management-for-sensitive-data-in-snowflake/ Initializes the Grafana Faro Web SDK to collect frontend telemetry. It configures the SDK with a collector URL and application details for monitoring. ```javascript (function(){var e=document.createElement("script");e.onload=()=>{window.GrafanaFaroWebSdk.initializeFaro({url:"https://faro-collector-prod-us-central-0.grafana.net/collect/fd99a14e27fd8a4a5966909a0aefdc5f",app:{name:"sgnl-ai",version:"1.0.0"}})},e.src="https://unpkg.com/@grafana/faro-web-sdk@^1.4.0/dist/bundle/faro-web-sdk.iife.js",document.head.appendChild(e)})() ``` -------------------------------- ### Initialize Demandbase Tag Source: https://help.sgnl.ai/ This JavaScript snippet initializes the Demandbase tracking script. It dynamically creates a script element and appends it to the document, enabling Demandbase's advertising and analytics capabilities. ```javascript (function(e,t,n,s,o){var i=t.createElement(n),a=t.getElementsByTagName(n)[0];i.async=1,i.id=o,i.src=s,a.parentNode.insertBefore(i,a)})(window,document,"script","https://tag.demandbase.com/ad5637775a2bce4b.min.js","demandbase_js_lib") ``` -------------------------------- ### Demandbase Tracking Script Source: https://sgnl.ai/2023/08/caep-and-ssf-your-questions-answered/ This script integrates Demandbase's advertising and analytics capabilities. It asynchronously loads the Demandbase JavaScript library to enable tracking and data collection for marketing and advertising efforts. ```javascript (function(e,t,n,s,o){var i=t.createElement(n),a=t.getElementsByTagName(n)[0];i.async=1,i.id=o,i.src=s,a.parentNode.insertBefore(i,a)})(window,document,"script","https://tag.demandbase.com/ad5637775a2bce4b.min.js","demandbase_js_lib") ``` -------------------------------- ### GitHub Issues Feature Link Source: https://github.com/SGNL-ai Link to the GitHub Issues feature page, focusing on planning and tracking work. ```html Issues Plan and track work ``` -------------------------------- ### Initialize Demandbase Tracking Script Source: https://sgnl.ai/contact/ This script initializes the Demandbase tracking library for marketing analytics and account-based marketing. It loads the Demandbase JavaScript library with a specific account ID. ```javascript (function(e,t,n,s,o){var i=t.createElement(n),a=t.getElementsByTagName(n)[0];i.async=1,i.id=o,i.src=s,a.parentNode.insertBefore(i,a)})(window,document,"script","https://tag.demandbase.com/ad5637775a2bce4b.min.js","demandbase_js_lib") ```