-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Vault adds Amazon Secrets Manager #4455
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<template> | ||
<BaseKV :config="$data" :title="$tc('AmazonSecretsManager')" /> | ||
</template> | ||
|
||
<script> | ||
import BaseKV from './Base.vue' | ||
|
||
export default { | ||
name: 'AmazonSecretsManager', | ||
components: { | ||
BaseKV | ||
}, | ||
data() { | ||
const vm = this | ||
return { | ||
url: `/api/v1/settings/setting/?category=aws_sm`, | ||
hasDetailInMsg: false, | ||
visible: false, | ||
moreButtons: [ | ||
{ | ||
title: this.$t('Test'), | ||
loading: false, | ||
callback: function(value, form, btn) { | ||
btn.loading = true | ||
vm.$axios.post( | ||
'/api/v1/settings/vault/aws/testing/', | ||
value | ||
).then(res => { | ||
vm.$message.success(res['msg']) | ||
}).catch(() => { | ||
vm.$log.error('err occur') | ||
}).finally(() => { btn.loading = false }) | ||
} | ||
} | ||
], | ||
encryptedFields: ['VAULT_AWS_ACCESS_SECRET_KEY'], | ||
fields: [ | ||
[this.$t('AccountStorage'), | ||
[ | ||
'VAULT_AWS_REGION_NAME', | ||
'VAULT_AWS_ACCESS_KEY_ID', | ||
'VAULT_AWS_ACCESS_SECRET_KEY' | ||
] | ||
] | ||
], | ||
fieldsMeta: { | ||
}, | ||
submitMethod() { | ||
return 'patch' | ||
} | ||
} | ||
}, | ||
computed: {}, | ||
methods: {} | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
|
||
</style> | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ import { openTaskPage } from '@/utils/jms' | |
import store from '@/store' | ||
import HashiCorpKV from './HCP.vue' | ||
import AzureKV from './Azure.vue' | ||
import AwsSM from './Aws.vue' | ||
|
||
export default { | ||
components: { | ||
|
@@ -48,7 +49,7 @@ export default { | |
], | ||
fields: [ | ||
[this.$t('Basic'), ['VAULT_ENABLED', 'VAULT_BACKEND', 'HISTORY_ACCOUNT_CLEAN_LIMIT']], | ||
[this.$t('Provider'), ['HCP', 'AZURE']] | ||
[this.$t('Provider'), ['HCP', 'AZURE', 'AWS']] | ||
], | ||
fieldsMeta: { | ||
HISTORY_ACCOUNT_CLEAN_LIMIT: { | ||
|
@@ -79,6 +80,13 @@ export default { | |
hidden: (formValue) => { | ||
return !formValue.VAULT_ENABLED || formValue['VAULT_BACKEND'] !== 'azure' | ||
} | ||
}, | ||
AWS: { | ||
label: this.$t('AmazonSecretsManager'), | ||
component: AwsSM, | ||
hidden: (formValue) => { | ||
return !formValue.VAULT_ENABLED || formValue['VAULT_BACKEND'] !== 'aws' | ||
} | ||
} | ||
}, | ||
submitMethod() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The provided code does not appear to contain any significant differences or issues for checking. It appears to be consistent with past practices of using Vue Components such as HashiCorp KV, Azure KV, and AWS Secret Management Service (HCP), each requiring its own form fields based on Vault Backend selection. It is crucial to note that while I have reviewed the code, it's important you review all necessary changes after making corrections or additions yourself. If there are specific areas where inconsistencies need further analysis or adjustments:
By doing so, potential irregularities will become more discernible when comparing actual implementations versus suggested improvements. Remember that reviewing modern coding standards and keeping updated with evolving software development best practices ensures robust solutions that scale well beyond just historical implementation requirements. If you can share specific concerns or discrepancies from the code you referenced specifically, I could offer more detailed assistance. If nothing seems out-of-the-ordinary at face-value inspection, then your environment or context might require additional attention to fully analyze your application. |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, there aren't any major issues with this template code provided so far. It seems to be well-written but could potentially have some adjustments made depending on specific requirements and context.
As per my knowledge cut-off until now (September 2021), no significant changes were observed in the current JavaScript code snippet above.