Implement generate-auth-secret on beacon node CLI (#10733)

* s

* s

* typo

* typo

* s

* s

* fixes based on PR feedback

* PR feedback

* reverting log changes

* adding flag per feedback

* conventions

* main fixes

* Update cmd/beacon-chain/jwt/jwt.go

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>

* Update cmd/beacon-chain/jwt/jwt.go

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>

* Update cmd/flags.go

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>

* s

* tests

* test attempt

* test

* Update cmd/beacon-chain/jwt/jwt.go

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>

* err fix

* s

* further simplify

* cleanup

* namefix

* tests pass

* gaz

* rem deadcode

* Gaz

* shorthand

* naming

* test pass

* dedup

* success

* Ignore jwt.hex file

* logrus

* feedback

* junk

* Also check that no file was written

* local run config

* small fix

* jwt

* testfix

* s

* disabling test

* reverting main changes

* main revert

* removing temp folder

* comment

* gaz

* clarity

* rem

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
This commit is contained in:
mick
2022-06-07 03:37:12 -04:00
committed by GitHub
parent dd65622441
commit cc1ea81d4a
5 changed files with 196 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
// Package cmd defines the command line flags for the shared utlities.
// Package cmd defines the command line flags for the shared utilities.
package cmd
import (
@@ -255,6 +255,12 @@ var (
Usage: "Specifies the timeout value for API requests in seconds",
Value: 120,
}
// JwtOutputFileFlag specifies the JWT file path that gets generated into when invoked by generate-jwt-secret.
JwtOutputFileFlag = &cli.StringFlag{
Name: "output-file",
Usage: "Target file path for outputting a generated JWT secret to be used for JSON-RPC authentication",
Aliases: []string{"o"},
}
)
// LoadFlagsFromConfig sets flags values from config file if ConfigFileFlag is set.