Skip to content

Conversation

@ZeRego
Copy link
Collaborator

@ZeRego ZeRego commented Nov 3, 2025

Closes: #N/A

Description:

Enable custom roles by default and add project-level roles to SCIM API responses. This PR enhances the SCIM service to include both organization-level and project-level roles (including custom roles) when listing available roles. The implementation filters out preview projects and properly formats role identifiers with project context.

The changes allow identity providers to see and manage a complete set of roles including:

  • Organization-level system roles
  • Project-level system roles
  • Project-level custom roles

Each project role is formatted with a composite ID (projectUuid:roleId) and a display name that includes the project name for clarity.

List roles
Screenshot 2025-11-03 at 17 01 08

Get project role
Screenshot 2025-11-03 at 17 00 47

List roles (with custom role)
Screenshot 2025-11-03 at 17 02 20

Get custom project role:
Screenshot 2025-11-03 at 17 02 40

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Collaborator Author

ZeRego commented Nov 3, 2025

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

Your preview environment pr-17812 has been deployed.

Preview environment endpoints are available at:

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

You can ssh into the preview environment by running: ./scripts/okteto-ssh.sh 17812

Copy link
Contributor

@stevelikesmusic stevelikesmusic left a comment

Choose a reason for hiding this comment

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

One question about making custom roles available outside of the env var.

},
customRoles: {
enabled: process.env.CUSTOM_ROLES_ENABLED === 'true',
enabled: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to enable custom roles for everyone now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

rollback

schemas: [ScimSchemaType.LIST_RESPONSE],
totalResults: 5, // viewer, interactive_viewer, editor, developer, admin
itemsPerPage: 5,
totalResults: 21, // 5 org system + 2 org custom + 7 per project (2 projects) = 5+2+14 = 21
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't yet support org roles, which is probably why this test is failing.

const parsedFilter = filter ? parse(filter) : null;
this.logger.debug('SCIM: Parsed role filter', { parsedFilter });

const allScimRoles: ScimRole[] = [];
Copy link
Contributor

Choose a reason for hiding this comment

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

What would you think of abstracting this into a getAllRoles method?

Base automatically changed from feat_add_SCIM_role_controller_and_endpoints to main November 4, 2025 10:39
@github-actions
Copy link

github-actions bot commented Nov 4, 2025

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

You can ssh into the preview environment by running: ./scripts/okteto-ssh.sh 17812

@ZeRego ZeRego force-pushed the feat_enable_custom_roles_by_default_and_add_project-level_roles_to_SCIM branch from 936f641 to 58da8f2 Compare November 4, 2025 10:43
@ZeRego ZeRego changed the title feat: enable custom roles by default and add project-level roles to SCIM API feat: add project-level roles to SCIM API Nov 4, 2025
@github-actions
Copy link

github-actions bot commented Nov 4, 2025

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

You can ssh into the preview environment by running: ./scripts/okteto-ssh.sh 17812

@ZeRego ZeRego merged commit ab2c118 into main Nov 4, 2025
49 of 52 checks passed
@ZeRego ZeRego deleted the feat_enable_custom_roles_by_default_and_add_project-level_roles_to_SCIM branch November 4, 2025 14:26
lightdash-bot pushed a commit that referenced this pull request Nov 4, 2025
# [0.2136.0](0.2135.2...0.2136.0) (2025-11-04)

### Features

* add project-level roles to SCIM API ([#17812](#17812)) ([ab2c118](ab2c118))
@lightdash-bot
Copy link
Collaborator

🎉 This PR is included in version 0.2136.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants