Keyscope

Keyscope is an extensible key and secret validation for checking active secrets against multiple SaaS vendors built in Rust
Keyscope logo

KeyScope

A policy-driven validation tool that enables you to test and validate API credentials in a standardized manner.

Features

  • Supports multiple providers (e.g., Dropbox)
  • Uses regular expressions for matching service responses
  • Allows for variable interpolation in HTTP headers and bodies

Adding a New Provider

To add a new provider, follow these steps:

  1. Check the provider's API documentation to find a representative API call that requires authentication.
  2. Create a YAML file with the provider's information (e.g., dropbox: validation).
  3. Define the request parameters and headers required for the API call.
  4. Specify the expected response status code and body.

Example

Here is an example of adding Dropbox as a new provider:

dropbox:
  validation:
    request:
      id: "dropbox:validation"
      desc: "Dropbox: valid API credentials"
      params:
       - name: dropbox_1
        desc: Dropbox token
      uri: https://api.dropboxapi.com/2/users/get_current_account
      method: post
      headers:
        Authorization:
         - Bearer {{dropbox_1}}
    response:
      status_code: "200"

Using KeyScope

To validate API credentials using KeyScope, run the following command:

keyscope -f providers.yaml validate dropbox -p MY_KEY

Replace MY_KEY with your actual Dropbox token.





> Visit Keyscope Website <