Skip to content

Conversation

@rSnapkoOpenOps
Copy link
Collaborator

Fixes OPS-2987.

@linear
Copy link

linear bot commented Dec 24, 2025

Copy link
Contributor

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 adds support for integration authorization by introducing a new IntegrationAuthorization service and controller. The implementation enables users to generate long-lived tokens for third-party integrations like Slack Bot.

Key changes:

  • Added IntegrationName enum and updated the schema to use it instead of a generic string
  • Implemented TokenGeneratorPrincipal type and corresponding TOKEN_GENERATOR principal type for integration tokens
  • Created service layer and REST endpoint for generating and storing integration authorization tokens

Reviewed changes

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

Show a summary per file
File Description
packages/shared/src/lib/integration-authorization/integration-authorization.ts Added IntegrationName enum and updated schema to use enum instead of string
packages/shared/src/lib/authentication/model/principal.ts Added TokenGeneratorPrincipal type for integration authorization
packages/shared/src/lib/authentication/model/principal-type.ts Added TOKEN_GENERATOR principal type
packages/server/api/test/unit/integration-authorization/integration-authorization.service.test.ts Added unit tests for integration authorization service
packages/server/api/src/app/integration-authorization/integration-authorization.service.ts Implemented service for creating integration authorizations
packages/server/api/src/app/integration-authorization/integration-authorization.module.ts Created module to register the controller
packages/server/api/src/app/integration-authorization/integration-authorization.controller.ts Implemented REST endpoint for integration authorization
packages/server/api/src/app/authentication/context/access-token-manager.ts Added method to generate token generator tokens with 3-month expiration
packages/server/api/src/app/app.ts Registered the integration authorization module

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rSnapkoOpenOps rSnapkoOpenOps marked this pull request as ready for review December 24, 2025 16:09
…authorization-controller

# Conflicts:
#	packages/shared/src/lib/integration-authorization/integration-authorization.ts
…ice, controller, tests, and database logic accordingly.
…edRefreshToken` type and enhance token handling logic
@sonarqubecloud
Copy link

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.

2 participants