Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter out space and organization names based on permissions #3962

Conversation

philippthun
Copy link
Member

@philippthun philippthun commented Sep 10, 2024

When a user has access to a shared service instance (i.e. read permissions on any of the shared spaces), the guids of all shared spaces are visible, but only those space and organization names the user is allowed to read based on the given roles.

Example

DEVELOPER who is space developer in SPACE_1, SPACE_2 and SPACE_3 shared SERVICE_INSTANCE from SPACE_1 to SPACE_2 and SPACE_3. For each space there is a dedicated space auditor (AUDITOR_1, AUDITOR_2 and AUDITOR_3).

SPACE_1

DEVELOPER (space developer)
AUDITOR_1 (space auditor)
SERVICE_INSTANCE

SPACE_2

DEVELOPER (space developer)
AUDITOR_2 (space auditor)
shared SERVICE_INSTANCE

SPACE_3

DEVELOPER (space developer)
AUDITOR_3 (space auditor)
shared SERVICE_INSTANCE

Original behavior (before PR #3931):

  • AUDITOR_1 can see SPACE_2.guid + name and SPACE_3.guid + name
    ⚠️ SPACE_2.name and SPACE_3.name should not be readable
  • AUDITOR_2 cannot see shared spaces
    ⚠️ shared spaces should be readable
  • AUDITOR_3 cannot see shared spaces
    ⚠️ shared spaces should be readable

Changed behavior (with PR #3931):

  • AUDITOR_1 can see SPACE_2.guid + name and SPACE_3.guid + name
    ⚠️ SPACE_2.name and SPACE_3.name should not be readable
  • AUDITOR_2 can see SPACE_2.guid + name and SPACE_3.guid + name
    ⚠️ SPACE_3.name should not be readable
  • AUDITOR_3 can see SPACE_2.guid + name and SPACE_3.guid + name
    ⚠️ SPACE_2.name should not be readable

New behavior (this change):

  • AUDITOR_1 can see SPACE_2.guid and SPACE_3.guid
  • AUDITOR_2 can see SPACE_2.guid + name and SPACE_3.guid
  • AUDITOR_3 can see SPACE_2.guid and SPACE_3.guid + name
  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

When a user has access to a shared service instance (i.e. read
permissions on any of the shared spaces), the guids of all shared spaces
are visible, but only those space and organization names the user is
allowed to read based on the given roles.

Example:

  DEVELOPER who is space developer in SPACE_1, SPACE_2 and SPACE_3
  shared SERVICE_INSTANCE from SPACE_1 to SPACE_2 and SPACE_3. For each
  space there is a dedicated space auditor (AUDITOR_1, AUDITOR_2 and
  AUDITOR_3).

  SPACE_1
  -------
    DEVELOPER (space developer)
    AUDITOR_1 (space auditor)
    SERVICE_INSTANCE

  SPACE_2
  -------
    DEVELOPER (space developer)
    AUDITOR_2 (space auditor)
    shared SERVICE_INSTANCE

  SPACE_3
  -------
    DEVELOPER (space developer)
    AUDITOR_3 (space auditor)
    shared SERVICE_INSTANCE

Original behavior (before PR cloudfoundry#3931):

  - AUDITOR_1 can see SPACE_2.guid + name and SPACE_3.guid + name
    => SPACE_2.name and SPACE_3.name should not be readable
  - AUDITOR_2 cannot see shared spaces
    => shared spaces should be readable
  - AUDITOR_3 cannot see shared spaces
    => shared spaces should be readable

Changed behavior (with PR cloudfoundry#3931):

  - AUDITOR_1 can see SPACE_2.guid + name and SPACE_3.guid + name
    => SPACE_2.name and SPACE_3.name should not be readable
  - AUDITOR_2 can see SPACE_2.guid + name and SPACE_3.guid + name
    => SPACE_3.name should not be readable
  - AUDITOR_3 can see SPACE_2.guid + name and SPACE_3.guid + name
    => SPACE_2.name should not be readable

New behavior (this change):

  - AUDITOR_1 can see SPACE_2.guid and SPACE_3.guid
  - AUDITOR_2 can see SPACE_2.guid + name and SPACE_3.guid
  - AUDITOR_3 can see SPACE_2.guid and SPACE_3.guid + name
@philippthun philippthun force-pushed the shared-spaces-decorator-permissions branch from ddc3801 to 6be5087 Compare September 13, 2024 06:22
@philippthun philippthun marked this pull request as ready for review September 13, 2024 06:22
@philippthun philippthun merged commit 1f30750 into cloudfoundry:main Sep 16, 2024
8 checks passed
ari-wg-gitbot added a commit to cloudfoundry/capi-release that referenced this pull request Sep 16, 2024
Changes in cloud_controller_ng:

- Filter out space and organization names based on permissions
    PR: cloudfoundry/cloud_controller_ng#3962
    Author: Philipp Thun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants