agentsclimarketplace

Kozen iam rectification

Skill kozen-labs/agentic/.agents/skills/kozen-iam-rectification

Agentic Repository: Skills, Sub-Agents, Hooks, Context, etc.

Install
npx -y skills add kozen-labs/agentic --skill kozen-iam-rectification

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Reference skill for @kozen/iam-rectification — a Kozen module that validates and rectifies MongoDB user roles/permissions to ensure compliance with the principle of least privilege. Covers IRectificationOption and IRectificationOptionX509 interfaces, IRectificationResponse (extra/missing/present permissions), IAMRectificationScram and IAMRectificationX509 services, CLI commands (iam-rectification:verify), MCP tools (kozen_iam_rectify_scram, kozen_iam_rectify_x509), all environment variables and CLI flags, and programmatic use as a library in TypeScript projects.

SKILL.md

4.1 KB, as published. Nobody here has run it

@kozen/iam-rectification — MongoDB IAM Permission Validation

@kozen/iam-rectification verifies that a MongoDB user has exactly the permissions required for an operation — no more, no less. It produces a structured report identifying missing permissions (which would cause runtime failures), extra permissions (security over-privilege), and present permissions (correctly granted). Supports both SCRAM-SHA-256 and X.509 certificate authentication.


Routing table

SignalReference
IAMRectificationModule, IIAMRectification, IAMRectificationScram, IAMRectificationX509, IRectificationOption, IRectificationOptionX509, IRectificationResponse, IRectificationScramArg, IRectificationX509Arg, all iam exports, rectify method, SCRAM rectification, X509 rectification, iam-rectification:verify, iam-rectification:help, kozen_iam_rectify_scram, kozen_iam_rectify_x509, MCP IAM tools, programmatic IAM, standalone IAM, library IAM, permissions extra missing present, URI resolution rules, X509 TLS context, audit permissions, CI/CD IAM gate, exit code missing permissions, KOZEN_IAM_METHOD, KOZEN_IAM_URI_ENV, --uriEnv, --permissions, --method, --cert, --key, --ca, --certPath, --caPath, --host, --app, --username, --password, --isCluster, --protocol, environment variables IAM, CLI flags IAM, default permissions listreferences/api.md

When to use this skill

  • Auditing MongoDB user permissions from the CLI
  • Running IAM validation as a step in a CI/CD pipeline
  • Exposing permission auditing to an LLM via MCP
  • Importing IAMRectificationScram or IAMRectificationX509 in a Node.js project
  • Understanding the IRectificationResponse output format and how to act on it

Quick start

npm install @kozen/iam-rectification
# Verify SCRAM user permissions
npx kozen --moduleLoad=@kozen/iam-rectification \
  --action=iam-rectification:verify \
  --method=SCRAM \
  --uriEnv=MONGODB_URI \
  --permissions=read,find,insert

# Verify X.509 user permissions
npx kozen --moduleLoad=@kozen/iam-rectification \
  --action=iam-rectification:verify \
  --method=X509 \
  --cert=/path/to/client.pem \
  --key=/path/to/client.key \
  --ca=/path/to/ca.pem \
  --uri=mongodb+srv://cluster.mongodb.net/ \
  --permissions=read,find

Understanding the output

{
  "permissions": {
    "extra":   ["collMod", "dropCollection"],
    "missing": ["insert"],
    "present": ["read", "find"]
  },
  "username": "appUser",
  "roles": ["readWrite", "clusterMonitor"]
}
FieldMeaningAction
extraPrivileges the user has but the application does not needRemove to reduce attack surface
missingPrivileges the application needs but the user lacksGrant to fix runtime failures
presentPrivileges correctly grantedNo action needed

Do & Don't

Do:

  • Pass permissions as the exact set the application requires — the module compares against this list.
  • Use uriEnv (env var name) rather than uri (inline string) to avoid embedding credentials in scripts.
  • Run this check in CI on every role change to catch drift early.
  • Use X.509 authentication for M2M services in production (no password in the connection string).

Don't:

  • Never grant permissions based on the extra list report without reviewing them first.
  • Never use this module as a runtime gate (e.g., "check permissions before every query") — it makes network calls and is designed for audit/reconciliation workflows, not hot paths.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.