* [UI] Ember Data Migration - Secrets Engine Resource (#30791)
* adds base factory for resources and secrets engine resource
* updates dashboard and secret-engine list route to fetch mounts from api service
* updates secret backends routes to use api service
* updates secrets engine config routes to use api service
* updates secrets backend route to use internal mounts endpoint and fixes error handling
* updates property casing in config details card component
* fixes dashboard tests
* fixes issues with engine configuration
* updates api service to only set token header if value is defined in auth service
* fixes more tests
* Update ui/app/routes/vault/cluster/secrets/backend/configuration/index.js
Co-authored-by: Angel Garbarino <Monkeychip@users.noreply.github.com>
* removes alwaysRender from publicKey field in secret engine configuration details component
* removes unused hideToggle arg from secret engine mount config template
* updates kv config route to load secret-engine model
* fixes kv config route
---------
Co-authored-by: Angel Garbarino <Monkeychip@users.noreply.github.com>
* [UI] Ember Data Migration - Secrets Engine Forms (#30951)
* adds secrets engine form class
* updates mount-secret-backend route and form component to use secrets engine form class and api service
* updates to form class proxy for nested form data properties
* adds form classes for configurable secrets engines
* updates secrets engine config edit route and components to use form classes and api service
* adds missing copyright header
* fixes tests
* fixes type error
* updates configure-ssh component to use form class and api service
* updates configure-ssh tests
* updates configuration-wif component tests
* fixes mount secret backend and form tests
* adds method to normalize request key casing to api service
* addresses pr review feedback
* removes unused secrets engine config models, adapters and serializers (#30980)
* fixes azure config tests
* fixes more ent tests
---------
Co-authored-by: Angel Garbarino <Monkeychip@users.noreply.github.com>
* clean up selectors file and then update testButton to buttonByAttr
* a lot but not really in the scheme of things
* fix component test failures
* fix acceptance test failures
* fix namespace selector
* clean up remaining tests
* another test
* last test
* small changes, but I have test failures
* a mess in custom messages, really hard to test because of test pollution.
* make data-test-submit vs data-test-save
* change other-methods to sign in with other methods
* clean up of failing test
* buttonByAttr to button
* clean up test pollution on config messages
* sweep of clean ups
* another round of small cleanups
* fix some message things, remaining oidc issue?
* use a runCmd to better delete things
* fix to amend for recent auth test changes
* remove skip
* moves validators from model-helpers to forms directory
* creates validate util and updates model-validations directory to use it
* adds form and field classes
* updates validation types
* updates validators import in test
* adds readme for forms
* Update ui/app/utils/forms/validate.ts
Co-authored-by: lane-wetmore <lane.wetmore@hashicorp.com>
---------
Co-authored-by: lane-wetmore <lane.wetmore@hashicorp.com>
* replace custom tag class with Hds::Badge
* another wave of custom class replacements
* remove tag class styles and cleanup
* add changelog entry
* fix changelog name
* remove changelog entry and old styles and clean up
* remove extra classes and clean up
* one more clean up section
* update tests
* fix value check
* updated test
* update tests
* switch to code elements with specific styling and cleanup
* rename store to pagination, remove store extension
* initial update of service test
* remove superfluous helper
* replace store with pagination service in main app
* update kmip engine syntax
* add pagination to kmip engine
* update to pagination in config-ui engine
* update sync engine to use pagination service
* use pagination service in kv engine
* use pagination service in ldap engine
* use pagination in pki engine
* update renaming clearDataset functions
* link to jira VAULT-31721
* remove comment
* use alias for router injection
* update @router declarations in engine files
* fix remaining pki router imports
* dynamically set router based on owner
* address replication routers
* update markdown docs
* use non-deprecated import for getOwner
* revert out of scope changes
* add transition-to test
* rename validators util into model-helpers folder
* move kmip-role-fields to model-helpers
* fill out docs
* Move database-helpers into model-helpers
* broom
* hide patch action for deleted or destroyed versions
* update jsdoc
* add conditional chaining for CE versions that dont have subkeys
* stub version for CE tests
* add comments
* Update ui/lib/kv/addon/routes/secret.js
* wip control group fix?
* dont rely on models for capabilities;
* Revert "wip control group fix?"
This reverts commit cf3e896ba05d2fdfe1f6287bba5c862df4e5d553.
* make explicit request for data
* remove dangerous triple curlies
* cleanup template logic and reuse each-in
* remove capability checks from model
* update tests to reflect new behavior
* add test coverage
* fix mirage factory, update details tests
* test control groups VAULT-29471
* finish patch test
* alphabetize!
* does await help?
* fix factory
* add conditionals for control group error
* UI: Implement overview page for KV v2 (#28162)
* build json editor patch form
* finish patch component and tests
* add tab to each route
* and path route
* add overview tab to tests
* update overview to use updated_time instead of created_time
* redirect relevant secret.details to secret.index
* compute secretState in component instead of pass as arg
* add capabilities service
* add error handling to fetchSubkeys adapter request
* add overview tabs to test
* add subtext to overview card
* remaining redirects in secret edit
* remove create new version from popup menu
* fix breadcrumbs for overview
* separate adding capabilities service
* add service to kv engine
* Revert "separate adding capabilities service"
This reverts commit bb70b12ab7dbcde0fbd2d4d81768e5c8b1c420cc.
* Revert "add service to kv engine"
This reverts commit bfa880535ef7d529d7610936b2c1aae55673d23f.
* update navigation test
* consistently navigate to secret.index route to be explicit
* finish overview navigation tests
* add copyright header
* update delete tests
* fix nav testrs
* cleanup secret edit redirects
* remove redundant async/awaits
* fix create test
* edge case tests
* secret acceptance tests
* final component tests
* rename kvSecretDetails external route to kvSecretOverview
* add comment
* UI: Add patch route and implement Page::Secret::Patch page component (sidebranch) (#28192)
* add tab to each route
* and path route
* add overview tab to tests
* update overview to use updated_time instead of created_time
* redirect relevant secret.details to secret.index
* compute secretState in component instead of pass as arg
* add capabilities service
* add error handling to fetchSubkeys adapter request
* add patch route and put in page component
* add patch secret action to subkeys card
* fix component name
* add patch capability
* alphabetize computed capabilities
* update links, cleanup selectors
* fix more merge conflict stuff
* add capabilities test
* add models to patch link
* add test for patch route
* rename external route
* add error templates
* make notes about enterprise tests, filter one
* remove errors, transition (redirect) instead
* redirect patch routes
* UI: Move fetching secret data to child route (#28198)
* remove @secret from metadata details
* use metadata model instead of secret in paths page
* put delete back into kv/data adapter
* grant access in control group test
* update metadata route and permissions
* remove secret from parent route, only fetch in details route
* change more permissions to route perms, add tests
* revert overview redirect from list view
* wrap model in conditional for perms
* remove redundant canReadCustomMetadata check
* rename adapter method
* handle overview 404
* remove comment
* add customMetadata as an arg
* update grantAccess in test
* make version param easier to follow
* VAULT-30494 handle 404 jira
* refactor capabilities to return an object
* update create tests
* add test for default truthy capabilities
* remove destroy-all-versions from kv/data adapter
* UI: Add enterprise checks (#28215)
* add enterprise check for subkey card
* add max height and scroll to subkey card
* only fetch subkeys if enterprise
* remove check in overview
* add test
* Update ui/tests/integration/components/kv/page/kv-page-overview-test.js
* fix test failures (#28222)
* add assertion
* add optional chaining
* create/delete versioned secret in each module
* wait for transition
* add another waitUntil
* UI: Add patch latest version to toolbar (#28223)
* add patch latest version action to toolbar
* make isPatchAllowed arg all encompassing
* no longer need model check
* use hash so both promises fire at the same time
* add subkeys to policy
* Update ui/lib/kv/addon/routes/secret.js
* add changelog
* small cleanup items! (#28229)
* add conditional for enterprise checking tabs
* cleanup fetchMultiplePaths method
* add test
* remove todo comment, ticket created and design wants to hold off
* keep transition, update comments
* cleanup tests, add index to breadcrumbs
* add some test coverage
* toggle so value is readable
* move date-from-now helper to addon
* make overview cards consistent across engines
* make kv-paths-card component
* remove overview margin all together
* small styling changes for paths card
* small selector additions
* add overview card test
* add overview page and test
* add default timestamp format
* cleanup paths test
* fix dateFromNow import
* fix selectors, cleanup pki selectors
* and more selector cleanup
* make deactivated state single arg
* fix template and remove @isDeleted and @isDestroyed
* add test and hide badge unless deactivated
* address failings from changing selectors
* oops, not ready to show overview tab just yet!
* add deletionTime to currentSecret metadata getter
* build kv-patch-editor component
* add tests
* use validator helpers in kv-object-editor
* update class name in version-history
* remove is- from css class
* move whitespace warning and non-string values warning messages to validators util
* break editor component into smaller ones
* fix typo
* add docs
* rename files and move to directory, add tests for new templates
* fix some bugs and add tests!
* fix validation bug and update tests
* capitalize item in helper
* remove comment
* and one more comment change
* yield all overview card actions
* yield remaining overview card content to the correct block
* close overview card in test
* fix typo
* fix route typo, add selectors where needed
* fix class typo add one more selector
* Update search-select component
- Add aria-label arg
- use label or humanized ID as fallback aria-label
- protect against non-array options arg
* remove overflow-x rule on toolbar-scroller so dropdowns can render in place
* add renderInPlace to dropdowns in pki engine
* Update replication package.json and add renderInPlace
* Add renderInPlace to search-select and basic-dropdown in engines (kubernetes, kv, ldap, sync)
* small cleanup
* use router for transitions within replication engine
* fix inverse value on group-alias belongsTo relationship
* Always call super.willDestroy after custom hooks
* fix deprecation ember-engines.deprecation-camelized-engine-names
* graceful fallback on message-error if adapterError does not include errors
* use router.replaceWith during tests on logout
* fix more links
* refactor tabs-for-auth-section helper
* Fill out route params in generated-item + list compoenents
* Add optional route params to ListView pagination
* Add backend to KV breadcrumb link route models
* fix links in kv v2 pages, update kv-breadcrumbs-test
* remove todo
* chore: update hds and flight-icons
* fix: add missing deps and use .css from HDS
* update HDS components to new syntax
* database-connection-edit: add @waitFor to fix rotate-related acceeptance tests
* use stub to fix confirm-modal-test
---------
Co-authored-by: Alexey Kulakov <uni_que@me.com>
* Show JSON editor by default if secret data is complex, but do not disable JSON toggle
* Add text object warning to kv object editor
* a11y fix: do not disable show diff toggle
* test and language cleanup
* update language
* Update tests for expected behavior
* language!
* Add changelog
* wip need to address testing but want to test something quick on 1.13
* add test coverage
* changelog
* update test comment
* rename getter
* Update kv-data-fields.hbs
revert accidental next step
* linting things
* add deletion in progress banner
* update kv details banner to inline alert
* add logic for purge error
* add params to mirage
* comment in purge_initiated_at for mirage
* update flash message for deleting
* add test for banner
* transition to destination associations after delete
* redirect to details after delete instead of list
* remove attrs from serializer
* update mirage handler to mock purge_initiated_at