github.com/greenpau/go-authcrunch@v1.1.4/cmd/authdbctl/README.md (about)

     1  # AuthDB Management Client
     2  
     3  <!-- begin-markdown-toc -->
     4  ## Table of Contents
     5  
     6  * [Getting Started](#getting-started)
     7  * [Configuration Files](#configuration-files)
     8  * [Under Development](#under-development)
     9  
    10  <!-- end-markdown-toc -->
    11  
    12  ## Getting Started
    13  
    14  Initially, create configuration file ` ~/.config/authdbctl/config.yaml`:
    15  
    16  ```yaml
    17  ---
    18  base_url: "https://auth.myfiosgateway.com:8443"
    19  username: "webadmin"
    20  # password: "foobar"
    21  realm: "local"
    22  ```
    23  
    24  First, connect to an Auth Portal instance:
    25  
    26  ```bash
    27  authdbctl connect
    28  authdbctl --debug connect
    29  ```
    30  
    31  The expected output follows:
    32  
    33  ```
    34  2022/02/15 18:33:01 auth token found: /home/greenpau/.config/authdbctl/token.jwt
    35  ```
    36  
    37  Next, get metadata:
    38  
    39  ```
    40  authdbctl metadata
    41  ```
    42  
    43  The expected output follows:
    44  
    45  ```
    46  {"branch":"main","commit":"v1.0.17-2-g8295d6a","name":"authp","timestamp":"2022-03-05T15:27:07.289679072Z","version":"1.0.17"}
    47  ```
    48  
    49  ## Configuration Files
    50  
    51  The `authdbctl`'s configuration file is `~/.config/authdbctl/config.json`.
    52  
    53  The configuration file contains the following:
    54  
    55  * Auth Portal URL
    56  * Default username, password, realm
    57  * TOTP Shared Secret
    58  
    59  The `authdbctl` stores the JWT token acquired after a successful authentication
    60  in `~/.config/authdbctl/token.jwt`.
    61  
    62  ## Under Development
    63  
    64  * [ ] `authdbctl list realms`
    65  * [ ] `authdbctl --format table list users --realm local`
    66  * [ ] `authdbctl add user --realm local <user_data.json>`
    67  * [ ] `authdbctl --format table list ...`
    68  * [ ] `authdbctl reload realm --name local`
    69  * [ ] auth with app authenticator
    70  * [ ] auth with U2F token