diff --git a/auth/basic/basic_test.go b/auth/basic/basic_test.go index 56dad6d..73236b1 100644 --- a/auth/basic/basic_test.go +++ b/auth/basic/basic_test.go @@ -6,7 +6,7 @@ import ( func TestBasicLogin(t *testing.T) { basicCredentials := make(map[string]string) - basicCredentials["demo"] = "$2b$15$LRnG3eIHFlYIguTxZOLH7eHwbQC/vqjnLq6nDFiHSUDKIU.f5/1H6" + basicCredentials["demo"] = "$2b$10$xuU7XFwmRX2CMgdSaA8rM.4Y8.BtRNzhUedwN0G8tCegDRNUERTCS" // Test good credentials backend, _ := New(&Options{Credentials: basicCredentials}) diff --git a/docs/ghostream.example.yml b/docs/ghostream.example.yml index 28c7731..1402910 100644 --- a/docs/ghostream.example.yml +++ b/docs/ghostream.example.yml @@ -22,12 +22,12 @@ auth: # Basic backend configuration # To generate bcrypt hashed password from Python, use: - # python3 -c 'import bcrypt; print(bcrypt.hashpw(b"PASSWORD", bcrypt.gensalt(rounds=15)).decode("ascii"))' + # python3 -c 'import bcrypt; print(bcrypt.hashpw(b"PASSWORD", bcrypt.gensalt(rounds=12)).decode("ascii"))' # #basic: # credentials: # # Demo user with password "demo" - # demo: $2b$15$LRnG3eIHFlYIguTxZOLH7eHwbQC/vqjnLq6nDFiHSUDKIU.f5/1H6 + # demo: $2b$10$xuU7XFwmRX2CMgdSaA8rM.4Y8.BtRNzhUedwN0G8tCegDRNUERTCS # LDAP backend configuration # diff --git a/internal/config/config.go b/internal/config/config.go index ea3ec88..729e6bb 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -117,7 +117,7 @@ func Load() (*Config, error) { // If no credentials register, add demo account with password "demo" if len(cfg.Auth.Basic.Credentials) < 1 { - cfg.Auth.Basic.Credentials["demo"] = "$2b$15$LRnG3eIHFlYIguTxZOLH7eHwbQC/vqjnLq6nDFiHSUDKIU.f5/1H6" + cfg.Auth.Basic.Credentials["demo"] = "$2b$10$xuU7XFwmRX2CMgdSaA8rM.4Y8.BtRNzhUedwN0G8tCegDRNUERTCS" } return cfg, nil