Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.DS_Store
*.iml
.cache/
.cursor/
venv/
*.json
*.pyc
Expand Down
2 changes: 1 addition & 1 deletion keepercommander/commands/discoveryrotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
from .pam_debug.rotation_setting import PAMDebugRotationSettingsCommand
from .pam_debug.link import PAMDebugLinkCommand
from .pam_debug.vertex import PAMDebugVertexCommand
from .pam_import.edit import PAMProjectCommand
from .pam_import.commands import PAMProjectCommand
from .pam_launch.launch import PAMLaunchCommand
from .pam_service.list import PAMActionServiceListCommand
from .pam_service.add import PAMActionServiceAddCommand
Expand Down
17 changes: 15 additions & 2 deletions keepercommander/commands/pam_import/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,28 @@
## PAM Import Command
## PAM Project Import Commands
PAM Import command helps customers with thousands of managed companies to automate the creation of folders, gateways, machines, users, connections, tunnels and (optionally) rotations.

### Command line options

`pam project import --name=project1 --filename=/path/to/import.json --dry-run`
Initial Import.
`pam project import --name=project1 --filename=/path/to/import.json [--dry-run]`

- `--name`, `-n` → Project name _(overrides `"project":""` from JSON)_
- `--filename`, `-f` → JSON file to load import data from.
- `--dry-run`, `-d` → Test import without modifying vault.


Adding new PAM resources and users to an existing PAM configuration from an import file. The command validates folders and records, then creates only new items (match by title, existing records are skipped). The import JSON format is the same.
`pam project extend --config=<uid_or_title> --filename=/path/to/import.json [--dry-run]`

- `--config`, `-c` → PAM Configuration record UID or title.
- `--filename`, `-f` → JSON file to load import data from.
- `--dry-run`, `-d` → Test import without modifying vault.

> **Notes:**
- Use **`--dry-run`** to preview what would be created and to see detailed validation output without changing the vault.
- If the command reports errors, run it again with **`--dry-run`** for more detailed error messages.


### JSON format details
Text UI (TUI) elements (a.k.a. JSON Keys) match their Web UI counterparts so you can create the correponding record type in your web vault to help you visualize all options and possible values.

Expand Down
3,334 changes: 3,334 additions & 0 deletions keepercommander/commands/pam_import/base.py

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions keepercommander/commands/pam_import/commands.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# _ __
# | |/ /___ ___ _ __ ___ _ _ ®
# | ' </ -_) -_) '_ \/ -_) '_|
# |_|\_\___\___| .__/\___|_|
# |_|
#
# Keeper Commander
# Copyright 2025 Keeper Security Inc.
# Contact: ops@keepersecurity.com
#

from .edit import PAMProjectImportCommand
from .extend import PAMProjectExtendCommand
from ..base import GroupCommand

class PAMProjectCommand(GroupCommand):
def __init__(self):
super(PAMProjectCommand, self).__init__()
self.register_command("import", PAMProjectImportCommand(), "Import PAM Project", "i")
self.register_command("extend", PAMProjectExtendCommand(), "Extend PAM Project by importing additional data", "e")
3,336 changes: 50 additions & 3,286 deletions keepercommander/commands/pam_import/edit.py

Large diffs are not rendered by default.

Loading