openapi: 3.0.3 info: title: ZAP accessControl acsrf API description: The HTTP API for controlling and accessing ZAP. contact: name: ZAP User Group url: https://groups.google.com/group/zaproxy-users email: zaproxy-users@googlegroups.com license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html version: 2.16.1 servers: - url: http://zap description: The URL while proxying through ZAP. - url: http://{address}:{port} description: The URL of a Local Proxy of ZAP. variables: address: description: The address ZAP is listening on. default: 127.0.0.1 port: description: The port ZAP is bound to. default: '8080' security: - {} - apiKeyHeader: [] - apiKeyQuery: [] tags: - name: acsrf paths: /JSON/acsrf/action/addOptionToken/: parameters: - name: String in: query required: true description: '' schema: type: string get: description: Adds an anti-CSRF token with the given name, enabled by default operationId: acsrfActionAddOptionToken tags: - acsrf responses: default: $ref: '#/components/responses/ErrorJson' /JSON/acsrf/action/removeOptionToken/: parameters: - name: String in: query required: true description: '' schema: type: string get: description: Removes the anti-CSRF token with the given name operationId: acsrfActionRemoveOptionToken tags: - acsrf responses: default: $ref: '#/components/responses/ErrorJson' /JSON/acsrf/action/setOptionPartialMatchingEnabled/: parameters: - name: Boolean in: query required: true description: '' schema: type: boolean get: description: Define if ZAP should detect CSRF tokens by searching for partial matches. operationId: acsrfActionSetOptionPartialMatchingEnabled tags: - acsrf responses: default: $ref: '#/components/responses/ErrorJson' /OTHER/acsrf/other/genForm/: parameters: - name: hrefId in: query required: true description: Define which request will be used schema: type: string - name: actionUrl in: query description: Define the action URL to be used in the generated form schema: type: string get: description: Generate a form for testing lack of anti-CSRF tokens - typically invoked via ZAP operationId: acsrfOtherGenForm tags: - acsrf responses: default: $ref: '#/components/responses/ErrorOther' /JSON/acsrf/view/optionPartialMatchingEnabled/: get: description: Define if ZAP should detect CSRF tokens by searching for partial matches operationId: acsrfViewOptionPartialMatchingEnabled tags: - acsrf responses: default: $ref: '#/components/responses/ErrorJson' /JSON/acsrf/view/optionTokensNames/: get: description: Lists the names of all anti-CSRF tokens operationId: acsrfViewOptionTokensNames tags: - acsrf responses: default: $ref: '#/components/responses/ErrorJson' components: schemas: ErrorJson: type: object required: - code - message properties: code: type: string message: type: string detail: type: string responses: ErrorJson: description: Error of JSON endpoints. content: application/json: schema: $ref: '#/components/schemas/ErrorJson' ErrorOther: description: Error of OTHER endpoints. content: '*/*': {} securitySchemes: apiKeyHeader: type: apiKey name: X-ZAP-API-Key in: header apiKeyQuery: type: apiKey name: apikey in: query