Skip to content

Conversation

@btoonk
Copy link
Contributor

@btoonk btoonk commented Jun 12, 2025

Summary by CodeRabbit

  • New Features
    • Added support for user groups, including group details such as ID, name, and type, which are now included in authorization responses.

@coderabbitai
Copy link

coderabbitai bot commented Jun 12, 2025

Walkthrough

A new Group message was introduced in the common protobuf definitions, containing uuid, name, and type fields. Additionally, the AuthorizeResponse message in the connector protobuf was updated to include a repeated groups field of type Group. No other changes were made.

Changes

File(s) Change Summary
common/messages.proto Added new Group message with uuid, name, and type fields.
connector/connector.proto Added repeated Group groups = 8 to AuthorizeResponse message.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant Connector
    participant Common

    Client->>Connector: Request authorization
    Connector->>Common: Reference Group definitions
    Connector-->>Client: AuthorizeResponse (includes groups: [Group, ...])
Loading

Poem

In proto fields, a group appears,
With uuid, name, and type it steers.
AuthorizeResponse now can say,
Which groups are part of your array.
Hopping forward, code anew—
The fields are fresh, the bytes are few!
🐇✨


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates protocol buffer definitions and generated code across multiple language targets to add support for groups in authentication responses. Key changes include:

  • Introducing a new Group message in the proto files and generating corresponding types in Swift, Go, and Kotlin.
  • Removing the @unchecked attribute from several Swift message types to improve type safety.
  • Updating decoding, traversal, and DSL implementations to include the new groups field in auth responses.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
gen/swift/messages.pb.swift Adds a new Border0_Common_V1_Group struct with SwiftProtobuf.Message conformance.
gen/swift/device.pb.swift Removes the @unchecked attribute from AuthChallenge-related messages.
gen/swift/connector.pb.swift Adds the groups field in AuthorizeResponse and updates decoding/traversal accordingly.
gen/kotlin/border0/v1/AuthorizeResponseKt.kt Introduces DSL support for the new groups field in auth responses in Kotlin.
gen/kotlin/border0/common/v1/GroupKt.kt Implements a new Group DSL builder in Kotlin.
connector/connector.proto Adds a new repeated field for Group in the AuthorizeResponse message.
connector/connector.pb.go Adds support for the new groups field in the generated Go code for AuthorizeResponse.
common/messages.proto Introduces a new Group message with uuid, name, and type fields.
common/messages.pb.go Adds generated Go code for the new Group message.
Comments suppressed due to low confidence (1)

common/messages.proto:127

  • Consider adding a documentation comment for the new Group message to explain its purpose and usage.
message Group {

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
common/messages.proto (1)

126-131: New Group message defined
The Group message with uuid, name, and type fields is correctly declared under proto3. Consider adding a leading doc comment above the message to describe its semantics or enumerate valid values for the type field.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 95ff1a1 and eac9482.

⛔ Files ignored due to path filters (7)
  • common/messages.pb.go is excluded by !**/*.pb.go
  • connector/connector.pb.go is excluded by !**/*.pb.go
  • gen/kotlin/border0/common/v1/GroupKt.kt is excluded by !**/gen/**
  • gen/kotlin/border0/v1/AuthorizeResponseKt.kt is excluded by !**/gen/**
  • gen/swift/connector.pb.swift is excluded by !**/gen/**
  • gen/swift/device.pb.swift is excluded by !**/gen/**
  • gen/swift/messages.pb.swift is excluded by !**/gen/**
📒 Files selected for processing (2)
  • common/messages.proto (1 hunks)
  • connector/connector.proto (1 hunks)
🔇 Additional comments (1)
connector/connector.proto (1)

224-224: Added groups field to AuthorizeResponse
The repeated Group field integrates correctly with the common protobuf definitions. In proto3, adding a new field is backward-compatible—older clients will ignore unknown fields. Make sure to regenerate all affected client/server stubs so they include this new field.

@btoonk btoonk merged commit af5034e into main Jun 12, 2025
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.

4 participants