Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agents/features/api-tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Fine-grained access tokens that allow external integrations to interact with Tas
## Capabilities

- Create named API tokens with an expiration date
- Scoped permissions: task:read, task:write, label:read, label:write, dav:read, dav:write, user:read, user:write, token:write
- Scoped permissions: Tasks.Read, Tasks.Write, Labels.Read, Labels.Write, Dav.Read, Dav.Write, User.Read, User.Write, Tokens.Write
- Write scopes automatically include their corresponding read scope
- Tokens are validated the same way as JWT sessions but carry scope restrictions
- List and delete existing tokens from the settings UI
Expand Down
16 changes: 8 additions & 8 deletions apiserver/internal/models/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ type SignedInIdentity struct {
type ApiTokenScope string

const (
ApiTokenScopeTaskRead ApiTokenScope = "task:read"
ApiTokenScopeTaskWrite ApiTokenScope = "task:write"
ApiTokenScopeLabelRead ApiTokenScope = "label:read"
ApiTokenScopeLabelWrite ApiTokenScope = "label:write"
ApiTokenScopeUserRead ApiTokenScope = "user:read"
ApiTokenScopeUserWrite ApiTokenScope = "user:write"
ApiTokenScopeDavRead ApiTokenScope = "dav:read"
ApiTokenScopeDavWrite ApiTokenScope = "dav:write"
ApiTokenScopeTaskRead ApiTokenScope = "Tasks.Read"
ApiTokenScopeTaskWrite ApiTokenScope = "Tasks.Write"
ApiTokenScopeLabelRead ApiTokenScope = "Labels.Read"
ApiTokenScopeLabelWrite ApiTokenScope = "Labels.Write"
ApiTokenScopeUserRead ApiTokenScope = "User.Read"
ApiTokenScopeUserWrite ApiTokenScope = "User.Write"
ApiTokenScopeDavRead ApiTokenScope = "Dav.Read"
ApiTokenScopeDavWrite ApiTokenScope = "Dav.Write"
)

func AllUserScopes() []ApiTokenScope {
Expand Down
10 changes: 5 additions & 5 deletions mcpserver/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@
Resource = mcpResource,
AuthorizationServers = { authority },
ScopesSupported = {
$"{audience}/user:read",
$"{audience}/label:read",
$"{audience}/label:write",
$"{audience}/task:read",
$"{audience}/task:write",
$"{audience}/User.Read",
$"{audience}/Labels.Read",
$"{audience}/Labels.Write",
$"{audience}/Tasks.Read",
$"{audience}/Tasks.Write",
},
BearerMethodsSupported = { "header" },
};
Expand Down
Loading