mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 19:17:58 +00:00
Remove sensitive fields when reading config data (#4216)
* Remove sensitive fields when reading config data * Do not use structs; build and return map explicitly * Revert tag in postgresql * Fix tests
This commit is contained in:
committed by
GitHub
parent
08770c6366
commit
938b748914
@@ -209,10 +209,8 @@ func TestBackend_config_connection(t *testing.T) {
|
||||
}
|
||||
|
||||
expected := map[string]interface{}{
|
||||
"plugin_name": "postgresql-database-plugin",
|
||||
"connection_details": map[string]interface{}{
|
||||
"connection_url": "sample_connection_url",
|
||||
},
|
||||
"plugin_name": "postgresql-database-plugin",
|
||||
"connection_details": map[string]interface{}{},
|
||||
"allowed_roles": []string{"*"},
|
||||
"root_credentials_rotate_statements": []string{},
|
||||
}
|
||||
@@ -519,10 +517,8 @@ func TestBackend_connectionCrud(t *testing.T) {
|
||||
|
||||
// Read connection
|
||||
expected := map[string]interface{}{
|
||||
"plugin_name": "postgresql-database-plugin",
|
||||
"connection_details": map[string]interface{}{
|
||||
"connection_url": connURL,
|
||||
},
|
||||
"plugin_name": "postgresql-database-plugin",
|
||||
"connection_details": map[string]interface{}{},
|
||||
"allowed_roles": []string{"plugin-role-test"},
|
||||
"root_credentials_rotate_statements": []string{},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user