open-vault/ui/app/helpers/mountable-secret-engines.js

130 lines
2.3 KiB
JavaScript
Raw Normal View History

import { helper as buildHelper } from '@ember/component/helper';
2018-08-28 05:03:55 +00:00
UI - add kmip engine (#6936) * add kmip engine * adjust where kmip engine is mounted and sketch out routes * add secret mount path service to share params to engines * move list-controller and list-route mixins to core addon and adjust imports * properly link kmip secrets from the secrets list page * tweak routes and add list controllers * stub out some models and adapters * fix mixin exports * move a bunch of components into the core addon * use new empty yield in list-view in the namespace template * scopes list using list-view and list-item components * simplify and flatten routes, templates for all of the list pages * role show route and template and scope create template * add ember-router-helpers * add more packages to the dependencies of the core addon * add field-group-show component for listing fields from a model * move more components to the shared addon * make configure and configuration routes work and save a generated model * save and list scopes * role create, list, read * list credentials properly * move allowed attributes to field group * show allowed operations on role details page * add kmip logo to mount secrets engine list page * add role edit page * show all model attributes on role show page * enable role edit * fix newFields error by creating open api role model on the role list route * only show selected fields on role edit page * do not send scope and backend attrs to api * move path-or-array to core addon * move string-list component to core addon * remove extra top border when there is only one field group * add icons for all of the list pages * update kmip config model so defaultValue doesn't error * generate credentials * credential create and show * only show kmip when feature is enabled * fix saving of TTL fields generated from Open API * move masked-input and list-pagination components to core addon * add param on edit form to allow for calling onSave after render happens * polish credential show page and redirect there after generating credentials * add externalLink for kmip engine * add kmip-breadcrumb component * use kmip-breadcrumb component * add linkPrefix param to linked-block component to allow for routing programmatically inside an engine * redirect to the right place when enabling kmip * fix linting * review feedback * update signature for path-help usage * fix ttl field expansion test * remove role filed from role form, fix generate redirect * remove field-group-show because it's in the core addon * remove bottom rule from show pages * fix Max TTL displayAttrs for ssh role * update edit-form to take fields or attrs * fix linting * remove listenAddrs and set default val on ttl if a val is passed in
2019-06-21 21:05:45 +00:00
export const KMIP = {
displayName: 'KMIP',
value: 'kmip',
type: 'kmip',
category: 'generic',
UI: Transform secrets engine with transformations * Ui/transform enable (#9647) * Show Transform on engines list if enterprise * Add box-radio component * Add is-disabled styling for box-radio and fix tooltip styling when position: above * Add KMIP and Transform to possible features on has feature helper * Sidebranch: Transform Secret Engine Initial setup (#9625) * WIP // list transforms, console.logs and all * setup LIST transformations ajax request and draft out options-for-backend options * change from plural to singluar and add transform to secret-edit * create two transform edit components * modify transform model with new attrs * add adapterFor to connect transform adapter to transform-edit-form component * setup Allowed roles searchSelect component to search over new transform/role adapter and model. * clean up for PR * clean up linting errors * restructure adapter call, now it works. * remove console * setup template model for SearchSelect component * add props to form field and search select for styling Co-authored-by: Chelsea Shaw <chelshaw.dev@gmail.com> * Ui/transform language fixes (#9666) * Update casing and wording on Transform list route. Use generic list item for transformations * Add back js file for transformation-edit * Set up transform for tabs * Ui/create edit transformation fixes (#9668) * add conditional for masking vs tweak source based on type, and update text for create transformation * change order * fix error with stringArray * setup the edit/delete transformation view * clean up toolbar links * setup serializer to change response of mask character from keycode to character * change styling of label and sub-text size, confirmed with design * temp fix on templates vs template * add clickable list item * add space between template list * setup styling and structure for the rest of the show transformation. TODO: turn into components. * create transform-show-transformation component * add attachCapabilities to transform model and update transform-transformation-itme list accordingly * clean up liniting errors * address pr comments * remove leftover * clean up * Sidebranch: UI transform create and edit clean up (#9778) * clean up some of the TODOs * setup edit view with read only attributes for name and template * setup initial selected for search select component * fixes * hide templates form field for now * set selectLimit for search select component * hide power select if the select limit is greater than or equal to the selectedOptions length * clean up failing linting * address pr comments * Ui/fix list roles transformation (#9788) * Update search-select to pass backend to query if exists * Update role and template adapters * cleanup * Fix replace with static string * Ui/transform cleanup 2 (#9789) * amend encode/decode commands for now until design gets back with more details * restrict character count on masking input field * clean up selectLimit * show backend instead of transform in cli copy command * Show KMIP un-selectable if enterprise but no ADP module (#9780) * New component transform-edit-base * Duplicate RoleEdit as TransformEditBase and swap in all transform components * Roll back role-edit changes * Update to transform edit base * Remove extraeneous set backend type on transform components * formatting * Revert search-select changes * Update template/templates data on transformation (#9838) Co-authored-by: Angel Garbarino <Monkeychip@users.noreply.github.com>
2020-08-26 16:31:18 +00:00
requiredFeature: 'KMIP',
};
export const TRANSFORM = {
displayName: 'Transform',
value: 'transform',
type: 'transform',
category: 'generic',
requiredFeature: 'Transform Secrets Engine',
UI - add kmip engine (#6936) * add kmip engine * adjust where kmip engine is mounted and sketch out routes * add secret mount path service to share params to engines * move list-controller and list-route mixins to core addon and adjust imports * properly link kmip secrets from the secrets list page * tweak routes and add list controllers * stub out some models and adapters * fix mixin exports * move a bunch of components into the core addon * use new empty yield in list-view in the namespace template * scopes list using list-view and list-item components * simplify and flatten routes, templates for all of the list pages * role show route and template and scope create template * add ember-router-helpers * add more packages to the dependencies of the core addon * add field-group-show component for listing fields from a model * move more components to the shared addon * make configure and configuration routes work and save a generated model * save and list scopes * role create, list, read * list credentials properly * move allowed attributes to field group * show allowed operations on role details page * add kmip logo to mount secrets engine list page * add role edit page * show all model attributes on role show page * enable role edit * fix newFields error by creating open api role model on the role list route * only show selected fields on role edit page * do not send scope and backend attrs to api * move path-or-array to core addon * move string-list component to core addon * remove extra top border when there is only one field group * add icons for all of the list pages * update kmip config model so defaultValue doesn't error * generate credentials * credential create and show * only show kmip when feature is enabled * fix saving of TTL fields generated from Open API * move masked-input and list-pagination components to core addon * add param on edit form to allow for calling onSave after render happens * polish credential show page and redirect there after generating credentials * add externalLink for kmip engine * add kmip-breadcrumb component * use kmip-breadcrumb component * add linkPrefix param to linked-block component to allow for routing programmatically inside an engine * redirect to the right place when enabling kmip * fix linting * review feedback * update signature for path-help usage * fix ttl field expansion test * remove role filed from role form, fix generate redirect * remove field-group-show because it's in the core addon * remove bottom rule from show pages * fix Max TTL displayAttrs for ssh role * update edit-form to take fields or attrs * fix linting * remove listenAddrs and set default val on ttl if a val is passed in
2019-06-21 21:05:45 +00:00
};
Key Management Secrets Engine Phase 1 (#15036) * KMSE: Key Model / Adapter / Serializer setup (#13638) * First pass model * KMS key adapter (create/update), serializer, model * Add last rotated and provider to key * KeyEdit secret-edit component, and more key model stuff * add formatDate param support to infotablerow * Add keymgmt key to routes and options-for-backend * Rename keymgmt-key to keymgmt/key * Add test, cleanup * Add mirage handler for kms * Address PR comments * KMS Providers (#13797) * adds pagination-controls component * adds kms provider model, adapter and serializer * adds kms provider-edit component * updates secrets routes to handle itemType query param for kms * updates kms key adapter to query by provider * adds tests for provider-edit component * refactors kms provider adapter to account for dynamic path * adds model-validations-helper util * removes keymgmt from supported-secret-backends * fixes issue generating url for fetching keys for a provider * updates modelType method on secret-edit route to accept options object as arg rather than transition * adds additional checks to ensure queryParams are defined in options object for modelType method * UI/keymgmt distribute key (#13840) * Add distribution details on key page, and empty states if no permissions * Allow search-select component to return object so parent can tell when new item was created * Add stringarray transform * Distribute component first pass * Refactor distribute component for use with internal object rather than ember-data model * Specific permission denied errors on key edit * Allow inline errors on search-select component * Style updates for form errors * Styling and error messages on distribute component * Allow block template on inline alert so we can add doc links * Add distribute action, flash messages, cleanup * Cleanup & Add tests * More cleanup * Address PR comments * Move disable operations logic to commponent class * KMSE Enable/Config (#14835) * adds keymgmt secrets engine as supported backend * adds comment to check on keymgmt as member of adp module * updates kms provider to use model-validations decorator * fixes lint errors and tests Co-authored-by: Chelsea Shaw <82459713+hashishaw@users.noreply.github.com>
2022-04-20 18:40:27 +00:00
export const KEYMGMT = {
displayName: 'Key Management',
value: 'keymgmt',
type: 'keymgmt',
glyph: 'key',
category: 'cloud',
Key Management Secrets Engine Phase 1 (#15036) * KMSE: Key Model / Adapter / Serializer setup (#13638) * First pass model * KMS key adapter (create/update), serializer, model * Add last rotated and provider to key * KeyEdit secret-edit component, and more key model stuff * add formatDate param support to infotablerow * Add keymgmt key to routes and options-for-backend * Rename keymgmt-key to keymgmt/key * Add test, cleanup * Add mirage handler for kms * Address PR comments * KMS Providers (#13797) * adds pagination-controls component * adds kms provider model, adapter and serializer * adds kms provider-edit component * updates secrets routes to handle itemType query param for kms * updates kms key adapter to query by provider * adds tests for provider-edit component * refactors kms provider adapter to account for dynamic path * adds model-validations-helper util * removes keymgmt from supported-secret-backends * fixes issue generating url for fetching keys for a provider * updates modelType method on secret-edit route to accept options object as arg rather than transition * adds additional checks to ensure queryParams are defined in options object for modelType method * UI/keymgmt distribute key (#13840) * Add distribution details on key page, and empty states if no permissions * Allow search-select component to return object so parent can tell when new item was created * Add stringarray transform * Distribute component first pass * Refactor distribute component for use with internal object rather than ember-data model * Specific permission denied errors on key edit * Allow inline errors on search-select component * Style updates for form errors * Styling and error messages on distribute component * Allow block template on inline alert so we can add doc links * Add distribute action, flash messages, cleanup * Cleanup & Add tests * More cleanup * Address PR comments * Move disable operations logic to commponent class * KMSE Enable/Config (#14835) * adds keymgmt secrets engine as supported backend * adds comment to check on keymgmt as member of adp module * updates kms provider to use model-validations decorator * fixes lint errors and tests Co-authored-by: Chelsea Shaw <82459713+hashishaw@users.noreply.github.com>
2022-04-20 18:40:27 +00:00
requiredFeature: 'Key Management Secrets Engine',
};
2018-08-28 05:03:55 +00:00
const MOUNTABLE_SECRET_ENGINES = [
{
displayName: 'Active Directory',
value: 'ad',
type: 'ad',
category: 'cloud',
},
2018-10-29 22:44:06 +00:00
{
displayName: 'AliCloud',
value: 'alicloud',
type: 'alicloud',
category: 'cloud',
},
2018-08-28 05:03:55 +00:00
{
displayName: 'AWS',
value: 'aws',
type: 'aws',
category: 'cloud',
2022-01-10 17:08:05 +00:00
glyph: 'aws-color',
2018-08-28 05:03:55 +00:00
},
{
displayName: 'Azure',
value: 'azure',
type: 'azure',
category: 'cloud',
2022-01-10 17:08:05 +00:00
glyph: 'azure-color',
},
2018-08-28 05:03:55 +00:00
{
displayName: 'Consul',
value: 'consul',
type: 'consul',
category: 'infra',
},
{
displayName: 'Databases',
value: 'database',
type: 'database',
category: 'infra',
},
{
displayName: 'Google Cloud',
value: 'gcp',
type: 'gcp',
category: 'cloud',
2022-01-10 17:08:05 +00:00
glyph: 'gcp-color',
2018-08-28 05:03:55 +00:00
},
2018-10-29 19:32:27 +00:00
{
displayName: 'Google Cloud KMS',
value: 'gcpkms',
type: 'gcpkms',
category: 'cloud',
2022-01-10 17:08:05 +00:00
glyph: 'gcp-color',
2018-10-29 19:32:27 +00:00
},
2018-08-28 05:03:55 +00:00
{
displayName: 'KV',
value: 'kv',
type: 'kv',
category: 'generic',
},
{
displayName: 'Nomad',
value: 'nomad',
type: 'nomad',
category: 'infra',
},
{
displayName: 'PKI Certificates',
value: 'pki',
type: 'pki',
category: 'generic',
},
{
displayName: 'RabbitMQ',
value: 'rabbitmq',
type: 'rabbitmq',
category: 'infra',
},
{
displayName: 'SSH',
value: 'ssh',
type: 'ssh',
category: 'generic',
},
{
displayName: 'Transit',
value: 'transit',
type: 'transit',
category: 'generic',
},
{
displayName: 'TOTP',
value: 'totp',
type: 'totp',
category: 'generic',
},
];
export function engines() {
return MOUNTABLE_SECRET_ENGINES.slice();
2018-08-28 05:03:55 +00:00
}
export default buildHelper(engines);