Skip to content

Conversation

@RomanNikitenko
Copy link
Collaborator

@RomanNikitenko RomanNikitenko commented Dec 3, 2025

What does this PR do?

  • Adds ability to manage extensions installation using vscode-editor-configurations ConfigMap
  • Install button is disabled and there is a warning message if an extension is not allowed for installation
Screenshot 2025-12-30 at 13 23 51
  • It's possible to check allowed extensions list using Settings => extensions.allowed key:
Screenshot 2025-12-30 at 13 39 08 - Installed extension will be disabled when administrator adds it to not allowed extensions: Screenshot 2025-12-30 at 17 51 40

Examples of the different extensions.allowed setting values:

image

What issues does this PR fix?

https://issues.redhat.com/browse/CRW-8866
see another part for the issue ^ in #617

How to test this PR?

1. Deny All Extensions
policy.json: |
    {
      "AllowedExtensions": { 
          "*": false
       }
    }

Expected behavior:

Extension Can
be installed
All extensions -

2. Only extensions defined in the "AllowedExtensions" section can be installed
policy.json: |
    {
      "AllowedExtensions": { 
          "dbaeumer.vscode-eslint": true,
          "redhat.vscode-yaml": true
       }
    }

Expected behavior:

Extension Can
be installed
dbaeumer.vscode-eslint +
redhat.vscode-yaml +
other extensions -

3. Defined extensions can not be installed, all other extensions are allowed
policy.json: |
    {
      "AllowedExtensions": { 
          "*": true,
          "dbaeumer.vscode-eslint": false,
          "redhat.vscode-yaml": false
       }
    }

Expected behavior:

Extension Can
be installed
dbaeumer.vscode-eslint -
redhat.vscode-yaml -
other extensions +

4. Do not allow all extensions from a specific publisher (by publisher ID)
policy.json: |
    {
      "AllowedExtensions": { 
          "*": true,
          "redhat": false
       }
    }

Expected behavior:

Extension Can
be installed
all redhat extensions -
redhat.java -
redhat.vscode-xml -
redhat.vscode-yaml -
redhat.vscode-quarkus -
other extensions +

5. Allow only extensions from a specific publisher (by publisher ID), other extensions are not allowed
policy.json: |
    {
      "AllowedExtensions": { 
          "*": false,
          "redhat": true
       }
    }

Expected behavior:

Extension Can
be installed
all redhat extensions +
redhat.java +
redhat.vscode-xml +
redhat.vscode-yaml +
redhat.vscode-quarkus +
other extensions -

6. Allow only specified versions of an extension
policy.json: |
    {
      "AllowedExtensions": { 
          "*": true,
          "redhat.vscode-xml": ["0.28.0", "0.28.1"]
       }
    }

Expected behavior:

Extension Can
be installed
all redhat extensions +
0.28.0 redhat.vscode-xml +
0.28.1 redhat.vscode-xml +
another version of redhat.vscode-xml -
other extensions +

Does this PR contain changes that override default upstream Code-OSS behavior?

  • the PR contains changes in the code folder (you can skip it if your changes are placed in a che extension )
  • the corresponding items were added to the CHANGELOG.md file
  • rules for automatic git rebase were added to the .rebase folder

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

Click here to review and test in web IDE: Contribute

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

@RomanNikitenko RomanNikitenko force-pushed the allowed-extensions-management branch from 1873893 to 7eeefac Compare December 11, 2025 13:54
@github-actions
Copy link

@RomanNikitenko RomanNikitenko force-pushed the allowed-extensions-management branch from 7eeefac to 0c47509 Compare December 12, 2025 15:05
@github-actions
Copy link

Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Assisted-by: Cursor AI
@RomanNikitenko RomanNikitenko force-pushed the allowed-extensions-management branch from 0c47509 to 72b8768 Compare December 29, 2025 10:38
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Assisted-by: Cursor AI
@RomanNikitenko RomanNikitenko force-pushed the allowed-extensions-management branch from 2a7e90d to 1b342e5 Compare December 31, 2025 10:03
@RomanNikitenko RomanNikitenko marked this pull request as ready for review December 31, 2025 10:19
@github-actions
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.

1 participant