Skip to content

Commit 33386a9

Browse files
committed
feat(auth): add scoped application and webhook signing for Durable Streams
1 parent aa8800b commit 33386a9

77 files changed

Lines changed: 3904 additions & 172 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Cargo.lock‎

Lines changed: 89 additions & 85 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎docs/api/content/tokens/create.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ Content type: `application/json`.
5353
| --- | --- | --- | --- |
5454
| `duration` | `integer \| null` | No | Lifetime in seconds. Omit for the default lifetime. |
5555
| `grants` | `object[]` | Yes | Permissions the token carries. |
56-
| `grants[].operations` | `("read" \| "update" \| "list" \| "create" \| "delete")[]` | Yes | Operations the token may perform on the target. |
57-
| `grants[].resource` | `"namespace" \| "actor" \| "runner" \| "runner_config" \| "datacenter" \| "actor_gateway" \| "actor_kv"` | Yes | Resource type the grant applies to. |
56+
| `grants[].operations` | `("read" \| "update" \| "list" \| "create" \| "delete" \| "append" \| "close")[]` | Yes | Operations the token may perform on the target. |
57+
| `grants[].resource` | `"namespace" \| "actor" \| "runner" \| "runner_config" \| "datacenter" \| "actor_gateway" \| "actor_kv" \| "actor_stream" \| "durable_stream" \| "application_token" \| "webhook_signing"` | Yes | Resource type the grant applies to. |
5858
| `grants[].target` | `"any" \| object` | Yes | `"any"` for every resource of this type, or `{ "id": "..." }` for one resource. |
5959
| `namespace` | `string` | Yes | Namespace the token is valid in. |
6060
| `subject` | `string \| null` | No | Free-form subject to attach to the token, such as a user ID. |

‎docs/api/content/tokens/inspect.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ Send your namespace token as a bearer token in the `Authorization` header. Every
3434
| --- | --- | --- |
3535
| `expires_ts` | `integer` | When the token expires, in Unix milliseconds. |
3636
| `grants` | `object[]` | Permissions the token carries. |
37-
| `grants[].operations` | `("read" \| "update" \| "list" \| "create" \| "delete")[]` | Operations the token may perform on the target. |
38-
| `grants[].resource` | `"namespace" \| "actor" \| "runner" \| "runner_config" \| "datacenter" \| "actor_gateway" \| "actor_kv"` | Resource type the grant applies to. |
37+
| `grants[].operations` | `("read" \| "update" \| "list" \| "create" \| "delete" \| "append" \| "close")[]` | Operations the token may perform on the target. |
38+
| `grants[].resource` | `"namespace" \| "actor" \| "runner" \| "runner_config" \| "datacenter" \| "actor_gateway" \| "actor_kv" \| "actor_stream" \| "durable_stream" \| "application_token" \| "webhook_signing"` | Resource type the grant applies to. |
3939
| `grants[].target` | `"any" \| object` | `"any"` for every resource of this type, or `{ "id": "..." }` for one resource. |
4040
| `issued_ts` | `integer` | When the token was issued, in Unix milliseconds. |
4141
| `namespace_id` | `string` | ID of the namespace the token is scoped to. |

‎docs/api/error-registry.json‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,6 +1478,42 @@
14781478
}
14791479
]
14801480
},
1481+
{
1482+
"name": "signing",
1483+
"description": null,
1484+
"errors": [
1485+
{
1486+
"code": "conflict",
1487+
"message": "The signing key generation or request ID conflicts with current state.",
1488+
"statuses": []
1489+
},
1490+
{
1491+
"code": "invalid_input",
1492+
"message": "Invalid signing request.",
1493+
"statuses": []
1494+
},
1495+
{
1496+
"code": "not_found",
1497+
"message": "The namespace signing keys have not been provisioned.",
1498+
"statuses": []
1499+
},
1500+
{
1501+
"code": "payload_too_large",
1502+
"message": "The signing payload or token exceeds its size limit.",
1503+
"statuses": []
1504+
},
1505+
{
1506+
"code": "throttled",
1507+
"message": "The namespace signing quota or service capacity is exhausted.",
1508+
"statuses": []
1509+
},
1510+
{
1511+
"code": "unavailable",
1512+
"message": "The signing service is temporarily unavailable.",
1513+
"statuses": []
1514+
}
1515+
]
1516+
},
14811517
{
14821518
"name": "sqlite",
14831519
"description": null,

‎engine/artifacts/errors/signing.conflict.json‎

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎engine/artifacts/errors/signing.invalid_input.json‎

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎engine/artifacts/errors/signing.not_found.json‎

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎engine/artifacts/errors/signing.payload_too_large.json‎

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎engine/artifacts/errors/signing.throttled.json‎

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎engine/artifacts/errors/signing.unavailable.json‎

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)