Endava / cats

CATS is a REST API Fuzzer and negative testing tool for OpenAPI endpoints. CATS automatically generates, runs and reports tests with minimum configuration and no coding effort. Tests are self-healing and do not require maintenance.
Apache License 2.0
1.17k stars 74 forks source link

Use all 3 type of authorization (Oauth , Api key and Basic Auth) on different paths present in swagger application #130

Closed nayanmathur25 closed 2 months ago

nayanmathur25 commented 3 months ago

I have a application where some request required ( Oauth and Basic Auth ) and some request required (API key with Basic Auth) and some only required Oauth or API Key. Do we have any feature where we can add all the 3 and based on the request it should use the Authorization.

API Authentication page https://endava.github.io/cats/docs/getting-started/authentication has very less details about the OAUTH

en-milie commented 3 months ago

CATS doesn't have integration with an oauth server, but you can use the answer from here: https://github.com/Endava/cats/issues/129 to provision tokens. If you need different authentication methods for each endpoint, you can use CATS by grouping common paths that share the same authentication method together using the --path argument filter.

cats -s SERVER -c CONTRACT --path "/path1,/path2,/path3" -H "Authorization=Bearer XXXX"

Similar for other paths that have different authentication needs.