Giter Site home page Giter Site logo

azure_keyvault_audit's Introduction

Azure KeyVault Auditor

This app collects all of the keys in your Azure tenant and compares the production secrets values with the values of the secrets in your non-production vaults, to find production keys in these non-production vaults.


Pre-requisites

Permissions

Local

If you are running the app locally, you will need to have permission to read all of the vaults that are in scope of the application. You will then need to make sure you are authenticated using the Azure cli on your host.

macOS

To install the Azure cli: brew install azure-cli Once installed, run the following to authenticate interactively: az login

Windows & Linux

Follow the relevant installation instructions here: How to install the Azure CLI | Microsoft Docs The same document going to into details on how to authenticate in each OS.


Setup

Configuration

The application can be configured via either a config.toml file or via environment variables.

Configuration File

The config.toml file contains the following settings:

Setting Description Required? Example
base_vault_url The base of the url for accessing the vaults in Azure. A %+v format specifier is required. Required https://%+v.vault.azure.net
prod_vaults A comma separated list of strings containing the vault names that are considered production within your tenant. Required example-prod
non_prod_vaults A comma separated list of strings containing the vault names that are considered non-production within your tenant. Required example-staging
excluded_secrets Allows you to specify secrets that are to be excluded from the audit. This will apply to all vaults. Optional production-sftp-secret

The configuration file needs to be located in the same directory as the app binary.

Environment Variables

Variable Description Required? Example
BASE_URL The base of the url for accessing the vaults in Azure. A %+v format specifier is required. Required https://%+v.vault.azure.net
PROD_VAULTS A comma separated list of strings containing the vault names that are considered production within your tenant. Required "example1-prod,example2-prod"
NON_PROD_VAULTS A comma separated list of strings containing the vault names that are considered non-production within your tenant. Required "example1-staging,example2-staging"
EXCLUDED_SECRETS Allows you to specify secrets that are to be excluded from the audit. This will apply to all vaults. Optional "production-sftp-secret1,production-sftp-secret2"

Installation / Execution - Local

Package

Download on the prebuilt binaries from the release section for your OS. Place the configuration file in the same directory as the binary.

Windows

Open cmd in the current directory. Type azure_keyvault_audit.exe in the cli.

macOS & Linux

Open a terminal in the current directory . Modify file permissions to be executable: sudo chmod +x azure_keyvault_audit Run the application: ./azure_keyvault_audit

From Source

Clone the repo into a local directory git clone https://github.com/binkhq/azure_keyvault_audit.git Enter the directory cd azure_keyvault_audit Build the binary go build

Flags

Flag Type Description
-short bool Provides a shortened output
-debug bool Turns on debug messages

azure_keyvault_audit's People

Contributors

mrcooki avatar

Watchers

Chris Pressland avatar Christian Prior avatar

Forkers

mrcooki

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.