keygen

command
v0.22.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

README

keygen: API key generator

A command-line utility to generate an API key for Tinode server

Parameters:

  • sequence: Sequential number of the API key. This value can be used to reject previously issued keys.
  • isroot: Currently unused. Intended to designate key of a system administrator.
  • validate: Key to validate: check previously issued key for validity.
  • salt: HMAC salt, 32 random bytes base64 standard encoded; must be present for key validation; optional when generating the key: if missing, a cryptographically-strong salt will be automatically generated.

Usage

The API key is used to provide some protection from automatic scraping of server API and for identification of client applications.

  • API key is used on the client side.
  • HMAC salt is used on the server side to verify the API key.

Run the generator:

./keygen

Sample output:

API key v1 seq1 [ordinary]: AQAAAAABAACGOIyP2vh5avSff5oVvMpk
HMAC salt: TC0Jzr8f28kAspXrb4UYccJUJ63b7CSA16n1qMxxGpw=

Copy HMAC salt to api_key_salt parameter in your server config file. Copy API key to the client applications:

Rebuild the clients after changing the API key.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL