Skip to content

Commit

Permalink
chore: versioning token filename
Browse files Browse the repository at this point in the history
Signed-off-by: Michele Meloni <[email protected]>
  • Loading branch information
mmeloni committed Aug 10, 2020
1 parent c04c6b4 commit 624a93c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ Flags:
-m, --mtls enable mutual tls
--pkey string server private key path (default "./tools/mtls/4_client/private/localhost.key.pem")
--servername string used to verify the hostname on the returned certificates (default "localhost")
--tokenfile string authentication token file (default path is $HOME or binary location; the supplied value will be automatically suffixed with _admin; default filename is token_admin) (default "token")
--tokenfile string authentication token file (default path is $HOME or binary location; the supplied value will be automatically suffixed with _admin; default filename is token_admin) (default "token-0.7.0")
Use "immuadmin [command] --help" for more information about a command.
Expand Down
2 changes: 1 addition & 1 deletion configs/immuclient.toml.dist
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
immudb-address = "127.0.0.1"
immudb-port = 3322
auth = true
tokenfile = "token"
tokenfile = "token-0.7.0"
mtls = false
servername = "localhost"
pkey = "./tools/mtls/4_client/private/localhost.key.pem"
Expand Down
4 changes: 2 additions & 2 deletions pkg/client/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ func DefaultOptions() *Options {
MTLs: false,
Auth: true,
Config: "configs/immuclient.toml",
TokenFileName: "token",
TokenFileName: "token-0.7.0",
DialOptions: &[]grpc.DialOption{},
PasswordReader: c.DefaultPasswordReader,
Tkns: NewTokenService().WithTokenFileName("token").WithHds(NewHomedirService()),
Tkns: NewTokenService().WithTokenFileName("token-0.7.0").WithHds(NewHomedirService()),
Metrics: true,
PidPath: "",
PrometheusHost: "",
Expand Down
4 changes: 2 additions & 2 deletions pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,10 @@ func (s *ImmuServer) loadUserDatabases(dataDir string) error {
}
//get only first child directories, exclude datadir, exclude systemdb dir
if info.IsDir() &&
(strings.Count(path, string(filepath.Separator)) == 1) &&
(dataDir != path) &&
!strings.Contains(path, s.Options.GetSystemAdminDbName()) &&
!strings.Contains(path, s.Options.GetDefaultDbName()) {
!strings.Contains(path, s.Options.GetDefaultDbName()) &&
!strings.Contains(path, "config"){
dirs = append(dirs, path)
}
return nil
Expand Down

0 comments on commit 624a93c

Please sign in to comment.