mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-29 09:42:25 +00:00
* add granularity form field to sync destinations * update mirage, shim in subkey response * fix comment * add granular updates to list view * update mirage; * update test * comment for updating test * use hds::dropdown in destinations for consistency * move banner to popup menu * add changelog * remove spans from test
41 lines
1.2 KiB
JavaScript
41 lines
1.2 KiB
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import SyncDestinationModel from '../destination';
|
|
import { attr } from '@ember-data/model';
|
|
import { withFormFields } from 'vault/decorators/model-form-fields';
|
|
|
|
const displayFields = [
|
|
// connection details
|
|
'name',
|
|
'credentials',
|
|
// vault sync config options
|
|
'granularity',
|
|
'secretNameTemplate',
|
|
'customTags',
|
|
];
|
|
const formFieldGroups = [
|
|
{ default: ['name', 'granularity', 'secretNameTemplate', 'customTags'] },
|
|
{ Credentials: ['credentials'] },
|
|
];
|
|
@withFormFields(displayFields, formFieldGroups)
|
|
export default class SyncDestinationsGoogleCloudSecretManagerModel extends SyncDestinationModel {
|
|
@attr('string', {
|
|
label: 'JSON credentials',
|
|
subText:
|
|
'If empty, Vault will use the GOOGLE_APPLICATION_CREDENTIALS environment variable if configured.',
|
|
editType: 'file',
|
|
docLink: '/vault/docs/secrets/gcp#authentication',
|
|
})
|
|
credentials; // obfuscated, never returned by API
|
|
|
|
@attr('object', {
|
|
subText:
|
|
'An optional set of informational key-value pairs added as additional metadata on secrets synced to this destination. Custom tags are merged with built-in tags.',
|
|
editType: 'kv',
|
|
})
|
|
customTags;
|
|
}
|