Spyderbat RBAC API

# Introduction This RBAC model is based off of Amazon's model with some simplifications and generic assumptions A user has some number of roles on some number of organizations, each role defines some statements which determine determine if the user has access to some resources. These role based statements are combined with a policy which may be attached to the resource to be accessed. So essentially acccess is determined by the combination of identity based polices and resource based policies. All associated statements from both the user's roles and the resources policy are considered before access is granted. If any statement denies access then access is denied, at least one statement must explicitly grant access to the resource, and if no statement denies or grants access then access is not granted. The resulting access decision is a combination of: ``` Evaluate(Roles(User,Org),Resource) - will evaluate all possible user roles on the resource Evaluate(GlobalRoles(User),Resource) - will evaluate all possible user roles on the resource Evaluate(CrossOrgRoles(User,Org),Resource) - will evaluate all possible cross org roles on the resource Evaluate(Resource.Policy,User) - will evalute the requesting user against the resource policy ``` This means that a user role can specify what the user can access, while a specific resource policy has the ability to deny access to a single user, or a user based upon roles or tags. # Example user role ```json { "name":"CatFeeder", "version":"1.0.0", "statements":[ { "sid":"FeedCats", "effect":"allow", "actions":[ "cat:feed" ], "resources":[ "srn:cat:::*" ], "condition": { "not": { "has_tag":"obese"}} } ] } ``` This example user role defines a role called 'CatFeeder', which is allowed to perform 'cat:feed' on all resources which match 'srn\:cat\:::\*', as long as the cat the role is being used on does not have the tag 'obese'. # Global vs Organization roles A global role is a role which does not have a specific context, it is 'global' in that it applies to all resources a user might interact with. An organizational role is assigned to a specific organization, and therefore limited to the context of that organization. For example a global role is one which allows a user to change their own password, or perform other actions which do not involve an organization. An organizational role is a role which allows actions on resources owned by an organization. An example of this is a typical user: * Global Role (User) * Allows the user to modify their own settings, change their password, etc. * Org Role (OrgOwner) * Allows the user to modify an organization * Applied to specific organizations # User Roles Users may zero or more roles defined on different organizations, along with global roles , a role is defined with the following attributes * Name - Name of the policy, used to match to roles associated with users * Version - Version of the role schema * Statements - Some number of statements # Resource Policy A resource may have a single policy with multiple statements associated with it, it has the following attributes * Name - Name of the policy, used to match to roles associated with users * Version - Version of the role schema * Statements - Some number of statements # Statement Each role or policy has some statements defined with it, each statement defines what actions are allowed or dissallowed Statements have the following attributes * SID - statment ID used for debugging and identification * Effect - the result of the statement (deny, allow) * Actions - a list of actions * Resources - a list of resource queries * Condition - an optional condition that will be applied to statements to determine if they apply ## Statement Effects To determine if access may be granted the statements associated with the user roles, cross account roles, and resources are evaluated. If any statement returns a deny then all further evaluation is stopped and the result is a denial. At least one statement must allow access for access to be granted. If no statement denies or allows access then the system will not allow access. ## Actions Actions are a combination of Service:Action, and also have a few wild card patterns: ``` * - match any action service:* - match any action on this service service:action - match this explicit combination of action and service ``` ## Spyderbat Resource Names Each resource in the RBAC system is given a name like so: ``` srn:service:region:org:resource ``` The resource name is expected to expand into a path like resource name when a hierarchy is needed, for example: ``` srn:report:aws-us-west-1:org-1:agent-usage-report/download.pdf ``` These resource names are matched in policies against resource queries: ``` srn:report:::*/*.pdf ``` Is an example of resource query which would match the above resource. The following globs are supported in resource names ``` /**/ - match zero or more directories {a,b} - match a or b, no spaces * - match any non-separator char ? - match a single non-separator char **/ - match any directory, start of pattern only /** - match any this directory, end of pattern only ! - removes matches from resultset, start of pattern only ``` ``` * - match all resources srn::::* - match all resources srn:report::::* - match all report resources srn:report::org-1:* - match all resources in a specific org ``` ## Conditions The system will first evalute if the requested resource and the requested action match, if so then the system will evaluate any conditions which are specified on the statement. The following conditions are supported: ``` { not: condition } - not of the specified condition { and: [....] } - and of all contained conditions { or: [....] } - or of all contained conditions { has_tag:"tag"} - returns true if the resource has the associated tag { has_role:"role", on_org:"org-1" } - returns true if the user has a role of 'role' on 'org-1' ``` # User Roles Users are mapped to roles within an organization via a userToRole relationship, which allows for a user to have many roles on many organizations. ``` (User, Org, Role)... ``` *This means that a user can have many different roles on different organizations* For example the user David may have roles on multiple organizations: ```` David Org1: Analyat Org1: Operator Org2: Analyst ... ```` These roles are mapped by name to a specific role implementation. ## Cross Org Roles Cross org roles for use by MSSPs are supported by having the managed organization defining a special cross-org role with the following attributes: * Org - The org the cross org role applies to * Condition - The condition to evaluate * AssumeRole - The role the user may assume ## Example cross org role ```json { "org":"house-1", "assume_role":"CatPetter", "version":"1.0.1", "condition": { "has_role":"CatPetter", "on_org":"house-2" } } ``` This role will allow any user who has the role 'CatPetter' in the org 'house-2' to assume the role 'CatPetter' in 'house-1'

Operations 1

POST /api/v1/rbac/capabilities/ Query allows actions on objects #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/spyderbat-rbac-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

spyderbat-rbac-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Spyderbat RBAC API
  version: 1.0.0
  contact:
    name: API Support
    url: https://api.prod.spyderbat.com/openapi
    email: support@spyderbat.com
  license:
    name: MIT
    url: https://mit-license.org/
  termsOfService: https://www.spyderbat.com/terms-of-use/
  x-logo:
    url: /static/sb-logo.svg
    backgroundColor: '#161A21'
    altText: Spyderbat Logo
  description: 'Operations tagged RBAC across 2 of this provider''s published API definitions: spyderbat-openapi-original.json, spyderbat-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.prod.spyderbat.com/
  description: Spyderbat API Server
security:
- apiToken: []
tags:
- name: RBAC
  description: "# Introduction \n\nThis RBAC model is based off of Amazon's model with some simplifications and generic assumptions\n\nA user has some number of roles on some number of organizations, each role defines some statements\nwhich determine determine if the user has access to some resources. These role based statements\nare combined with a policy which may be attached to the resource to be accessed. \n\nSo essentially acccess is determined by the combination of identity based polices and resource\nbased policies. \n\nAll associated statements from both the user's roles and the resources policy are considered before\naccess is granted. If any statement denies access then access is denied, at least one statement\nmust explicitly grant access to the resource, and if no statement denies or grants access then \naccess is not granted. \n\n\nThe resulting access decision is a combination of:\n\n```\nEvaluate(Roles(User,Org),Resource) - will evaluate all possible user roles on the resource\nEvaluate(GlobalRoles(User),Resource) - will evaluate all possible user roles on the resource\nEvaluate(CrossOrgRoles(User,Org),Resource) - will evaluate all possible cross org roles on the resource\nEvaluate(Resource.Policy,User) - will evalute the requesting user against the resource policy\n```\n\nThis means that a user role can specify what the user can access, while a specific resource\npolicy has the ability to deny access to a single user, or a user based upon roles or\ntags. \n\n# Example user role\n\n```json\n{\n\t\"name\":\"CatFeeder\",\n\t\"version\":\"1.0.0\",\n\t\"statements\":[\n\t\t{\n\t\t\t\"sid\":\"FeedCats\",\n\t\t\t\"effect\":\"allow\",\n\t\t\t\"actions\":[ \"cat:feed\" ],\n\t\t\t\"resources\":[ \"srn:cat:::*\" ],\n\t\t\t\"condition\": { \"not\": { \"has_tag\":\"obese\"}}\n\t\t}\n\n\t]\n}\n```\n\nThis example user role defines a role called 'CatFeeder', which is allowed to perform 'cat:feed' on all resources which match 'srn\\:cat\\:::\\*', as long as the cat the role\nis being used on does not have the tag 'obese'.\n\n# Global vs Organization roles\n\nA global role is a role which does not have a specific context, it is 'global' in that it \napplies to all resources a user might interact with. An organizational role is assigned to a\nspecific organization, and therefore limited to the context of that organization. \n\nFor example a global role is one which allows a user to change their own password, or\nperform other actions which do not involve an organization. An organizational role\nis a role which allows actions on resources owned by an organization. \n\nAn example of this is a typical user:\n\n * Global Role (User) \n  * Allows the user to modify their own settings, change their password, etc. \n * Org Role (OrgOwner) \n  * Allows the user to modify an organization\n  * Applied to specific organizations\n\n# User Roles\n\nUsers may zero or more roles defined on different organizations, along with global roles\n, a role is defined with the following attributes\n\n * Name - Name of the policy, used to match to roles associated with users\n * Version  - Version of the role schema\n * Statements - Some number of statements\n\n# Resource Policy\n\nA resource may have a single policy with multiple statements associated with it, it has\nthe following attributes\n \n * Name - Name of the policy, used to match to roles associated with users\n * Version  - Version of the role schema\n * Statements - Some number of statements\n\n# Statement\n\nEach role or policy has some statements defined with it, each statement defines\nwhat actions are allowed or dissallowed\n\nStatements have the following attributes\n\n * SID - statment ID used for debugging and identification\n * Effect - the result of the statement (deny, allow)\n * Actions - a list of actions \n * Resources - a list of resource queries\n * Condition - an optional condition that will be applied to statements to determine if they apply\n\n## Statement Effects\n\nTo determine if access may be granted the statements associated with the user roles,\ncross account roles, and resources are evaluated. If any statement returns a deny then \nall further evaluation is stopped and the result is a denial. At least one statement\nmust allow access for access to be granted. If no statement denies or allows access\nthen the system will not allow access.\n\n## Actions\n\nActions are a combination of Service:Action, and also have a few wild card patterns:\n\n```\n* \t\t- match any action\nservice:* \t- match any action on this service\nservice:action\t- match this explicit combination of action and service\n```\n\n## Spyderbat Resource Names\n\nEach resource in the RBAC system is given a name like so:\n\n```\nsrn:service:region:org:resource\n```\n\nThe resource name is expected to expand into a path like resource name when a hierarchy is needed, \nfor example:\n\n```\nsrn:report:aws-us-west-1:org-1:agent-usage-report/download.pdf\n```\n\nThese resource names are matched in policies against resource queries:\n\n```\nsrn:report:::*/*.pdf\n```\n\nIs an example of resource query which would match the above resource. \n\nThe following globs are supported in resource names\n\n```\n/**/   - match zero or more directories\n{a,b}  - match a or b, no spaces\n*      - match any non-separator char\n?      - match a single non-separator char\n**/    - match any directory, start of pattern only\n/**    - match any this directory, end of pattern only\n!      - removes matches from resultset, start of pattern only\n```\n\n```\n* \t\t\t- match all resources\nsrn::::*\t \t- match all resources\nsrn:report::::* \t- match all report resources\nsrn:report::org-1:* \t- match all resources in a specific org\n```\n\n## Conditions\n\nThe system will first evalute if the requested resource and the requested action\nmatch, if so then the system will evaluate any conditions which are specified on \nthe statement. \n\nThe following conditions are supported:\n\n```\n{ not: condition } - not of the specified condition\n{ and: [....] }\t - and of all contained conditions\n{ or: [....] } \t - or of all contained conditions\n{ has_tag:\"tag\"}\t -  returns true if the resource has the associated tag\n{ has_role:\"role\", on_org:\"org-1\" } - returns true if the user has a role of 'role' on 'org-1'\n```\n\n# User Roles\n\nUsers are mapped to roles within an organization via a userToRole relationship, \nwhich allows for a user to have many roles on many organizations. \n\n```\n(User, Org, Role)...\n```\n\n*This means that a user can have many different roles on different organizations* \n\nFor example the user David may have roles on multiple organizations:\n\n````\nDavid\n\tOrg1: Analyat\n\tOrg1: Operator\n\tOrg2: Analyst\n\t...\n````\n\nThese roles are mapped by name to a specific role implementation.\n\n## Cross Org Roles\n\nCross org roles for use by MSSPs are supported by having the managed \norganization defining a special cross-org role with the following\nattributes:\n\n * Org - The org the cross org role applies to\n * Condition - The condition to evaluate\n * AssumeRole - The role the user may assume\n\n## Example cross org role\n\n```json\n{\n\t\"org\":\"house-1\",\n\t\"assume_role\":\"CatPetter\",\n\t\"version\":\"1.0.1\",\n\t\"condition\": { \"has_role\":\"CatPetter\", \"on_org\":\"house-2\" }\n}\n```\n\nThis role will allow any user who has the role 'CatPetter' in the org 'house-2' to assume\nthe role 'CatPetter' in 'house-1'\n\n\n\n\n\n\n"
paths:
  /api/v1/rbac/capabilities/:
    post:
      tags:
      - RBAC
      summary: Query allows actions on objects
      description: "Allows for querying of what actions a user can perform; results may be cached for a short period of time.\n\nEach action names the resource it is queried against with a Spyderbat Resource Name (SRN) in\n'resource_name'. An SRN has five colon-separated fields:\n\n    srn:<service>:<region>:<org>:<resource>\n\nA field left empty matches broadly for that dimension. To query an org-scoped action without\ntargeting a specific org — for example a global \"load expired orgs\" check — use the org-less SRN\n'srn:org:::' rather than an empty string. A malformed 'resource_name' cannot be evaluated and is\nrejected with a 400 rather than reported as a denied ('can_perform: false') result.\n\nAn unrecognized 'action' does not fail the request: that entry is returned with 'can_perform' false\nand an 'error' set, so a caller probing a mix of actions still gets answers for the valid ones."
      operationId: CanUserPerform
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CanUserPerformInput'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiRBACActions'
        '400':
          description: A resource_name is not a valid Spyderbat Resource Name
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
    servers:
    - url: https://api.prod.spyderbat.com/
      description: Spyderbat API Server
components:
  schemas:
    ApiRBACActions:
      type: object
      properties:
        actions:
          type: array
          items:
            $ref: '#/components/schemas/RBACAction'
          maxItems: 25
    RBACAction:
      type: object
      properties:
        action:
          type: string
          description: Action which meets the requirements of RBAC action naming
          maxLength: 32
        can_perform:
          type: boolean
          description: Return result of querying the users RBAC capabilities
        error:
          type: string
          description: Error returned from permission checking
        resource_name:
          type: string
          description: ResourceName which meets the requirements of RBAC resource naming
          maxLength: 128
    CanUserPerformInput:
      type: object
      properties:
        actions:
          type: array
          items:
            $ref: '#/components/schemas/RBACAction'
          maxItems: 25
    ValidationError:
      type: object
      properties:
        err_msg:
          type: string
          description: Message regarding the validation failure
        field:
          type: string
          description: Field name which failed validation
        property:
          type: string
          description: JSON property name of the field which failed validation
        tags:
          type: string
          description: Validation tag which failed
  securitySchemes:
    apiToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
x-refined-from:
- spyderbat-openapi-original.json
- spyderbat-openapi.json