{ "consumes": [ "application/json" ], "definitions": { "apiIdentityContext": { "properties": { "identity": { "type": "string" }, "type": { "$ref": "#/definitions/apiIdentityType" } }, "type": "object" }, "apiIdentityType": { "default": "IDENTITY_TYPE_UNKNOWN", "description": "Identity types, describes the payload type of the identity field inside the IdentityContext message.\n\n - IDENTITY_TYPE_UNKNOWN: Unknown, value not set, requests will fail with identity type not set error.\n - IDENTITY_TYPE_NONE: None, no explicit identity context set, equals anonymous.\n - IDENTITY_TYPE_SUB: Sub(ject), identity field contains an oAUTH subject.\n - IDENTITY_TYPE_JWT: JWT, identity field contains a JWT access token.\n - IDENTITY_TYPE_MANUAL: Manual, propagates thw identity field as-is, without validation, into the input object.", "enum": [ "IDENTITY_TYPE_UNKNOWN", "IDENTITY_TYPE_NONE", "IDENTITY_TYPE_SUB", "IDENTITY_TYPE_JWT", "IDENTITY_TYPE_MANUAL" ], "type": "string" }, "apiModule": { "properties": { "ast": {}, "id": { "type": "string" }, "package_path": { "type": "string" }, "package_root": { "type": "string" }, "raw": { "type": "string" } }, "type": "object" }, "apiPolicyContext": { "properties": { "decisions": { "items": { "type": "string" }, "title": "list (1..N) of policy decisions (aka rules)", "type": "array" }, "path": { "title": "policy path aka package name", "type": "string" } }, "type": "object" }, "apiPolicyInstance": { "properties": { "instance_label": { "title": "label identifying the instance of the policy", "type": "string" }, "name": { "title": "policy name", "type": "string" } }, "type": "object" }, "authorizerv2Decision": { "properties": { "decision": { "type": "string" }, "is": { "type": "boolean" } }, "type": "object" }, "protobufAny": { "additionalProperties": {}, "properties": { "@type": { "type": "string" } }, "type": "object" }, "protobufNullValue": { "default": "NULL_VALUE", "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\nThe JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value.", "enum": [ "NULL_VALUE" ], "type": "string" }, "rpcStatus": { "properties": { "code": { "format": "int32", "type": "integer" }, "details": { "items": { "$ref": "#/definitions/protobufAny", "type": "object" }, "type": "array" }, "message": { "type": "string" } }, "type": "object" }, "v2CompileRequest": { "properties": { "disable_inlining": { "items": { "type": "string" }, "type": "array" }, "identity_context": { "$ref": "#/definitions/apiIdentityContext" }, "input": { "type": "string" }, "options": { "$ref": "#/definitions/v2QueryOptions" }, "policy_context": { "$ref": "#/definitions/apiPolicyContext" }, "policy_instance": { "$ref": "#/definitions/apiPolicyInstance" }, "query": { "type": "string" }, "resource_context": { "type": "object" }, "unknowns": { "items": { "type": "string" }, "type": "array" } }, "type": "object" }, "v2CompileResponse": { "properties": { "metrics": { "type": "object" }, "result": { "type": "object" }, "trace": { "items": { "type": "object" }, "type": "array" }, "trace_summary": { "items": { "type": "string" }, "type": "array" } }, "type": "object" }, "v2DecisionTreeOptions": { "properties": { "path_separator": { "$ref": "#/definitions/v2PathSeparator" } }, "type": "object" }, "v2DecisionTreeRequest": { "properties": { "identity_context": { "$ref": "#/definitions/apiIdentityContext" }, "options": { "$ref": "#/definitions/v2DecisionTreeOptions" }, "policy_context": { "$ref": "#/definitions/apiPolicyContext" }, "policy_instance": { "$ref": "#/definitions/apiPolicyInstance" }, "resource_context": { "type": "object" } }, "type": "object" }, "v2DecisionTreeResponse": { "properties": { "path": { "type": "object" }, "path_root": { "type": "string" } }, "type": "object" }, "v2GetPolicyResponse": { "properties": { "result": { "$ref": "#/definitions/apiModule" } }, "type": "object" }, "v2InfoResponse": { "properties": { "arch": { "type": "string" }, "commit": { "type": "string" }, "date": { "type": "string" }, "os": { "type": "string" }, "version": { "type": "string" } }, "type": "object" }, "v2IsRequest": { "properties": { "identity_context": { "$ref": "#/definitions/apiIdentityContext" }, "policy_context": { "$ref": "#/definitions/apiPolicyContext" }, "policy_instance": { "$ref": "#/definitions/apiPolicyInstance" }, "resource_context": { "type": "object" } }, "type": "object" }, "v2IsResponse": { "properties": { "decisions": { "items": { "$ref": "#/definitions/authorizerv2Decision", "type": "object" }, "type": "array" } }, "type": "object" }, "v2ListPoliciesResponse": { "properties": { "result": { "items": { "$ref": "#/definitions/apiModule", "type": "object" }, "type": "array" } }, "type": "object" }, "v2PathSeparator": { "default": "PATH_SEPARATOR_UNKNOWN", "enum": [ "PATH_SEPARATOR_UNKNOWN", "PATH_SEPARATOR_DOT", "PATH_SEPARATOR_SLASH" ], "title": "- PATH_SEPARATOR_UNKNOWN: Value not set.\n - PATH_SEPARATOR_DOT: Dot \".\" path separator\n - PATH_SEPARATOR_SLASH: Slash \"/\" path separtor", "type": "string" }, "v2QueryOptions": { "properties": { "instrument": { "title": "default false", "type": "boolean" }, "metrics": { "title": "default false", "type": "boolean" }, "trace": { "$ref": "#/definitions/v2TraceLevel", "title": "default ExplainOffV1" }, "trace_summary": { "title": "default false", "type": "boolean" } }, "type": "object" }, "v2QueryRequest": { "properties": { "identity_context": { "$ref": "#/definitions/apiIdentityContext" }, "input": { "type": "string" }, "options": { "$ref": "#/definitions/v2QueryOptions" }, "policy_context": { "$ref": "#/definitions/apiPolicyContext" }, "policy_instance": { "$ref": "#/definitions/apiPolicyInstance" }, "query": { "type": "string" }, "resource_context": { "type": "object" } }, "type": "object" }, "v2QueryResponse": { "properties": { "metrics": { "type": "object" }, "response": { "type": "object" }, "trace": { "items": { "type": "object" }, "type": "array" }, "trace_summary": { "items": { "type": "string" }, "type": "array" } }, "type": "object" }, "v2TraceLevel": { "default": "TRACE_LEVEL_UNKNOWN", "enum": [ "TRACE_LEVEL_UNKNOWN", "TRACE_LEVEL_OFF", "TRACE_LEVEL_FULL", "TRACE_LEVEL_NOTES", "TRACE_LEVEL_FAILS" ], "title": "- TRACE_LEVEL_UNKNOWN: Value not set.\n - TRACE_LEVEL_OFF: ExplainOffV1 ExplainModeV1 = \"off\"\n - TRACE_LEVEL_FULL: ExplainFullV1 ExplainModeV1 = \"full\"\n - TRACE_LEVEL_NOTES: ExplainNotesV1 ExplainModeV1 = \"notes\"\n - TRACE_LEVEL_FAILS: ExplainFailsV1 ExplainModeV1 = \"fails\"", "type": "string" } }, "info": { "title": "aserto/authorizer/v2/authorizer.proto", "version": "version not set" }, "paths": { "/api/v2/authz/compile": { "post": { "description": "Executes a partial query on the loaded policy runtime.", "operationId": "authorizer.compile", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/v2CompileRequest" } } ], "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v2CompileResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "security": [ { "AuthorizerAPIKey": [], "TenantID": [] } ], "summary": "Compile", "tags": [ "Authorizer" ] } }, "/api/v2/authz/decisiontree": { "post": { "description": "Returns decision tree for given identity context.", "operationId": "authorizer.decision_tree", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/v2DecisionTreeRequest" } } ], "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v2DecisionTreeResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "security": [ { "AuthorizerAPIKey": [], "TenantID": [] } ], "summary": "Decision tree", "tags": [ "Authorizer" ] } }, "/api/v2/authz/is": { "post": { "description": "Determines if identity context is authorized to access the resource guarded by the given policy.", "operationId": "authorizer.is", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/v2IsRequest" } } ], "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v2IsResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "security": [ { "AuthorizerAPIKey": [], "TenantID": [] } ], "summary": "Is (authorized)", "tags": [ "Authorizer" ] } }, "/api/v2/authz/query": { "post": { "description": "Executes a rego query on the loaded policy runtime.", "operationId": "authorizer.query", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/v2QueryRequest" } } ], "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v2QueryResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "security": [ { "AuthorizerAPIKey": [], "TenantID": [] } ], "summary": "Query", "tags": [ "Authorizer" ] } }, "/api/v2/info": { "get": { "description": "Return version information.", "operationId": "info.get", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v2InfoResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "security": [], "summary": "Info", "tags": [ "Info" ] } }, "/api/v2/policies": { "get": { "description": "Lists the policy modules for the policy bundle.", "operationId": "policies.list", "parameters": [ { "in": "query", "name": "field_mask", "required": false, "type": "string" }, { "description": "policy name", "in": "query", "name": "policy_instance.name", "required": false, "type": "string" }, { "description": "label identifying the instance of the policy", "in": "query", "name": "policy_instance.instance_label", "required": false, "type": "string" } ], "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v2ListPoliciesResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "security": [ { "AuthorizerAPIKey": [], "TenantID": [] } ], "summary": "List Policies", "tags": [ "Policy" ] } }, "/api/v2/policies/{id}": { "get": { "description": "Gets the policy modules for the given module Id.", "operationId": "policies.get", "parameters": [ { "in": "path", "name": "id", "pattern": "[^/]+/.+", "required": true, "type": "string" }, { "in": "query", "name": "field_mask", "required": false, "type": "string" }, { "description": "policy name", "in": "query", "name": "policy_instance.name", "required": false, "type": "string" }, { "description": "label identifying the instance of the policy", "in": "query", "name": "policy_instance.instance_label", "required": false, "type": "string" } ], "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v2GetPolicyResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "security": [ { "AuthorizerAPIKey": [], "TenantID": [] } ], "summary": "Get Policy", "tags": [ "Policy" ] } } }, "produces": [ "application/json" ], "schemes": [ "https" ], "security": [ { "AuthorizerAPIKey": [], "TenantID": [] } ], "securityDefinitions": { "AuthorizerAPIKey": { "in": "header", "name": "authorization", "type": "apiKey" }, "TenantID": { "in": "header", "name": "aserto-tenant-id", "type": "apiKey" } }, "swagger": "2.0", "tags": [ { "name": "Authorizer" } ] }