<commit_before>[![Build Status](https://secure.travis-ci.org/JensRantil/yubikey-basic-auth-proxy.png?branch=master)](http://travis-ci.org/JensRantil/yubikey-basic-auth-proxy)

# Yubikey Basic Auth HTTP(S) Proxy.

HTTP(S) Proxy that adds a layer of Basic Auth that does Yubikey authentication.
To allow proxying through the application, a user must validate correctly using
a username+password+valid Yubikey OTP.

## Features

 * Support for non-encrypted HTTP as well as TLS.
 * Simple command line interface to configure the ACL, which is stored on disk
   in a single JSON file.
 * Strong password hashing using
   [scrypt](https://en.wikipedia.org/wiki/Scrypt).

## Usage

```bash
./yubikey-basic-auth-proxy --help
usage: yubikey-basic-auth-proxy [<flags>] <command> [<args> ...]

HTTP Proxy that adds a layer of Basic Auth that does Yubikey authentication.

Flags:
  --help            Show context-sensitive help (also try --help-long and --help-man).
  --version         Show application version.
  --credentials-file="credentials.json"
                    The file that stores the credentials.
  --log-level=INFO  Set log level.

Commands:
  help [<command>...]
    Show help.

  serve [<flags>] <upstream> <yubico-api-id> <yubico-api-key>
    Run the proxy.

  credentials init
    Initialize ACL config.

  credentials add <username> <yubikey> [<password>]
    Add a credentials.

  credentials list
    List the credentials.

  credentials remove <username> [<yubikey>]
    Delete a credentials.
```
Execute `./yubikey-basic-auth-proxy COMMAND --help` for command specific flags.

## Current limitations

 * Auth cookie can't be used upstream. See #1.
 * HTTP Basic Auth can't be used upstream. See #2.<commit_msg>minor readme improvements<commit_after>[![Build Status](https://secure.travis-ci.org/JensRantil/yubikey-basic-auth-proxy.png?branch=master)](http://travis-ci.org/JensRantil/yubikey-basic-auth-proxy)

# Yubikey Basic Auth HTTP(S) Proxy.

HTTP(S) Proxy that adds a layer of Basic Auth that does Yubikey authentication.
To allow proxying through the application, a user must validate correctly using
a username+password+valid Yubikey OTP.

## Features

 * Support for non-encrypted HTTP as well as TLS.
 * Simple command line interface to configure the ACL, which is stored on disk
   in a single JSON file.
 * Strong password hashing using
   [scrypt](https://en.wikipedia.org/wiki/Scrypt).

## Usage

```bash
$ ./yubikey-basic-auth-proxy --help
usage: yubikey-basic-auth-proxy [<flags>] <command> [<args> ...]

HTTP Proxy that adds a layer of Basic Auth that does Yubikey authentication.

Flags:
  --help            Show context-sensitive help (also try --help-long and --help-man).
  --version         Show application version.
  --credentials-file="credentials.json"
                    The file that stores the credentials.
  --log-level=INFO  Set log level.

Commands:
  help [<command>...]
    Show help.

  serve [<flags>] <upstream> <yubico-api-id> <yubico-api-key>
    Run the proxy.

  credentials init
    Initialize ACL config.

  credentials add <username> <yubikey> [<password>]
    Add a credentials.

  credentials list
    List the credentials.

  credentials remove <username> [<yubikey>]
    Delete a credentials.
```
Execute `./yubikey-basic-auth-proxy COMMAND --help` for command specific flags.

## Current limitations

 * Auth cookie can't be used upstream. See
   [#1](https://github.com/JensRantil/yubikey-basic-auth-proxy/issues/1).
 * HTTP Basic Auth can't be used upstream. See
   [#2](https://github.com/JensRantil/yubikey-basic-auth-proxy/issues/2).
{'fraction_non_alphanumeric': 0.11638888888888889, 'fraction_numerical': 0.0016666666666666668, 'mean_word_length': 3.3914634146341465, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2904726', 'n_tokens_mistral': 1167, 'n_tokens_neox': 1109, 'n_words': 361}