* Make logging out of Web UI redirect to the login form using the same auth method that was previously used. This makes it less annoying to log back in again when your session expires.
* Address PR feedback.
Co-authored-by: Angel Garbarino <Monkeychip@users.noreply.github.com>
* Core usage metrics v1 (merge to side-branch) (#8238)
* restructure menu layout per designs
* setup new routing that will set the stage for a metrics landing page
* fix formatting
* Revert "fix formatting"
This reverts commit e77cdec5e58cdcea49aa1b97f80238433c4f7d1e.
* fix formatting
* small styling changes
* change request routing to metrics
* rename route js file
* Core usage metrics v2 (#8263)
* restructure menu layout per designs
* setup new routing that will set the stage for a metrics landing page
* fix formatting
* Revert "fix formatting"
This reverts commit e77cdec5e58cdcea49aa1b97f80238433c4f7d1e.
* fix formatting
* small styling changes
* change request routing to metrics
* rename route js file
* setup selectable card component and api request
* add token and http request models to route and template
* add entities to route and template
* clean up
* add breadcrumbs and some clean up work
* remove unused selectable-card component
* refactor to a serializer
* move adapters, serializers, and models into metrics folder
* remove unused file
* address pr comments
* address pr comments
* Core Usage Metrics V3 (#8316)
* restructure menu layout per designs
* setup new routing that will set the stage for a metrics landing page
* fix formatting
* Revert "fix formatting"
This reverts commit e77cdec5e58cdcea49aa1b97f80238433c4f7d1e.
* fix formatting
* small styling changes
* change request routing to metrics
* rename route js file
* setup selectable card component and api request
* add token and http request models to route and template
* add entities to route and template
* clean up
* add breadcrumbs and some clean up work
* remove unused selectable-card component
* setup smaller http request bar chart
* refactor to a serializer
* move adapters, serializers, and models into metrics folder
* remove unused file
* setup change part of component
* fix broken model
* add conditional class
* setting up computed properties in new component
* small fixes
* setup components
* minor fixes
* rename
* clean up
* firefox fix
* remove shadow bars
* move out of metrics folders
* modify permissions to show difference between token entities and requests
* make tests
* fix class names and associated tests
* clean up
* fix text overflow in non-chrome browsers
* address pr comments, specifically class names and tests
* move into one component
* clean up component descriptions in comments
* small wording changes
* fix for accessibility
* address pr comments around component examples for storybook
* fix test
* fix failing test
* fix test
* only show entities sidenav item if user has list capability on entities
* wip - link to correct paths in top navigation
* remove comment
* only link to groups page if user has list capability
* add test for checking multiple capabilities
* test when capabilities are not specified
* format jsdoc comments
* move capabilities check out of helper and into permissions service
* enable auth method item configuration in go code
* properly parse and list generated items
* make sure we only set name on attrs if a label comes from openAPI
* correctly construct paths object for method index route
* set sensitive property on password for userpass
* remove debugger statements
* pass method model to list route template to use paths on model for tabs
* update tab generation in generated item list, undo enabling userpass users
* enable openapi generated itams for certs and userpass, update ldap to no longer have action on list endpoint
* add editType to DisplayAttributes, pull tokenutil fields into field group
* show sensitive message for sensitive fields displayed in fieldGroupShow component
* grab sensitive and editType fields from displayAttrs in openapi-to-attrs util
* make sure we don't ask for paths for secret backends since that isn't setup yet
* fix styling of sensitive text for fieldGroupShow component
* update openapi-to-attrs util test to no longer include label by default, change debugger to console.err in path-help, remove dynamic ui auth methods from tab count test
* properly log errors to the console
* capitalize This value is sensitive...
* get rid of extra padding on bottom of fieldgroupshow
* make auth methods clickable and use new confirm ux
* Update sdk/framework/path.go
Co-Authored-By: Jim Kalafut <jkalafut@hashicorp.com>
* Update sdk/framework/path.go
Co-Authored-By: Jim Kalafut <jkalafut@hashicorp.com>
* add whitespace
* return intErr instead of err
* uncomment out helpUrl because we need it
* remove extra box class
* use const instead of let
* remove extra conditional since we already split the pathName later on
* ensure we request the correct url when listing generated items
* use const
* link to list and show pages
* remove dead code
* show nested item name instead of id
* add comments
* show tooltip for text-file inputs
* fix storybook
* remove extra filter
* add TODOs
* add comments
* comment out unused variables but leave them in function signature
* only link to auth methods that can be fully managed in the ui
* clean up comments
* only render tooltip if there is helpText
* rename id authMethodPath
* remove optionsForQuery since we don't need it
* add indentation
* standardize ConfirmMessage and show model name instead of id when editing
* standardize ConfirmMessage and show model name instead of id when editing
* add comments
* post to the correct updateUrl so we can edit users and groups
* use pop instead of slice
* add TODO for finding a better way to store ids
* ensure ids are handled the same way on list and show pages; fix editing and deleting
* add comment about difference between list and show urls
* use model.id instead of name since we do not need it
* remove dead code
* ensure list pages have page headers
* standardize using authMethodPath instead of method and remove dead code
* i love indentation
* remove more dead code
* use new Confirm
* show correct flash message when deleting an item
* update flash message for creating and updating
* use plus icon for creating group/user instead of an arrow
* add storage route
* template out the routes and new raft storage overview
* fetch raft config and add new server model
* pngcrush the favicon
* add view components and binary-file component
* add form-save-buttons component
* adjust rawRequest so that it can send a request body and returns the response on errors
* hook up restore
* rename binary-file to file-to-array-buffer
* add ember-service-worker
* use forked version of ember-service-worker for now
* scope the service worker to a single endpoint
* show both download buttons for now
* add service worker download with a fallback to JS in-mem download
* add remove peer functionality
* lint go file
* add storage-type to the cluster and node models
* update edit for to take a cancel action
* separate out a css table styles to be used by http-requests-table and on the raft-overview component
* add raft-join adapter, model, component and use on the init page
* fix styling and gate the menu item on the cluster using raft storage
* style tweaks to the raft-join component
* fix linting
* add form-save-buttons component to storybook
* add cancel functionality for backup uploads, and add a success message for successful uploads
* add component tests
* add filesize.js
* add filesize and modified date to file-to-array-buffer
* fix linting
* fix server section showing in the cluster nav
* don't use babel transforms in service worker lib because we don't want 2 copies of babel polyfill
* add file-to-array-buffer to storybook
* add comments and use removeObjectURL to raft-storage-overview
* update alert-banner markdown
* messaging change for upload alert banner
* Update ui/app/templates/components/raft-storage-restore.hbs
Co-Authored-By: Joshua Ogle <joshua@joshuaogle.com>
* more comments
* actually render the label if passed and update stories with knobs
* check for model in the edit form before rolling back
* make sure namespace service name is consistent in the auth service
* actually tell it what service to inject
* do not swallow ControlGroupErrors when viewing or editing kvv2 secrets
* test kv v2 control group workflow
* do not manually clearModelCache when logging out since this already happens when leaving the logout route
* remove pauseTest
* update comments
* wip - looking into why restricted user can see the control group protected secret after it has already been unwrapped once
* strip version from query params so we can unwrap a secret after it is authorized
* use attachCapabilities instead of lazyCapabilities to ensure models are cleaned up properly
* remove comment
* make ControlGroupError extend AdapterError
* fix broken redirect_to test
* one day i will remember to remove my debugger statements; today is not that day
* no need to check for a ControlGroupError since it extends an AdapterError
* see if using EmberError instead of AdapterError fixes the browserstack tests
* Revert "see if using EmberError instead of AdapterError fixes the browserstack tests"
This reverts commit 14ddd67cacbf1ccecb8cc2d1f59a2c273866da72.
* be more specific about node version, and specify a yarn version
* update ember, ember-cli, ember-data, ember-data-model-fragments
* use router handlers to access transition information
* fix shadowing of component helper
* update ivy-codemirror, ember-cli-inject-live-reload
* remove custom router service
* don't use transition.queryParams
* update ember-cli-deprecation-workflow
* refactor kv v1 to use 'path' instead of 'id' on creation
* fix auth-jwt-test and toolbar-link-test
* update ember composable helpers
* remove Ember.copy from test file
* no more deprecations in the workflow
* fix more secret tests
* fix remaining failed tests
* move select component to core because it's used by ttl-picker
* generate new model class for each test instead of reusing an existing one
* fix selectors on kmip tests
* refactor how control groups construct urls from the new transition objects
* add router service override back in, and have it be evented so that we can trigger router events on it
* move stories and markdown files to core if the component lives in core
* update ember-cli, ember-cli-babel, ember-auto-import
* update base64js, date-fns, deepmerge, codemirror, broccoli-asset-rev
* update linting rules
* fix test selectors
* update ember-api-actions, ember-concurrency, ember-load-initializers, escape-string-regexp, normalize.css, prettier-eslint-cli, jsdoc-to-markdown
* remove test-results dir
* update base64js, ember-cli-clipboard, ember-cli-sass, ember-cli-string-helpers, ember-cli-template-lint, ember-cli-uglify, ember-link-action
* fix linting
* run yarn install without restoring from cache
* refactor how tests are run and handle the vault server subprocess
* update makefile for new test task names
* update circle config to use the new yarn task
* fix writing the seal keys when starting the dev server
* remove optional deps from the lockfile
* don't ignore-optional on yarn install
* remove errant console.log
* update ember-basic-dropdown-hover, jsonlint, yargs-parser
* update ember-cli-flash
* add back optionalDeps
* update @babel/core@7.5.5, ember-basic-dropdown@1.1.3, eslint-plugin-ember@6.8.2
* update storybook to the latest release
* add a babel config with targets so that the ember babel plugin works properly
* update ember-resolver, move ember-cli-storybook to devDependencies
* revert normalize.css upgrade
* silence fetchadapter warning for now
* exclude 3rd party array helper now that ember includes one
* fix switch and entity lookup styling
* only add -root suffix if it's not in versions mode
* make sure drop always has an array on the aws role form
* fix labels like we did with the backport
* update eslintignore
* update the yarn version in the docker build file
* update eslint ignore
* add shell quote
* use shell quote's parse method to properly escape strings entered in the web cli
* add and update tests for the web CLI
* fix linting and skip test for ' in a path
* skip the correct test
* reset namespace cache when a user logs out
* fix issue where if you log in to a namespace with an initial /, nested namespaces would not show up in the navigation
* set an empty list of namespaces instead of ignoring error
* add tests for namespace bugs
* use this consistently in template
* 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
* add no-jquery rule and move event listeners to ember-concurrency tasks
* remove unnecessary onchange and handleKeyDown actions
* add element.closest polyfill and convert linked-block to use native dom apis
* update pretender, fetch, page-object, add optional-features, remove ember/jquery
* turn off jquery inclusion
* remove jQuery.isPlainObject usage
* violatedDirective isn't always formatted the same
* use fetch and the ember-fetch adapter mixin
* move to fetch and lowercase headers for pretender
* display non-ember-data errors
* use new async fn test style and lowercase headers in auth service test
* setContext is not necessary with the new style tests and ember-cli-page-object - it actually triggers jquery usage
* update ember-fetch, ember-cli-pretender
* wait for permissions check
* lowercase header name in auth test
* refactor transit tests to one test per key type
* simplify pollCluster helper
* stop flakey tests by prefering the native fetch
* avoid uncaught TransitionAborted error by navigating directly to unseal
* unset model on controller after unloading it because controllers are singletons
* update yarn.lock
* Add http request volume table (#6765)
* init http metrics page
* remove flex-table-column
* add http requests table
* calculate percent change between each counter
* start percent change tests
* style request table
* show percent more/less glyph
* add percent more less tests
* add inline alert about recorded metrics
* make arrows diagonal
* remove conditional inside countersWithChange
* add better error msg
* use tagName and wrapping element a la glimmer components
* extend ClusterRouteBase so auth and seal checks happen
* make table accessible
* remove curlies
* add HttpRequestsTable to storybook
* make table accessible
* use qunit dom for better assertions
* remove EmptyState since we will never have 0 requests
* ensure counters is set in test context
* Http request volume/add barchart (#6814)
* Add http request volume table (#6765)
* init http metrics page
* remove flex-table-column
* add http requests table
* calculate percent change between each counter
* start percent change tests
* style request table
* show percent more/less glyph
* add percent more less tests
* add inline alert about recorded metrics
* make arrows diagonal
* remove conditional inside countersWithChange
* add better error msg
* use tagName and wrapping element a la glimmer components
* extend ClusterRouteBase so auth and seal checks happen
* make table accessible
* remove curlies
* add HttpRequestsTable to storybook
* make table accessible
* use qunit dom for better assertions
* remove EmptyState since we will never have 0 requests
* ensure counters is set in test context
* add http-requests-bar-chart
* add HttpRequestsBarChart tests
* add HttpRequestsBarChart to Storybook
* format total number of requests according to locale
* do not show extra minus sign when percent change is negative
* add link to request metrics in status bar menu
* only show bar chart if we have data for more than 1 month
* make ticks lighter
* ensure charts show data for correct month
* make example counters response look like the adapter response instead of the raw api response
* ensure ui shows the same utc date as the api response
* add format-utc tests
* downgrade to d3 v4 to support ie11
* add gridlines
* move dasharray to css
* use scheduleOnce instead of debounce to prevent multiple re-renders
* add key function to bars
* add exit case when data is no longer in parsedCounters
* fix timestamp in table test
* fix timestamps
* use utcParse and fallback to isoParse for non-UTC dates
* fix bar chart tests
* add browserstack
* check for data before removing root token
* fix root prefix and select by attributes for ie11
* use objectAt for ie11
* use blobs instead of files for ie11
* manually round cirucmference for ie11
* skip csp test on ie11
* skip tests in ie11
* include polyfill for CI
* remove on exit hooks
* update which browserstack tests are run
* remove ie check since we are not running these tests in ie
* remove ie check since we are not running these tests in ie
* add ember-cli-deprecation-workflow
* this._router in routes to quiet deprecation
* mark style bindings as htmlSafe strings
* simplify authenticate service hook with async fn
* don't serialize aliases relationship on entities
* update ember-test-selectors so we can use supportsDataTestProperties
* allow duplicate flash messages because we don't want a log warning
* update ember-concurrency for better error message
* use ember-qunit instead of ember-cli-qunit
* update ember-cli-page-object so we're not using a beta lol
* ignore test-helper jquery context warning
* fix race condition in pgp-file test by using ember-concurrency task and test waiter
* await cli commands
* fail tests if async leakage is detected
* update auth-jwt component and tests to be simpler
* fix linting
* review feedback
* directly depend on route-recognizer
* add path encode helper using route-recognizer normalizer methods
* encode user-entered paths/ids for places we're not using the built-in ember data buildUrl method
* encode secret link params
* decode params from the url, and encode for linked-block and navigate-input components
* add escape-string-regexp
* use list-controller mixin and escape the string when contructing new Regex objects
* encode paths in the console service
* add acceptance tests for kv secrets
* make encoding in linked-block an attribute, and use it on secret lists
* egp endpoints are enterprise-only, so include 'enterprise' text in the test
* fix routing test and exclude single quote from encoding tests
* encode cli string before tokenizing
* encode auth_path for use with urlFor
* add test for single quote via UI input instead of web cli
* check for capabilities when finding matching paths
* disable wizard items that user does not have access to
* make hasPermissions accept an array of capabilities
* refactor features-selection
* fix tests
* implement feedback
* add permissions service
* start template helper
* match prefixed paths
* gate sidebar links
* land on first page user has access to
* show nav when user first logs in
* clear paths when user logs out
* add tests
* implement feedback
* show all nav items if no policy is found
* update onboarding wizard
* fix some unrelated tests
* add support for namespaces
* gate wizard
* unstage package and lockfile
* centralize page size setting, and default to page size of 5 in dev
* remove size arg when using lazyPaginatedQuery so that the app uses the config default size
* move list-pagination component out of the loop
* update store tests
* move warning banner out of token-expire-warning and into user menu
* check renewal status every 5s, and resume auto-renew if a user becomes active again
* use a link in the token-expire-warning
* add test for new expiration functionality
* fix license test
* use features helper in license test
* fix import
* use yarn 1.12.1
* remove mirage
* skip some tests for now
* use eslintignore
* logout after auth tests
* use new alert-banner for auth info warning
* add data-test selector back
* move identity back to a button, and style button.link
* make the warning message the right color
* fix shamir test
* review feedback
* fix passing initialKey to the top level secret create page
* add service that uses the private routing service because of various bugs
* make custom router service more like the bundled router service
* clear the store cache when the model changes
* re-add performancestandycode for health api call
* update debounce timeout for namespace input on the auth page
* re-fetch cluster model on successful init
* 500ms for the debounce
* swap auth methods after successful api call so that the auth box doesn't jump around
* move list capability fetch to namespace component and don't use computed queryRecord to fetch it
* convert ed models to JSON so that they're unaffected by store unloading
* serialize with the id for the auth method models
* speed tests back up with different polling while loop
* login flash isn't in the same run loop so no longer needs withFlash
* fix token expiration calculation
* move authenticate to an ember concurrency task
* don't show logged in nav while still on the auth route
* move current tests to integration folder, add unit test for expiration calculation
* fix auth form tests
* add switch link on namespace link page if user has access to the namespace
* refresh list when you delete, only show manage if you can list
* fix bug where disconnected namespaces wouldn't show the picker properly
* namespaces list should end in a slash
* end full namespace paths with a /
* shorten pop up menu link
* add namespace sidebar item
* depend on ember-inflector directly
* list-view and list-item components
* fill out components and render empty namespaces page
* list namespaces in access
* add menu contextual component to list item
* popup contextual component
* full crud for namespaces
* add namespaces service and picker component
* split application and vault.cluster templates and controllers, add namespace query param, add namespace-picker to vault.namespace template
* remove usage of href-to
* remove ember-href-to from deps
* add ember-responsive
* start styling the picker and link to appropriate namespaces, use ember-responsive to render picker in different places based on the breakpoint
* get query param working and save ns to authdata when authenticating, feed through ns in application adapter
* move to observer on the controller for setting state on the service
* set state in the beforeModel hook and clear the ember data model cache
* nav to secrets on change and make error handling more resilient utilizing the method that atlas does to eagerly update URLs
* add a list of sys endpoints in a helper
* hide header elements if not in the root namespace
* debounce namespace input on auth, fix 404 for auth method fetch, move auth method fetch to a task on the auth-form component and refretch on namespace change
* fix display of supported engines and exclusion of sys and identity engines
* don't fetch replication status if you're in a non-root namespace
* hide seal sub-menu if not in the root namespace
* don't autocomplete auth form inputs
* always send some requests to the root namespace
* use methodType and engineType instead of type in case there it is ns_ prefixed
* use sys/internal/ui/namespaces to fetch the list in the dropdown
* don't use model for namespace picker and always make the request to the token namespace
* fix header handling for fetch calls
* use namespace-reminder component on creation and edit forms throughout the application
* add namespace-reminder to the console
* add flat
* add deepmerge for creating the tree in the menu
* delayed rendering for animation timing
* design and code feedback on the first round
* white text in the namespace picker
* fix namespace picker issues with root keys
* separate path-to-tree
* add tests for path-to-tree util
* hide picker if you're in the root ns and you can't access other namespaces
* show error message if you enter invalid characters for namespace path
* return a different model if we dont have the namespaces feature and show upgrade page
* if a token has a namespace_path, use that as the root user namespace and transition them there on login
* use token namespace for user, but use specified namespace to log in
* always renew tokens in the token namespace
* fix edition-badge test
* add routes for control groups in tools, settings, access (#4718)
* UI control group - storage, request, authorization, and unwrapping (#4899)
* UI control groups config (#4927)
* add router service polyfill
* add refresh command
* move async code into ember-concurrency task and implement refresh that way
* use ember-concurrency derived state to show a loading spinner when the task is running
* scroll after appending to log too
* adding columnify and ember-cli-cjs-transform
* add yargs-parser
* remove vendored yargs-parser tokenizer and use cjs transform to import it from actual yargs-parser
* add clear command that clears the log, but maintains history
* make codemirror have no gutter and be auto-height when rendered in the console output log
* add fullscreen command and hook up fullscreen toggle button
* hook up copy button
* add popups
* add ability to disable entity and banner when entity is disabled
* re-add alias-popup template
* add accpetance tests for creating entities
* add more entity creation acceptance tests
* add delete to edit-form
* add more identity tests and associated selectors
* add onSuccess hook and use UnloadModel route mixins
* add ability to toggle entity disabling from the popover
* fix store list cache because unloadAll isn't synchronous
* fill out tests for identity items and aliases
* add ability to enable entity from the detail page
* toArray on the peekAll
* fix other tests/behavior that relied on a RecordArray
* adjust layout for disabled entity and label for disabling an entity on the edit form
* add item-details integration tests
* move disable field on the entity form
* use ghost buttons for delete in identity and policy edit forms
* adding computed macros for lazy capability fetching and using them in the identity models
* fix version service parsing of .hsm in a version string
* remove race condition where the replication menu would show the enterprise upsell in an enterprise binary
* fix styling and layout of replication status menu
* move version check to beforeModel
* use waitForEvent for the CSP service as @alisdair suggested
* Secrets engine not secret engine
* move algorithm -> hash_algorithm and add support for picking signature_algorithm for RSA keys when signing or verifying in transit
* add ember-cli-content-security-policy
* only enable client side CSP when not in production - the go side handles this otherwise
* add service that handles and stores CSP violations via the securitypolicyviolation event
* update auth form component to show a specialized message when there's a CSP error
* move to computed prop for showing the CSP error message
* fix typos
* add hasSentinel to the version service
* use hasSentinel instead of features directly
* type='button' strikes again
* pass url param in tab links to ensure hrefs are updated
* 404 when the item_type is invalid for the identity route