{"slug":"integrate-oso-with-aperture","title":"Integrate Oso with Aperture","tags":["tailscale"],"agent_summary":"Last validated: Apr 9, 2026","trigger_phrases":[],"runnable":false,"markdown":"\r\n# Integrate Oso with Aperture\r\n\r\nLast validated: Apr 9, 2026\r\n\r\nAperture by Tailscaleis currently [in alpha](https://tailscale.com/docs/reference/tailscale-release-stages#alpha).\r\n\r\n[Oso](https://www.osohq.com/) is an authorization platform that provides fine-grained access control for AI agents. By connecting Aperture to Oso, you can send tool use data from LLM requests so Oso can make authorization decisions and provide observability into what your AI agents are doing.\r\n\r\nAperture sends data to Oso using the [hooks system](https://tailscale.com/docs/aperture/configuration#hooks). You configure a hook endpoint for Oso and a grant that specifies which requests trigger the hook and what data to include.\r\n\r\n## [Prerequisites](https://tailscale.com/docs/aperture/how-to/integrate-oso\\#prerequisites)\r\n\r\nBefore you begin, ensure you have the following:\r\n\r\n- A running [Aperture instance](https://tailscale.com/docs/aperture/get-started) accessible from your device.\r\n- An [Oso](https://www.osohq.com/) account with an API key. If you don't have one, you can sign up from the Aperture dashboard.\r\n\r\n## [Configure the Oso hook](https://tailscale.com/docs/aperture/how-to/integrate-oso\\#configure-the-oso-hook)\r\n\r\nTo integrate Oso with Aperture, configure a hook in Aperture that points to the Oso API endpoint. This lets you send tool use data to Oso for authorization decisions and observability.\r\n\r\n1. Open the Aperture dashboard at `http://ai/ui/`.\r\n\r\n2. Go to the **Tool Use** page, then select **View Tool Use in Oso**.\r\n\r\n3. Sign in to your Oso account (or sign up) and create an API key.\r\n\r\n4. Navigate to the **Settings** page and open the JSON editor.\r\n\r\n5. Add an `oso` entry in the `hooks` section with your API key.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n```json\r\n\"hooks\": {\r\n       \"oso\": {\r\n           \"url\": \"https://api.osohq.com/api/agents/v1/model-request\",\r\n           \"apikey\": \"YOUR_OSO_API_KEY\"\r\n       }\r\n}\r\n```\r\n\r\n\r\n\r\nReplace `YOUR_OSO_API_KEY` with the API key you created in step 3.\r\n\r\n6. Add a grant with a `send_hooks` entry that references the `oso` hook. The grant controls which requests trigger the hook and what data Aperture sends.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n```json\r\n\"grants\": [\\\r\n       {\\\r\n           \"src\": [\"*\"],\\\r\n           \"app\": {\\\r\n               \"tailscale.com/cap/aperture\": [\\\r\n                   {\\\r\n                       \"send_hooks\": [\\\r\n                           {\\\r\n                               \"name\": \"oso\",\\\r\n                               \"events\": [\"tool_call_entire_request\"],\\\r\n                               \"send\": [\"user_message\", \"tools\", \"request_body\", \"response_body\"]\\\r\n                           }\\\r\n                       ]\\\r\n                   }\\\r\n               ]\\\r\n           }\\\r\n       }\\\r\n]\r\n```\r\n\r\n\r\n\r\nThis configuration sends tool call data for all users. To limit which users' requests trigger the hook, replace `\"*\"` in the `src` field with specific user identities or tags.\r\n\r\n7. Save the configuration.\r\n\r\n\r\nFor details on hook events and send types, refer to the [hooks configuration reference](https://tailscale.com/docs/aperture/configuration#hooks).\r\n\r\n## [Verify the integration](https://tailscale.com/docs/aperture/how-to/integrate-oso\\#verify-the-integration)\r\n\r\nAfter configuring the Oso hook, verify that Aperture is sending data to Oso and that it appears in the Oso dashboard.\r\n\r\n1. Send a request through Aperture that includes a tool call and matches your grant conditions.\r\n2. Open the [Oso dashboard](https://www.osohq.com/) and confirm the tool use data appears.\r\n\r\nIf data doesn't appear, check that the `send_hooks` name matches the key in your `hooks` section and that the grant's `src` field includes the user who made the request.\r\n\r\n## [Next steps](https://tailscale.com/docs/aperture/how-to/integrate-oso\\#next-steps)\r\n\r\n- [Build a custom webhook](https://tailscale.com/docs/aperture/how-to/build-custom-webhook) to send Aperture data to other services.\r\n- Learn about hook events and data types in the [configuration reference](https://tailscale.com/docs/aperture/configuration#hooks).\r\n- Explore other [external integrations](https://tailscale.com/docs/aperture/integrate) for Aperture.\r\n\r\n![Project Logo](https://cdn.brandfetch.io/tailscale.com/fallback/lettermark/theme/dark/h/256/w/256/icon?c=1bfwsmEH20zzEfSNTed)\r\n\r\nAsk AI\r\n\r\nreCAPTCHA\r\n\r\nRecaptcha requires verification.\r\n\r\nprotected by **reCAPTCHA**\r\n","html":"<h1>Integrate Oso with Aperture</h1>\n<p>Last validated: Apr 9, 2026</p>\n<p>Aperture by Tailscaleis currently <a href=\"https://tailscale.com/docs/reference/tailscale-release-stages#alpha\">in alpha</a>.</p>\n<p><a href=\"https://www.osohq.com/\">Oso</a> is an authorization platform that provides fine-grained access control for AI agents. By connecting Aperture to Oso, you can send tool use data from LLM requests so Oso can make authorization decisions and provide observability into what your AI agents are doing.</p>\n<p>Aperture sends data to Oso using the <a href=\"https://tailscale.com/docs/aperture/configuration#hooks\">hooks system</a>. You configure a hook endpoint for Oso and a grant that specifies which requests trigger the hook and what data to include.</p>\n<h2><a href=\"https://tailscale.com/docs/aperture/how-to/integrate-oso#prerequisites\">Prerequisites</a></h2>\n<p>Before you begin, ensure you have the following:</p>\n<ul>\n<li>A running <a href=\"https://tailscale.com/docs/aperture/get-started\">Aperture instance</a> accessible from your device.</li>\n<li>An <a href=\"https://www.osohq.com/\">Oso</a> account with an API key. If you don't have one, you can sign up from the Aperture dashboard.</li>\n</ul>\n<h2><a href=\"https://tailscale.com/docs/aperture/how-to/integrate-oso#configure-the-oso-hook\">Configure the Oso hook</a></h2>\n<p>To integrate Oso with Aperture, configure a hook in Aperture that points to the Oso API endpoint. This lets you send tool use data to Oso for authorization decisions and observability.</p>\n<ol>\n<li>\n<p>Open the Aperture dashboard at <code>http://ai/ui/</code>.</p>\n</li>\n<li>\n<p>Go to the <strong>Tool Use</strong> page, then select <strong>View Tool Use in Oso</strong>.</p>\n</li>\n<li>\n<p>Sign in to your Oso account (or sign up) and create an API key.</p>\n</li>\n<li>\n<p>Navigate to the <strong>Settings</strong> page and open the JSON editor.</p>\n</li>\n<li>\n<p>Add an <code>oso</code> entry in the <code>hooks</code> section with your API key.</p>\n</li>\n</ol>\n<pre><code class=\"language-json\">\"hooks\": {\r\n       \"oso\": {\r\n           \"url\": \"https://api.osohq.com/api/agents/v1/model-request\",\r\n           \"apikey\": \"YOUR_OSO_API_KEY\"\r\n       }\r\n}\n</code></pre>\n<p>Replace <code>YOUR_OSO_API_KEY</code> with the API key you created in step 3.</p>\n<ol start=\"6\">\n<li>Add a grant with a <code>send_hooks</code> entry that references the <code>oso</code> hook. The grant controls which requests trigger the hook and what data Aperture sends.</li>\n</ol>\n<pre><code class=\"language-json\">\"grants\": [\\\r\n       {\\\r\n           \"src\": [\"*\"],\\\r\n           \"app\": {\\\r\n               \"tailscale.com/cap/aperture\": [\\\r\n                   {\\\r\n                       \"send_hooks\": [\\\r\n                           {\\\r\n                               \"name\": \"oso\",\\\r\n                               \"events\": [\"tool_call_entire_request\"],\\\r\n                               \"send\": [\"user_message\", \"tools\", \"request_body\", \"response_body\"]\\\r\n                           }\\\r\n                       ]\\\r\n                   }\\\r\n               ]\\\r\n           }\\\r\n       }\\\r\n]\n</code></pre>\n<p>This configuration sends tool call data for all users. To limit which users' requests trigger the hook, replace <code>\"*\"</code> in the <code>src</code> field with specific user identities or tags.</p>\n<ol start=\"7\">\n<li>Save the configuration.</li>\n</ol>\n<p>For details on hook events and send types, refer to the <a href=\"https://tailscale.com/docs/aperture/configuration#hooks\">hooks configuration reference</a>.</p>\n<h2><a href=\"https://tailscale.com/docs/aperture/how-to/integrate-oso#verify-the-integration\">Verify the integration</a></h2>\n<p>After configuring the Oso hook, verify that Aperture is sending data to Oso and that it appears in the Oso dashboard.</p>\n<ol>\n<li>Send a request through Aperture that includes a tool call and matches your grant conditions.</li>\n<li>Open the <a href=\"https://www.osohq.com/\">Oso dashboard</a> and confirm the tool use data appears.</li>\n</ol>\n<p>If data doesn't appear, check that the <code>send_hooks</code> name matches the key in your <code>hooks</code> section and that the grant's <code>src</code> field includes the user who made the request.</p>\n<h2><a href=\"https://tailscale.com/docs/aperture/how-to/integrate-oso#next-steps\">Next steps</a></h2>\n<ul>\n<li><a href=\"https://tailscale.com/docs/aperture/how-to/build-custom-webhook\">Build a custom webhook</a> to send Aperture data to other services.</li>\n<li>Learn about hook events and data types in the <a href=\"https://tailscale.com/docs/aperture/configuration#hooks\">configuration reference</a>.</li>\n<li>Explore other <a href=\"https://tailscale.com/docs/aperture/integrate\">external integrations</a> for Aperture.</li>\n</ul>\n<p><img src=\"https://cdn.brandfetch.io/tailscale.com/fallback/lettermark/theme/dark/h/256/w/256/icon?c=1bfwsmEH20zzEfSNTed\" alt=\"Project Logo\"></p>\n<p>Ask AI</p>\n<p>reCAPTCHA</p>\n<p>Recaptcha requires verification.</p>\n<p>protected by <strong>reCAPTCHA</strong></p>\n"}