Skip to content

Commit 01d5249

Browse files
Merge pull request #17 from Keeper-Security/feature/nested-shared-folders-support
feat: Nested Shared Folder support, picker badges, and Run Securely hardening
2 parents a342de2 + 24f4585 commit 01d5249

40 files changed

Lines changed: 3526 additions & 406 deletions

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
## [Unreleased]
44

5+
### Added
6+
- **Nested Shared Folder support** across *Get Keeper Folder*, *Get Keeper Secret*, *Add Keeper Record*, *Update Keeper Record*, and *Generate Keeper Secret*. The plugin routes to Classic (`record-*`) or Nested Shared (`nsf-*`) commands based on vault metadata.
7+
- **Searchable folder and record picker** with **Classic** / **Nested** badges on each row.
8+
9+
### Changed
10+
- **Get Keeper Folder** and **Get Keeper Secret** now include Nested Shared folders and records alongside Classic ones.
11+
- **Update Keeper Record** validates the record UID and chooses `record-update` vs `nsf-record-update` automatically.
12+
- **Run Keeper Securely** validates `keeper://` record UIDs and hardens environment injection from resolved secrets.
13+
14+
### Fixed
15+
- **Commander compatibility** for current folder and record discriminators (`classic_folder` / `nested_share_folder`, `Classic` / `Nested`), with support for older wire values.
16+
517
## [1.2.0] - 2026-06-22
618

719
### Added

README.md

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Keeper Security JetBrains Plugin
22

33
<!-- Plugin description -->
4-
A comprehensive JetBrains IDE plugin that integrates Keeper Security vault functionality directly into your development workflow. Use Keeper references in `.env` files and in **JetBrains HTTP Client** (`.http` files) where supported, save **Run Keeper Securely** run configurations, and use Tools-menu actions to manage secrets without pasting plaintext into your project.
4+
A comprehensive JetBrains IDE plugin that integrates Keeper Security vault functionality directly into your development workflow. Supports **Classic** and **Nested Shared Folder** vault items in the same actions. Use Keeper references in `.env` files and in **JetBrains HTTP Client** (`.http` files) where supported, save **Run Keeper Securely** run configurations, and use Tools-menu actions to manage secrets without pasting plaintext into your project.
55

66
The goal is to enable developers to manage secrets securely without leaving their development environment, while maintaining the highest security standards and providing seamless integration with existing Keeper Security infrastructure.
77

@@ -23,7 +23,7 @@ The goal is to enable developers to manage secrets securely without leaving thei
2323

2424
## Overview
2525

26-
A comprehensive JetBrains IDE plugin that integrates Keeper Security vault functionality directly into your development workflow: secret references in `.env` and **HTTP Client** requests, **Run Keeper Securely** from the Tools menu or as a saved run configuration, and vault actions from the editor.
26+
A comprehensive JetBrains IDE plugin that integrates Keeper Security vault functionality directly into your development workflow: secret references in `.env` and **HTTP Client** requests, **Run Keeper Securely** from the Tools menu or as a saved run configuration, and vault actions for **Classic** and **Nested Shared Folder** items from the editor.
2727

2828
The goal is to enable developers to manage secrets securely without leaving their development environment, while maintaining the highest security standards and providing seamless integration with existing Keeper Security infrastructure.
2929

@@ -36,7 +36,8 @@ The goal is to enable developers to manage secrets securely without leaving thei
3636
- **JetBrains HTTP Client** (optional): Reference vault values in `.http` files via the `$keeper(...)` dynamic variable where the HTTP Client plugin is bundled (e.g. IntelliJ IDEA Ultimate)
3737
- **Run configurations**: Save a **Run Keeper Securely** configuration (`.env` path, working directory, command) under **Run → Edit Configurations** with output in the Run tool window
3838
- **Fast Performance**: Uses persistent Keeper shell for blazing-fast secret operations
39-
- **Folder Management**: Select and manage Keeper vault folders for organized secret storage
39+
- **Nested Shared Folders**: Classic and Nested Shared folders and records in the same actions; automatic routing to `record-*` or `nsf-*` Commander commands
40+
- **Folder Management**: Select Classic or Nested Shared folders for organized secret storage
4041
- **Record Operations**: Create new records, update existing ones, and retrieve field references
4142
- **Comprehensive Logging**: Built-in logging system with detailed operation tracking
4243
- **Retry Logic**: Robust error handling with automatic retry for shell startup timing
@@ -46,6 +47,7 @@ The goal is to enable developers to manage secrets securely without leaving thei
4647
- **Keeper Commander CLI**: Must be installed and authenticated on your system
4748
- Download from [Keeper Commander Installation Guide](https://docs.keeper.io/commander/)
4849
- Authenticate using persistent login or biometric login
50+
- **Nested Shared Folder** create/update flows need a recent Commander with `nsf-*` commands ([CLI reference](https://docs.keeper.io/keeperpam/commander-cli/command-reference/nested-shared-folder)). Run `pip install --upgrade keepercommander` if you see unknown `nsf-record-add` errors.
4951
- **Keeper Security Account**: Active subscription with vault access
5052
- **System Requirements**:
5153
- JetBrains IDE: **2024.3 or later** (`pluginSinceBuild = 243`)
@@ -89,11 +91,11 @@ All Keeper actions are available through two locations:
8991
| Action | Description | Use Case |
9092
|--------|-------------|----------|
9193
| Check Keeper Authorization | Verify Keeper CLI installation and authentication | Troubleshoot connection issues |
92-
| Get Keeper Secret | Insert existing secrets from vault as references | Retrieve stored secrets without exposing values |
94+
| Get Keeper Secret | Insert existing secrets (Classic or Nested Shared) as references | Retrieve stored secrets without exposing values |
9395
| Add Keeper Record | Create new vault record from selected text | Replace hardcoded secrets with vault references |
94-
| Update Keeper Record | Update existing vault record and replace text | Modify existing secret values |
96+
| Update Keeper Record | Update existing record by UID and replace text | Modify existing secret values |
9597
| Generate Keeper Secret | Generate secure passwords and store in vault | Create new secure credentials |
96-
| Get Keeper Folder | Select vault folder for organized storage | Choose storage location for new records |
98+
| Get Keeper Folder | Select Classic or Nested Shared folder for this project | Choose storage location for new records |
9799
| Run Keeper Securely | Run a command with secrets from `.env` (Tools menu or saved run configuration) | Run applications or scripts with vault-backed env vars |
98100

99101
### Command Details
@@ -113,8 +115,8 @@ All Keeper actions are available through two locations:
113115
**Steps**:
114116
1. Position cursor where you want to insert the secret reference (including inside a `.http` file, when using HTTP Client)
115117
2. Right-click → `Get Keeper Secret` or `Tools → Keeper Vault → Get Keeper Secret`
116-
3. Plugin shows list of available vault records
117-
4. Select the specific record you want to use
118+
3. Plugin shows a searchable list of vault records (Classic and Nested Shared), each with a **Classic** or **Nested** badge
119+
4. Select the record you want to use
118120
5. Choose the field from that record
119121
6. Plugin inserts the appropriate reference at the cursor (e.g. `keeper://…` in `.env`/code, or an HTTP Client snippet in `.http` files where supported)
120122

@@ -135,10 +137,10 @@ database_password = keeper://abc123def456/field/password
135137
**Steps**:
136138
1. Select text containing a secret (password, token, API key, etc.)
137139
2. Right-click → `Add Keeper Record` or `Tools → Keeper Vault → Add Keeper Record`
138-
3. Enter record title when prompted
139-
4. Enter field name for the secret
140-
5. Plugin creates new vault record
141-
6. Selected text is replaced with secret reference
140+
3. Run **Get Keeper Folder** first if you want new records in a specific Classic or Nested Shared folder (otherwise the vault root is used)
141+
4. Enter record title when prompted
142+
5. Enter field name for the secret
143+
6. Plugin creates the record in the correct vault (Classic or Nested Shared) and replaces the selection with a secret reference
142144

143145
**Example**:
144146
```javascript
@@ -153,22 +155,21 @@ const apiKey = keeper://new-record-uid/field/api_key;
153155
**Purpose**: Update an existing Keeper record with new secret value and replace selected text with reference.
154156

155157
**Steps**:
156-
1. Select text containing the updated secret value
158+
1. Select text containing the updated secret value (or place the caret on the value after `=`)
157159
2. Right-click → `Update Keeper Record`
158-
3. Choose existing record from the list
159-
4. Select field to update
160-
5. Plugin updates the vault record
161-
6. Selected text is replaced with reference
160+
3. Enter the Keeper **record UID** when prompted
161+
4. Enter the **field name** to update
162+
5. Plugin validates the UID, updates the record in the correct vault (Classic or Nested Shared), and replaces the selection with a `keeper://` reference
162163

163164
#### Generate Keeper Secret
164165
**Purpose**: Generate secure passwords and store them in Keeper Security vault.
165166

166167
**Steps**:
167168
1. Position cursor where you want the secret reference
168169
2. Right-click → `Generate Keeper Secret`
169-
3. Enter record title and field name
170-
4. Plugin generates secure password and stores it in vault
171-
5. Secret reference is inserted at cursor position
170+
3. Run **Get Keeper Folder** first if you want the new record in a specific Classic or Nested Shared folder
171+
4. Enter record title and field name when prompted
172+
5. Plugin generates a secure password, stores it in the correct vault, and inserts a secret reference at the cursor
172173

173174
**Example**:
174175
```yaml
@@ -180,13 +181,12 @@ admin_password: keeper://generated-record-uid/field/password
180181
```
181182
182183
#### Get Keeper Folder
183-
**Purpose**: Select the vault folder where new secrets will be stored for this project.
184+
**Purpose**: Select a Classic or Nested Shared folder for this project (used by **Add Keeper Record** and **Generate Keeper Secret**).
184185
185186
**Steps**:
186187
1. Go to `Tools → Keeper Vault → Get Keeper Folder`
187-
2. Plugin displays available vault folders
188-
3. Select desired folder for this workspace
189-
4. Future `Add Keeper Record` and `Generate Keeper Secret` operations will use this folder
188+
2. Search and pick a folder; each row shows a **Classic** or **Nested** badge
189+
3. The selection is saved for this project; add and generate actions use the matching Commander command family (`record-*` or `nsf-*`)
190190

191191
#### Run Keeper Securely
192192
**Purpose**: Run commands with secrets injected from Keeper Security vault through `.env` file processing (`keeper://…` references are resolved at run time).
@@ -213,6 +213,8 @@ API_KEY=keeper://api-record-uid/field/key
213213
SECRET_KEY=keeper://app-record-uid/field/secret
214214
```
215215

216+
Record UIDs in `keeper://` references must be valid Keeper record UIDs (22 URL-safe Base64 characters: `A-Z`, `a-z`, `0-9`, `_`, `-`). Invalid UIDs are skipped with an error message.
217+
216218
**Command execution** (conceptually):
217219
```bash
218220
# After resolution, your process receives real env values
@@ -298,7 +300,7 @@ If you encounter issues, enable detailed logging:
298300
**Problem**: Commands don't have access to injected secrets or fail to execute
299301

300302
**Solutions**:
301-
- Verify your `.env` file contains valid `keeper://` references
303+
- Verify your `.env` file contains valid `keeper://` references with 22-character record UIDs
302304
- Ensure all referenced secrets exist in your vault
303305
- For **Run → Run Keeper Securely**, confirm paths and working directory in **Edit Configurations**
304306
- For the **Tools** menu flow, check the result dialog and logs if the command fails

build.gradle.kts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,15 @@ tasks.test {
193193
include("**/KeeperRecordUpdateActionTest*")
194194
include("**/KeeperSecretActionTest*")
195195
include("**/KeeperAuthActionTest*")
196+
// Nested Shared Folders coverage (those flows are folded into the unified
197+
// KeeperFolderSelectAction / KeeperGetSecretAction tests above; the
198+
// shared validator + target-prompt suites are independent and stay).
199+
include("**/KeeperRecordOutputValidatorsTest*")
200+
include("**/KeeperRecordTargetPromptTest*")
201+
include("**/KeeperFolderValidatorTest*")
202+
include("**/KeeperRecordValidatorTest*")
203+
include("**/KeeperCliSafetyTest*")
204+
include("**/KeeperEnvSafetyTest*")
196205
}
197206

198207
intellijPlatformTesting {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pluginGroup = com.keepersecurity.jetbrains
77
pluginName = Keeper Security
88
pluginRepositoryUrl = https://github.com/Keeper-Security/keeper-jetbrains-plugin
99
# SemVer format -> https://semver.org
10-
pluginVersion = 1.2.0
10+
pluginVersion = 2.0.0
1111

1212
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
1313
pluginSinceBuild = 243

0 commit comments

Comments
 (0)