Subsystem-specific permission definitions for PIM, Offline, IGA, and PAM systems.
This repository contains permission plugins for each major subsystem:
- pim-perms-plugins - Plugin trait and registration system
- pim-perms-plugin-pim - Privileged Identity Management (26 permissions)
- pim-perms-plugin-offline - Offline Systems Management (30 permissions)
- pim-perms-plugin-iga - Identity Governance & Administration (43 permissions)
- pim-perms-plugin-pam - Privileged Access Management (31 permissions)
- Rust 1.70+
- pim-perms-backend crates (models, core)
# Build all plugins
cargo build --all
# Run tests
cargo test --all
# Lint
cargo clippy --all -- -D warningspim-perms-plugins/
├── Cargo.toml # Workspace
├── crates/
│ ├── pim-perms-plugins/ # Plugin trait
│ ├── pim-perms-plugin-pim/
│ ├── pim-perms-plugin-offline/
│ ├── pim-perms-plugin-iga/
│ └── pim-perms-plugin-pam/
├── tests/ # Integration tests
└── test-utils/ # Shared test utilities
Central Documentation: pim-perms-docs
Plugin-Specific:
- Plugin Architecture
- Implementation Guide
- Offline Plugin Security Plan - Detailed security plan for offline plugin
Each plugin defines:
- Permissions: Resource + Action combinations
- Workflows: Approval chains for sensitive operations
- Custom Logic: Plugin-specific authorization rules
use pim_perms_plugins::PermissionPlugin;
pub struct PimPlugin;
impl PermissionPlugin for PimPlugin {
fn name(&self) -> &str {
"pim"
}
fn permissions(&self) -> Vec<Permission> {
vec![
Permission::new("pim", "credential", "view"),
Permission::new("pim", "credential", "create"),
// ... more permissions
]
}
fn workflows(&self) -> Vec<WorkflowDefinition> {
vec![
// Define approval workflows
]
}
}- Credentials: view, create, update, delete, checkout
- Passwords: view, rotate, checkout, checkin
- Discovery: view, create, update, delete, run
- Jobs: view, create, update, delete, run, stop
- Systems: view, create, update, delete, connect
See OFFLINE_PLUGIN_SECURITY_PLAN.md for complete details.
- Clients: view, create, update, delete, enroll
- Identities: view, create, update, delete, approve
- Groups: view, create, update, delete
- Policies: view, create, update, delete, deploy
- Recovery: view, initiate, approve, audit
- Events: view, create, update, delete, process
- Destinations: view, create, update, delete, test
- Mappings: view, create, update, delete
- Queue: view, retry, delete, clear
- Certifications: view, create, update, approve, reject
- Compliance: view, reports, export
- Vaults: view, create, update, delete
- Secrets: view, create, update, delete, checkout
- Sessions: view, monitor, record, terminate
- Break-Glass: use, approve, audit
- JIT Access: request, approve, revoke
Each plugin has comprehensive tests:
- Permission Definition Tests: Validate all permissions are properly defined
- Workflow Tests: Test approval chain logic
- Integration Tests: Test plugin registration and interaction with core
# Test specific plugin
cargo test -p pim-perms-plugin-offline
# Test all plugins
cargo test --all
# Check coverage
cargo tarpaulin --allPlugins depend on the core backend:
[dependencies]
pim-perms-models = { git = "https://github.com/analog-pim/pim-perms-backend" }
pim-perms-core = { git = "https://github.com/analog-pim/pim-perms-backend" }
pim-perms-plugins = { path = "../pim-perms-plugins" }- Create new crate:
cargo new --lib pim-perms-plugin-{name} - Implement
PermissionPlugintrait - Define permissions for your subsystem
- Add workflows if needed
- Write tests
- Update workspace
Cargo.toml
- Add permission definition in
src/permissions.rs - Add to plugin's
permissions()method - Add tests
- Update documentation
- If high-risk, add approval workflow
Same as backend:
- Auto-testing on PR
- Auto-linting
- Coverage checks (75%+ required for plugins)
See Backend README for contribution guidelines.
See main PIM-Perms Documentation for project overview.