Grant Drift
curl --request GET \
--url https://{deployment}/v1/grants/{grant_id}/drift \
--header 'Authorization: Bearer <token>'import requests
url = "https://{deployment}/v1/grants/{grant_id}/drift"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{deployment}/v1/grants/{grant_id}/drift', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{deployment}/v1/grants/{grant_id}/drift",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{deployment}/v1/grants/{grant_id}/drift"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{deployment}/v1/grants/{grant_id}/drift")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{deployment}/v1/grants/{grant_id}/drift")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"grant_id": "<string>",
"known": true,
"reading": "<string>",
"reason": "<string>",
"issued_against_version": 123,
"issued_against_hash": "<string>",
"current_version": 123,
"current_hash": "<string>",
"drifted": true,
"version_tolerance": "<string>",
"within_tolerance": true,
"tolerance_verdict": "<string>",
"tools_added_since": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authority
Grant Drift
Has the agent changed since this authority was issued?
Reported rather than enforced. Blocking on drift would break production on every deploy, and a control people disable in week one protects nothing — but a grant whose subject moved underneath it is a fact the person accountable for it should be told.
Who may call it: any role. A workspace API key is refused here: this is an act that belongs to a named person.
GET
/
v1
/
grants
/
{grant_id}
/
drift
Grant Drift
curl --request GET \
--url https://{deployment}/v1/grants/{grant_id}/drift \
--header 'Authorization: Bearer <token>'import requests
url = "https://{deployment}/v1/grants/{grant_id}/drift"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{deployment}/v1/grants/{grant_id}/drift', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{deployment}/v1/grants/{grant_id}/drift",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{deployment}/v1/grants/{grant_id}/drift"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{deployment}/v1/grants/{grant_id}/drift")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{deployment}/v1/grants/{grant_id}/drift")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"grant_id": "<string>",
"known": true,
"reading": "<string>",
"reason": "<string>",
"issued_against_version": 123,
"issued_against_hash": "<string>",
"current_version": 123,
"current_hash": "<string>",
"drifted": true,
"version_tolerance": "<string>",
"within_tolerance": true,
"tolerance_verdict": "<string>",
"tools_added_since": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Response
Successful Response
Has the agent changed since this authority was issued, and does it matter?
