Icu 6800 api is secret data modeling (#1448)
* refactor: 💡 Add isSecret option for model attributes Move secret attribute logic to application serializer that will remove the key/value pair if the value is null or empty ✅ Closes: ICU-6800 * refactor: 💡 Add isSecret option to credential store token * Update addons/api/addon/serializers/credential.js Remove unneeded serialize method for credentials Co-authored-by: Randall Morey <randall@randallmorey.com> * refactor: 💡 add type check for serializing secret attributes Co-authored-by: Randall Morey <randall@randallmorey.com>
This commit is contained in:
1 parent
faec9aad73
commit
84077b5d8a
7 files changed
+36
-43
No files matched your search
@@ -82,6 +82,7 @@ export default class GeneratedCredentialStoreModel extends BaseModel {
|
||||
@attr('string', {
|
||||
for: 'vault',
|
||||
isNestedAttribute: true,
|
||||
isSecret: true,
|
||||
description: 'A token used for accessing Vault.',
|
||||
})
|
||||
token;
|
||||
|
||||
@@ -58,6 +58,7 @@ export default class GeneratedCredentialModel extends BaseModel {
|
||||
@attr('string', {
|
||||
for: 'username_password',
|
||||
isNestedAttribute: true,
|
||||
isSecret: true,
|
||||
description: 'The password for credential.',
|
||||
})
|
||||
password;
|
||||
@@ -66,6 +67,7 @@ export default class GeneratedCredentialModel extends BaseModel {
|
||||
@attr('string', {
|
||||
for: 'ssh_private_key',
|
||||
isNestedAttribute: true,
|
||||
isSecret: true,
|
||||
description: 'The private key for credential.',
|
||||
})
|
||||
private_key;
|
||||
@@ -73,6 +75,7 @@ export default class GeneratedCredentialModel extends BaseModel {
|
||||
@attr('string', {
|
||||
for: 'ssh_private_key',
|
||||
isNestedAttribute: true,
|
||||
isSecret: true,
|
||||
description: 'The private key passphrase for credential.',
|
||||
})
|
||||
private_key_passphrase;
|
||||
|
||||
Reference in new issue
Block a user