Documentation
¶
Overview ¶
Bootstrap package is intented for server side deployment only, where the bootstrap_hash.json can be secured with OS level permissions.
It is an attempt to avoid having to include hardcoded passwords in code. Instead, there is a default password stored in bootstrap_hash.json, which is used to encrypt user account passwords. Those encrypted passwords are then stored in bootstrap.json. So in your code, all you have to do is temporaraly decrypt the user password in a variable and include that variable in whatever code you need.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BootHashDecrypt ¶ added in v0.0.6
BootHashDecrypt decrypts a string that has been encrypted with the BootHash
func BootHashEncrypt ¶ added in v0.0.6
BootHashEncrypt encrypts a string with the Password defined in the BootHash
Types ¶
type Accounts ¶ added in v0.0.4
Accounts struct contains a Name value and Specs struct This is the secondary struct
func (*Accounts) DecryptPassword ¶ added in v0.0.6
DecryptPassword Method decrypts the Password for A specific account with a Password string in the Bootstrap_File (*Service) struct.
type HashEnv ¶
type HashEnv struct {
BootHash string `json:"BootHash"`
}
HashEnv Struct for storing sensitive hashed password value in a JSON file instead of hardcoded
type Service ¶
type Service struct {
Accounts []Accounts `json:"Accounts"`
}
Service struct contains a slice of Accounts struct This is the parent struct for bootstrap
func (*Service) DecryptPasswords ¶ added in v0.0.4
DecryptPasswords Method decrypts the Password for all accounts with a Password string in the Bootstrap_File (*Service) struct
func (*Service) GetAccount ¶ added in v0.0.4
GetAccount Method takes a string and searches for that string in Service Account records Name entity, then returns a single Accounts struct populated with queried Account.
type Specs ¶ added in v0.0.4
type Specs struct {
Domain string `json:"Domain"`
Password string `json:"Password"`
Port int64 `json:"Port"`
Server string `json:"Server"`
Special string `json:"Special"`
Summary string `json:"Summary"`
User string `json:"User"`
}
Specs struct contains key values needed for that account. Use Special for any additional configuration settings needed.