Skip to content

Conversation

@nyagamunene
Copy link
Contributor

What type of PR is this?

What does this do?

Which issue(s) does this PR fix/relate to?

Have you included tests for your changes?

Did you document any new/modified feature?

Notes

@codecov
Copy link

codecov bot commented Dec 18, 2025

Codecov Report

❌ Patch coverage is 41.66667% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.68%. Comparing base (59f8d4e) to head (30bd274).

Files with missing lines Patch % Lines
auth/pat.go 19.23% 21 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3295      +/-   ##
==========================================
- Coverage   76.52%   73.68%   -2.85%     
==========================================
  Files          15      179     +164     
  Lines        1423    19701   +18278     
==========================================
+ Hits         1089    14516   +13427     
- Misses        246     4330    +4084     
- Partials       88      855     +767     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nyagamunene nyagamunene marked this pull request as ready for review December 18, 2025 21:06
@nyagamunene nyagamunene requested a review from a team as a code owner December 18, 2025 21:06
}

if strings.HasPrefix(token, patPrefix) {
tokenType := authn.TokenType(res.GetTokenType())
Copy link
Collaborator

Choose a reason for hiding this comment

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

This creates possible misconfiguration issue. I.e. what if token prefix here and tokenType returned from the service are not the same? While we are not able to validate token - we are able to parse it locally (even if only for prefix) and we can do this verification to prevent mismatch.

} else {
req.Operation = auth.ListOp
}
req.Operation = auth.ChannelDisconnectClientOp
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's stay consistent in naming, compare this to ClientConnectToChannelOp.

UnshareOp
PublishOp
SubscribeOp
ClientCreateOp Operation = iota + 100
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to reuse the existing service Operations ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we will have cyclic imports

Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
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.

Feature: PAT align with new architecture

3 participants