Skip to content

feat: introduce role context - #43

Open
vknabel wants to merge 17 commits into
mainfrom
role-modes-on-behalf-provider
Open

vknabel wants to merge 17 commits into
mainfrom
role-modes-on-behalf-provider

Conversation

@vknabel

@vknabel vknabel commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Description

This is a draft for what we discussed. Related to https://github.com/fi-ts/fco-docs/pull/20

This PR tries to tackle multiple problems at once:

  • replace OperatorRole with an additional role_context method option that allows adjusting the behavior of tenant / project / product roles
    • ROLE_CONTEXT_UNSPECIFIED no restrictions
    • ROLE_CONTEXT_PROVIDER the tenant must be the provider tenant
    • ROLE_CONTEXT_ON_BEHALF the user must be in the provider tenant, the target tenant might differ
  • Some APIs will only be available for On Behalf permissions (e.g. fits_mvm-all#all-all-admin) using role_context = ROLE_CONTEXT_ON_BEHALF
  • Some APIs will only be available for provider tenants (e.g. fits_pcvm-all-all-admin) using role_context = ROLE_CONTEXT_PROVIDER
  • Some APIs will only be available for departments (e.g. fits_fcoconf-all-all-admin future to store tenant accounting data) using role_context = ROLE_CONTEXT_PROVIDER
  • conventions how to treat provider / on behalf services:
    • one dedicated file per context, suffixed *_provider.proto or *_on_behalf.proto (e.g. mvm_on_behalf.proto); public files must not carry the option at all
    • the service is named after the context plus the public service name (e.g. OnBehalfMVMService)
    • request / response messages wrap the public ones via composition and add the operator-only fields
    • enforced by Test_RoleContext in the api repo

@vknabel vknabel added the minor label Nov 11, 2026
@vknabel vknabel mentioned this pull request Nov 16, 2026
@vknabel
vknabel marked this pull request as ready for review November 16, 2026 10:29
@vknabel vknabel changed the title feat: introduce role modes feat: introduce role context Nov 16, 2026
@vknabel
vknabel force-pushed the role-modes-on-behalf-provider branch from 1de6749 to b683613 Compare November 17, 2026 13:24
Comment thread proto/fits/api/v1/token.proto Resolved
@ma-hartma
ma-hartma force-pushed the role-modes-on-behalf-provider branch from 9956cac to 7137218 Compare November 18, 2026 12:25
@ma-hartma
ma-hartma requested a review from simcod November 19, 2026 09:38
import "google/protobuf/timestamp.proto";

// OnBehalfMVMService offers MVM operations on behalf of a customer tenant.
service OnBehalfMVMService {

@ma-hartma ma-hartma Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We also need to add a OnBehalfManagedVM, that outputs the billing information to show it in the clients - with a different GET and LIST endpoint.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just introduced that. @Pilzington and @ostempel would you mind taking a look and report how this feels?

@Pilzington Pilzington Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@ma-hartma Not sure what you mean. These endpoints do not exist yet?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

At the moment we don't do any role or permissions in the frontend, so we "just" use the customer view. I have some PR which should streamline and prepare for permissions per product.

Nevertheless you are right @ma-hartma, that we will also need an endpoint to present the information, that only provider or on-behalf can see.

@ma-hartma
ma-hartma requested a review from ostempel November 20, 2026 13:52
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.

5 participants