Skip to content

feat: add wildcard support for capability checks in TailscaleAuthMiddleware#11

Merged
jaxxstorm merged 1 commit intomainfrom
cap_all
Jan 20, 2025
Merged

feat: add wildcard support for capability checks in TailscaleAuthMiddleware#11
jaxxstorm merged 1 commit intomainfrom
cap_all

Conversation

@jaxxstorm
Copy link
Copy Markdown
Member

@jaxxstorm jaxxstorm commented Jan 20, 2025

Important

Enhance TailscaleAuthMiddleware in cap.go to support wildcard capability checks for methods and endpoints using matchStringListOrWildcard.

  • Behavior:
    • Enhance TailscaleAuthMiddleware in cap.go to support wildcard "*" in Methods and Endpoints for capability checks.
    • Introduce matchStringListOrWildcard function in cap.go to handle wildcard logic.
  • Imports:
    • Add import for github.com/lbrlabs/tacl/pkg/cap in main.go.

This description was created by Ellipsis for f40e839. It will automatically update as commits are pushed.

Fixes #10

@ellipsis-dev ellipsis-dev bot changed the title ... feat: add wildcard support for capability checks in TailscaleAuthMiddleware Jan 20, 2025
@jaxxstorm jaxxstorm merged commit 9631b88 into main Jan 20, 2025
@jaxxstorm jaxxstorm deleted the cap_all branch January 20, 2025 17:58
Copy link
Copy Markdown

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to f40e839 in 1 minute and 15 seconds

More details
  • Looked at 58 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. pkg/cap/cap.go:134
  • Draft comment:
    The comment above matchStringListOrWildcard should clarify that it checks for the presence of "*" or the specific item in the list.
  • Reason this comment was not posted:
    Confidence changes required: 10%
    The function matchStringListOrWildcard is correctly implemented, but the comment above it is slightly misleading. It should mention that the function checks for the presence of "*" or the specific item in the list.

Workflow ID: wflow_UA7EP4zf8aQIF8cs


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow wildcards in tailscale CAP

1 participant