mirror of
https://github.com/kemko/nomad.git
synced 2026-01-09 11:55:42 +03:00
Change token/role names
This commit is contained in:
@@ -111,12 +111,12 @@ vault {
|
||||
address = "127.0.0.1:9500"
|
||||
allow_unauthenticated = true
|
||||
child_token_ttl = "1s"
|
||||
role_name = "roleFoo"
|
||||
role_token = "12345"
|
||||
periodic_token = "12345"
|
||||
tls_ca_file = "/path/to/ca/file"
|
||||
tls_ca_path = "/path/to/ca"
|
||||
tls_cert_file = "/path/to/cert/file"
|
||||
tls_key_file = "/path/to/key/file"
|
||||
tls_server_name = "foobar"
|
||||
tls_skip_verify = true
|
||||
token_role_name = "roleFoo"
|
||||
}
|
||||
|
||||
@@ -655,15 +655,15 @@ func parseVaultConfig(result **config.VaultConfig, list *ast.ObjectList) error {
|
||||
valid := []string{
|
||||
"address",
|
||||
"allow_unauthenticated",
|
||||
"child_token_ttl",
|
||||
"periodic_token",
|
||||
"tls_ca_file",
|
||||
"tls_ca_path",
|
||||
"tls_cert_file",
|
||||
"child_token_ttl",
|
||||
"tls_key_file",
|
||||
"role_name",
|
||||
"role_token",
|
||||
"tls_server_name",
|
||||
"tls_skip_verify",
|
||||
"token_role_name",
|
||||
}
|
||||
|
||||
if err := checkHCLKeys(listVal, valid); err != nil {
|
||||
|
||||
@@ -130,8 +130,8 @@ func TestConfig_Parse(t *testing.T) {
|
||||
TLSCertFile: "/path/to/cert/file",
|
||||
ChildTokenTTL: "1s",
|
||||
TLSKeyFile: "/path/to/key/file",
|
||||
RoleName: "roleFoo",
|
||||
RoleToken: "12345",
|
||||
TokenRoleName: "roleFoo",
|
||||
PeriodicToken: "12345",
|
||||
TLSServerName: "foobar",
|
||||
TLSSkipVerify: true,
|
||||
},
|
||||
|
||||
@@ -96,8 +96,8 @@ func TestConfig_Merge(t *testing.T) {
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
},
|
||||
Vault: &config.VaultConfig{
|
||||
RoleName: "1",
|
||||
RoleToken: "1",
|
||||
TokenRoleName: "1",
|
||||
PeriodicToken: "1",
|
||||
AllowUnauthenticated: false,
|
||||
ChildTokenTTL: "1",
|
||||
Addr: "1",
|
||||
@@ -223,8 +223,8 @@ func TestConfig_Merge(t *testing.T) {
|
||||
"Access-Control-Allow-Methods": "GET, POST, OPTIONS",
|
||||
},
|
||||
Vault: &config.VaultConfig{
|
||||
RoleName: "2",
|
||||
RoleToken: "2",
|
||||
TokenRoleName: "2",
|
||||
PeriodicToken: "2",
|
||||
AllowUnauthenticated: true,
|
||||
ChildTokenTTL: "2",
|
||||
Addr: "2",
|
||||
|
||||
Reference in New Issue
Block a user