Логотип Authorization

Authorization

Сообщество
nahid-sparktales
authorization

Decide what an authenticated caller may do — pick the permission model, put the check at one enforcement point close to the data, and default to deny. Use when adding roles or permissions, scoping data per tenant or per owner, building an admin-only path, reviewing an endpoint that trusts a client-supplied id, or when someone reports seeing data that is not theirs. Not for establishing identity (that is authentication), and hiding a control in the UI is never the enforcement.

Add to TypingMind

Обзор

Издательnahid-sparktales
Репозиторийagent-dispatcher
Название навыкаauthorization
Звёзды
58
Форки
5
Файлы в комплекте
1
ЛицензияMIT
Ссылки
  • Инструкции в формате Markdown

    Модель загружает файл SKILL.md по мере необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой большой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Файлы в комплекте: 1

    Скрипты, шаблоны и справочные материалы, которые модель может читать во время работы. Файлы доступны только для чтения и никогда не выполняются.

  • Открытый исходный код

    Издатель навыка на GitHub — nahid-sparktales. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Authorization в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/nahid-sparktales/agent-dispatcher/tree/main/skills/backend/authorization
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Добавить навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/nahid-sparktales/agent-dispatcher.git /tmp/agent-dispatcher
mkdir -p .claude/skills
cp -r /tmp/agent-dispatcher/skills/backend/authorization .claude/skills/authorization
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Authorization в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Authorization, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Authorization не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими ключами API.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

Authorization

Authentication says who is calling. Authorization says what that caller may do to this resource. Being logged in is not a permission, and a hidden button is not a check — the request still leaves the browser exactly the same way.

When this fires

A rule of the form "only X may do Y to Z" is being added, changed, or doubted. Roles, admin areas, per-owner or per-tenant data, sharing, feature gating that carries money or privacy. Also fires on any report that a caller reached a resource they should not have.

Procedure

  1. Write the rule as one sentence: who may do what action to which resource, under what condition. If it will not fit in a sentence, either the model is wrong or there are two rules. Do this before opening an editor — most authorization bugs are unwritten rules.
  2. Choose the smallest model the rules need. A handful of fixed roles → a role check. Rules that read the resource (owner, tenant, state, amount) → an attribute or ownership check. "A may see it because B shared it" → a relationship check. Do not stand up a policy engine for three roles; do not fake relationships with an ever-growing enum.
  3. Reuse the existing mechanism. Grep for the project's guard, policy, can/ability helper, route middleware, decorator, or database row-level security. A second authorization system beside the first is where the gap will be.
  4. Put the check as close to the data as it can go, once. Ownership and tenant scoping belong in the query itself — or in row-level security — not in a filter applied after the rows come back. A post-fetch filter has already loaded the row, often logged it, and will be skipped by the next query someone writes.
  5. Default deny. The check allows only on an explicit match. Unknown role, absent tenant, null owner, a new enum value, an endpoint added next month: all deny. If a new route is permitted by default, the model is inverted.
  6. Enumerate every entry point to the resource, not the one in the ticket. Routes, batch and bulk endpoints, GraphQL resolvers and nested fields, background jobs, webhooks, CSV export, admin scripts, internal service calls. The classic hole is an endpoint that takes an id list and checks only the first, or an "internal" service that trusts its caller.
  7. Never trust client-supplied identity or scope. A user id, tenant id, role or permission arriving in a body, query string, path or header is input, not fact. Derive them from the authenticated principal. Accepting ?userId= is not authorization, it is a parameter.
  8. Choose the refusal deliberately and apply it consistently. 403 when the resource's existence is not itself sensitive; 404 when it is. Mixing them across neighbouring endpoints leaks exactly the fact the 404 was meant to hide.
  9. Mirror the rule in the UI after the server enforces it, never instead. Hiding a control is usability, so users do not walk into refusals. It changes nothing an attacker can reach.
  10. Log the decision, not the payload: principal, action, resource id, allow or deny. Denials are what an investigation reads; bodies are what a breach report quotes.
  11. Write the negative tests — they are the deliverable. For each rule: the permitted caller succeeds, and each non-permitted caller is refused, including the neighbouring tenant and the anonymous caller. A rule tested only from the allowed side is untested.
  12. A change to an existing rule moves real people in or out. Widening access on a live system, or removing a role someone currently holds, stops and asks first, and the report names who gains or loses access. Silent widening is the failure this step exists to prevent.

Checklist

  • Each rule written as a sentence before implementation
  • Model chosen deliberately; no policy engine for three roles
  • Existing mechanism reused, or the absence of one confirmed
  • Enforcement is in the query or the closest layer to the data, not a post-fetch filter
  • Deny is the default for unknown roles, missing scope, and new routes
  • Every entry point to the resource enumerated, including jobs, exports and bulk endpoints
  • No identity, tenant or role taken from client-controlled input
  • 403 vs 404 chosen once and applied consistently
  • UI mirrors the rule; it does not implement it
  • Allow and deny decisions logged with principal, action and resource
  • Negative tests exist per rule, including the cross-tenant caller
  • Any widening of access on a live system was asked about before it shipped

Failure handling

  • A user saw data that is not theirs — treat it as a scoping defect, not a UI bug. Find every caller of the query, not only the screen in the report; the same unscoped query is usually reachable from three places. Fixing one leaves the others open.
  • The check is in the wrong layer and moving it is large — say so and size it rather than adding a second check at the new layer. Two enforcement points that can disagree are worse than one in an awkward place.
  • The rules contradict each other — do not invent a precedence. Name the conflict and the people or documents that can settle it, and leave the stricter behaviour in place meanwhile.
  • No way to test as another tenant or role — that is a finding. Report the rule as implemented but unverified and name exactly which caller could not be exercised. Never call an access rule verified because you read it.

Evidence to report

Each rule as a sentence, next to the file and function that enforces it; the model chosen and what it excludes; the list of entry points checked, including the ones found beyond the ticket; the negative tests and their output; who gains or loses access if the change is a rule change; and the callers or paths that could not be exercised.

Файлы в комплекте

Модель читает эти файлы по мере необходимости, пока навык загружен. Они доступны только для чтения и никогда не выполняются.

Часто задаваемые вопросы

Что делает навык ИИ Authorization?

Decide what an authenticated caller may do — pick the permission model, put the check at one enforcement point close to the data, and default to deny. Use when adding roles or permissions, scoping data per tenant or per owner, building an admin-only path, reviewing an endpoint that trusts a client-supplied id, or when someone reports seeing data that is not theirs. Not for establishing identity (that is authentication), and hiding a control in the UI is never the enforcement.

Зачем использовать Authorization в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Authorization — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Authorization в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/nahid-sparktales/agent-dispatcher/tree/main/skills/backend/authorization. TypingMind прочитает файл SKILL.md, включит сопутствующие файлы в пакет и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Authorization?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Authorization?

С любым количеством. В TypingMind вы можете использовать Authorization с любой моделью, которая поддерживает навыки, в том числе с GPT, Claude, Gemini, Grok, DeepSeek, Mistral и Llama. Для этого вы используете собственные ключи API.

Бесплатен ли навык ИИ Authorization?

Да. Навык опубликован на GitHub по лицензии MIT. Издатель — nahid-sparktales. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это набор инструкций, которыми модель ИИ может пользоваться каждый раз, когда ей нужно выполнить конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты, которые она может вызывать: при вызове где-то выполняется код и возвращает результат. Навык ИИ, напротив, даёт модели знания и описывает порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все
Логотип affaan-m

Quarkus Security

affaan-m
СообществоПопулярный

Рекомендации по безопасности в Quarkus: аутентификация, авторизация, JWT/OIDC, RBAC, проверка входных данных, CSRF, управление секретами и безопасность зависимостей.

39.1K
261.1K
Инструкции
Открыть
Логотип affaan-m

Quarkus Verification

affaan-m
СообществоПопулярный

Цикл проверок для проектов Quarkus: сборка, статический анализ, тесты с покрытием, сканирование безопасности, нативная компиляция и проверка diff перед выпуском или PR.

39.1K
261.1K
Инструкции
Открыть
Логотип affaan-m

Springboot Security

affaan-m
СообществоПопулярный

Рекомендации по Spring Security для аутентификации и авторизации, валидации, CSRF-защиты, работы с секретами и заголовками, ограничения частоты запросов и обеспечения безопасности зависимостей в сервисах на Java Spring Boot.

39.1K
261.1K
Инструкции
Открыть
Логотип affaan-m

Agent Architecture Audit

affaan-m
СообществоПопулярный

Полная диагностика приложений на основе агентов и LLM. Проверяйте регрессии в обёртках, загрязнение памяти, сбои в управлении инструментами, скрытые циклы исправлений и ошибки рендеринга в 12-слойном стеке агента. Получайте список проблем, упорядоченный по критичности, и исправления, ориентированные на код. Необходимый инструмент для разработчиков, создающих приложения с агентами, автономные циклы или функции на основе LLM.

39.1K
261.1K
Инструкции
Открыть

Создайте своё рабочее пространство с ИИ прямо сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇