forked from hashicorp/vault
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor aws secret ui (hashicorp#5193)
Update UI for AWS secret backend refactor * Support empty AWS policy documents * Try to make ARN input multiple * move aws-role serializer to use the application serializer as the base * support editing strings as JSON in the form field component * update model, form and show to use form-component component, and swap fields based on credential type * fix tests * unify credential generation for aws and remove the STS specific action in the UI * add label to the new json string form field
- Loading branch information
Showing
16 changed files
with
220 additions
and
321 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import ApplicationAdapter from './application'; | ||
|
||
export default ApplicationAdapter.extend({ | ||
createRecord(store, type, snapshot) { | ||
let ttl = snapshot.attr('ttl'); | ||
let roleArn = snapshot.attr('roleArn'); | ||
let data = {}; | ||
if (ttl) { | ||
data.ttl = ttl; | ||
} | ||
if (roleArn) { | ||
data.role_arn = roleArn; | ||
} | ||
let method = ttl || roleArn ? 'POST' : 'GET'; | ||
let options = ttl || roleArn ? { data } : {}; | ||
let role = snapshot.attr('role'); | ||
let url = `/v1/${role.backend}/creds/${role.name}`; | ||
|
||
return this.ajax(url, method, options).then(response => { | ||
response.id = snapshot.id; | ||
response.modelName = type.modelName; | ||
store.pushPayload(type.modelName, response); | ||
}); | ||
}, | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.