Commit Graph

25 Commits

Author SHA1 Message Date
Aurélien Sibiril
05781d1bbd Address code review feedback
- Return 400 instead of panicking on invalid organization_id
- Use generic error message for internal failures
- Drop duplicate validation from initiate handler (kept in tx)
- Make preserveConnectionFields mutate in place
- Remove as type assertions in GoogleWorkspaceConnector
- Use sort.Slice instead of sort.SliceStable
- Consistent error prefixes in Slack sender

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-04-13 19:24:46 +02:00
Aurélien Sibiril
816b9300ed fix(slack): select widest-scope connector in sender
sendMessage and updateMessage used LoadAllByOrganizationIDProtocol
AndProvider and then picked connectors[0], which is ordered by
created_at ASC. On an organization with multiple Slack installs
only the oldest install ever received messages — re-installing
Slack to switch channels silently broke because the sort kept
the old row winning.

Switch to LoadOneByOrganizationIDAndProvider, which picks the
widest-scope row with updated_at DESC as the tiebreak. For Slack
the scope sets are typically identical across installs, so the
effective behavior becomes "most recent install wins" — the
expected behavior.

While here, prefix the remaining error messages in this file with
"cannot" to match the project convention.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-04-13 19:24:46 +02:00
Aurélien Sibiril
56c042b7ed Add OAuth2 scope sources for access review, slack, googleworkspace
Each module that initiates an OAuth2 flow now declares its scopes
in its own package instead of duplicating them in the frontend or
in shared connector config:

- pkg/accessreview/drivers: per-provider scopes for the access
  review drivers
- pkg/slack: scopes for the compliance page integration
- pkg/iam/scim/bridge/provider/googleworkspace: scopes for the
  SCIM provisioning bridge

These constants are surfaced to the frontend via GraphQL fields
so the frontend never hardcodes scope strings.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-04-08 11:05:12 +02:00
Bryan Frimin
f17fb7bf49 Upgrade to kit v0.3.0
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-04-03 11:56:06 +02:00
Sacha Al Himdani
8c02c53315 Update copyright headers across all Go files
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-25 17:38:32 +01:00
Émile Ré
87415c0324 Remove useless encryption key injections
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-11 14:42:37 +04:00
Émile Ré
323cd602a1 Update business logic
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-05 10:36:08 +04:00
Sacha Al Himdani
21ed4113c3 Go format
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-03 11:17:05 +01:00
Bryan Frimin
df56ae90e9 Fix noisy slack queue message error
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-02-10 09:37:10 +01:00
Bryan Frimin
ece54f1616 Fix golint errors
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-02-02 18:42:50 +01:00
Émile Ré
b8608fbec5 Fix slack compliance page access request fullname empty case
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-01-29 10:56:32 +04:00
Émile Ré
249d82f0fe Edit email links
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-01-28 21:53:52 +04:00
Sacha Al Himdani
504d31af6c Ignore no slack connector error during trust center access update
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2025-12-22 11:38:44 +01:00
Sacha Al Himdani
cf491a2096 Create slack message if necessary
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2025-12-22 11:09:51 +01:00
Émile Ré
c0b2a5702d Introduce pkg/mail.Addr
Signed-off-by: Émile Ré <nemile.re@gmail.com>
2025-12-15 18:24:00 +01:00
Émile Ré
ec13bd8108 Rework top level services injection of business level services
Signed-off-by: Émile Ré <nemile.re@gmail.com>
2025-12-11 18:42:26 +01:00
manish-singh-bisht
8eeab0a6d0 feat:pull the slack message service out to slack pkg
Signed-off-by: manish-singh-bisht <mthefool218@gmail.com>
2025-12-11 18:42:26 +01:00
Bryan Frimin
59aa332ab5 Move to vanity import url
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-10-31 17:01:52 +01:00
Bryan Frimin
6f2bd9c92f Fix failed to to cannot
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-10-30 16:38:08 +01:00
Sacha Al Himdani
789e047b4d Unmarshal body
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2025-10-23 15:10:56 +02:00
Sacha Al Himdani
0c29d6fa41 Fix join slack channel payload parsing
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2025-10-23 15:10:56 +02:00
Sacha Al Himdani
e44fc23671 Validate slack response url
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2025-10-23 15:10:55 +02:00
Sacha Al Himdani
b0f60d8de5 Refactor slack messages
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2025-10-23 15:10:55 +02:00
Sacha Al Himdani
0073846d3b Add interactif slack message
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2025-10-23 15:10:55 +02:00
Sacha Al Himdani
de004ce8d7 Add slack integration
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2025-10-23 15:10:54 +02:00