Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

neo4j-security-skill

БесплатноБез исполняемых скриптовНе проверен

Programmatic security management in Neo4j — RBAC/ABAC, user lifecycle (CREATE/ALTER/DROP USER), role lifecycle (CREATE/GRANT ROLE/DROP ROLE), privilege grants…

neo4jот neo4j★ 126 звёзд на GitHub

Об этом скилле

When to Use

  • Creating, altering, suspending, or dropping users
  • Creating roles, granting/revoking role membership
  • Granting/denying/revoking graph, database, or DBMS privileges
  • Inspecting current privileges (SHOW PRIVILEGES)
  • Implementing property-level access control (read/write per property)
  • Setting up ABAC rules against OIDC claims or native user tags
  • Referencing LDAP/SSO auth provider configuration

When NOT to Use

  • Writing Cypher queries against application data → neo4j-cypher-skill
  • Cluster ops, backups, server config → neo4j-cli-tools-skill
  • Driver connection setup → neo4j-driver-*-skill

MCP Write Gate — MANDATORY

Before executing ANY of the following, show the planned command and wait for explicit confirmation:

  • CREATE USER / ALTER USER / DROP USER
  • CREATE ROLE / DROP ROLE
  • GRANT / DENY / REVOKE (any privilege)
  • CREATE AUTH RULE / DROP AUTH RULE

Never auto-execute privilege changes. Show exact Cypher, annotate impact, get "yes".


Execution Context

All security Cypher runs against the system database:

// Neo4j auto-routes CREATE/ALTER/SHOW USER|ROLE|PRIVILEGE to system
// If using cypher-shell: cypher-shell -d system
// If using driver: use database="system"

1. User Management

Create user

CREATE USER alice SET PASSWORD 'change-me-2026' CHANGE NOT REQUIRED;
// min length 8 by default (dbms.security.auth_minimum_password_length); shorter → error 22N85
// CHANGE REQUIRED (default): forces password change on first login
// CHANGE NOT REQUIRED: password valid immediately
// SET STATUS ACTIVE (default) | SUSPENDED  [Enterprise]

Community: users only — CREATE USER ... SET PASSWORD, ALTER USER ... SET PASSWORD, DROP USER, SHOW USERS work. SET STATUS, SET HOME DATABASE, tags, ALTER USERS, and all role/privilege commands fail with "not supported in community edition".

Parameterised password (preferred in scripts)

CREATE USER $username SET PASSWORD $password CHANGE NOT REQUIRED;

Password minimum rises 8 → 16 chars — Aura with 2027.01 upgrade (Jan 2027); self-managed default after 2026 LTS unless dbms.security.auth_minimum_password_length set explicitly. Enforced on new users and password change/reset only; existing passwords keep working. Generate ≥16-char passwords in provisioning scripts now.

Alter user

ALTER USER alice SET PASSWORD $newPw CHANGE NOT REQUIRED;
ALTER USER alice SET STATUS SUSPENDED;          // lock account [Enterprise]
ALTER USER alice SET STATUS ACTIVE;             // unlock [Enterprise]
ALTER USER alice SET HOME DATABASE mydb;        // default db on connect [Enterprise]
ALTER USER alice IF EXISTS SET PASSWORD $pw;    // safe if missing

User tags [2026.06+, Enterprise]

Tags are arbitrary strings on the native user object, readable in ABAC rules via abac.native.user_tags().

CREATE USER jake SET PASSWORD $pw SET TAGS ['finance', 'auditor'];   // single STRING, LIST<STRING> or parameter — never comma-separated strings
ALTER USER jake REMOVE TAG 'auditor' ADD TAG 'on-call';   // REMOVE before ADD before SET
ALTER USER jake SET TAGS ['finance', 'auditor'];          // replaces all existing tags
ALTER USER jake REMOVE ALL TAGS;
ALTER USERS jake, alice ADD TAGS 'pii-access';            // bulk tag edit

SET/ADD/REMOVE TAG[S] requires SET USER METADATA; reading tag values requires SHOW USER METADATA:

GRANT SET USER METADATA ON DBMS TO userAdmin;
GRANT SHOW USER METADATA ON DBMS TO auditor;
GRANT USER METADATA MANAGEMENT ON DBMS TO userManager;   // both of the above

Show users

SHOW USERS YIELD user, roles, passwordChangeRequired, suspended, home
WHERE suspended = false
RETURN user, roles ORDER BY user;
// Community: suspended and roles are null → this WHERE returns no rows

// tags column returns null without SHOW USER METADATA [2026.06+]
SHOW USERS YIELD user, roles, tags;

// runnable CREATE USER commands for the whole DBMS [2026.09]
// requires SHOW USER + SHOW USER CREDENTIALS; tags omitted without SHOW USER METADATA
SHOW USERS AS COMMANDS;
SHOW USERS WITH AUTH AS COMMANDS;   // adds provider + auth columns

// caller identity combined with other system-db SHOW commands [2026.10, Cypher 25]
USE system
SHOW CURRENT USER YIELD user, home
SHOW DATABASES YIELD name, aliases
WHERE name = home
RETURN user, name AS database, aliases;

Combined SHOW CURRENT USER query: every clause must be allowed on system (no MATCH, SHOW INDEXES) — run graph reads as separate query.

Both SHOW USERS AS COMMANDS and SHOW USERS WITH AUTH AS COMMANDS expose password hashes (SET ENCRYPTED PASSWORD '1,<hash>,<salt>' in every command); WITH AUTH adds provider/auth columns and one row per auth provider. Use either only for secured backup/restore handling. Never paste auth-export output into plaintext docs, logs, tickets, or source control.

Drop user


Полный SKILL.md на GitHub

Установить neo4j-security-skill в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Bash
WebFetch

Вложенные файлы

README.mdreferences/privilege-reference.md

FAQ

Что делает скилл neo4j-security-skill?

Programmatic security management in Neo4j — RBAC/ABAC, user lifecycle (CREATE/ALTER/DROP USER), role lifecycle (CREATE/GRANT ROLE/DROP ROLE), privilege grants and denies (GRANT/DENY/REVOKE on graph, database, DBMS), property-level access control, sub-graph access control, SHOW PRIVILEGES inspection, and auth provider config reference (LDAP, OIDC/SSO). Use when an agent needs to manage users, roles, or privileges programmatically via Cypher on the system database. Does NOT handle Cypher query writing — use neo4j-cypher-skill. Does NOT handle cluster ops or backups — use neo4j-cli-tools-skill. Property-level security and ABAC require Enterprise Edition.

Как установить скилл neo4j-security-skill?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл neo4j-security-skill запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить neo4j-security-skill с