mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-30 02:02:43 +00:00
* manual cherry pick to deal with all the merge things * changelog * test fixes * Update 28148.txt * fix tests failures after main merge * fix test failures after main merge * Add Access Type and conditionally render WIF fields (#28149) * initial work. * remove access_type * better no model logic well kind of * rollback attrs * remove defaults * stopping point * wip changing back to sidebranch * hustling shuffling and serializing * some of the component test coverage * disable acces type if editing * test coverage * hide max retries that sneaky bugger * cleanup * cleanup * Update root-config.js * remove flash message check, locally passes great but on ci flaky * clean up * thank you chelsea * test clean up per enterprise vs community * address pr comments * welp a miss add * UI (sidebranch) WIF Issuer field (#28187) * Add type declaration files for aws config models * use updated task syntax for save method on configure-aws * fix types on edit route * fetch issuer on configure edit page if aws + enterprise * track issuer within configure-aws component * add placeholder support on form-field * Add warning if issuer changed from previous value or could not be read * cleanup * preliminary tests * dont use while loop so we can test the modal * tests * cleanup * fix tests * remove extra tracked value and duplicate changed attrs check * modal footer --------- Co-authored-by: Angel Garbarino <argarbarino@gmail.com> * Display issuer on Configuration details (#28209) * display issuer on configuration details * workflow complete, now on to testing * handle issuer things * fix all the broken tests things * add test coveragE: * cleanup * rename model/adapter * Update configure-aws.ts * Update aws-configuration-test.js * 90 percent there for pr comments * last one for tonight * a few more because why not * hasDirtyAttributes fixes * revert back to previous noRead->queryIssuerError --------- Co-authored-by: Chelsea Shaw <82459713+hashishaw@users.noreply.github.com>
168 lines
3.5 KiB
JavaScript
168 lines
3.5 KiB
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import { helper as buildHelper } from '@ember/component/helper';
|
|
|
|
const ENTERPRISE_SECRET_ENGINES = [
|
|
{
|
|
displayName: 'KMIP',
|
|
type: 'kmip',
|
|
glyph: 'lock',
|
|
engineRoute: 'kmip.scopes.index',
|
|
category: 'generic',
|
|
requiredFeature: 'KMIP',
|
|
},
|
|
{
|
|
displayName: 'Transform',
|
|
type: 'transform',
|
|
category: 'generic',
|
|
requiredFeature: 'Transform Secrets Engine',
|
|
glyph: 'transform-data',
|
|
},
|
|
{
|
|
displayName: 'Key Management',
|
|
type: 'keymgmt',
|
|
glyph: 'key',
|
|
category: 'cloud',
|
|
requiredFeature: 'Key Management Secrets Engine',
|
|
routeQueryParams: { tab: 'provider' },
|
|
},
|
|
];
|
|
|
|
const MOUNTABLE_SECRET_ENGINES = [
|
|
{
|
|
displayName: 'AliCloud',
|
|
type: 'alicloud',
|
|
glyph: 'alibaba-color',
|
|
category: 'cloud',
|
|
},
|
|
{
|
|
displayName: 'AWS',
|
|
type: 'aws',
|
|
category: 'cloud',
|
|
glyph: 'aws-color',
|
|
},
|
|
{
|
|
displayName: 'Azure',
|
|
type: 'azure',
|
|
category: 'cloud',
|
|
glyph: 'azure-color',
|
|
},
|
|
{
|
|
displayName: 'Consul',
|
|
type: 'consul',
|
|
glyph: 'consul-color',
|
|
category: 'infra',
|
|
},
|
|
{
|
|
displayName: 'Databases',
|
|
type: 'database',
|
|
category: 'infra',
|
|
glyph: 'database',
|
|
},
|
|
{
|
|
displayName: 'Google Cloud',
|
|
type: 'gcp',
|
|
category: 'cloud',
|
|
glyph: 'gcp-color',
|
|
},
|
|
{
|
|
displayName: 'Google Cloud KMS',
|
|
type: 'gcpkms',
|
|
category: 'cloud',
|
|
glyph: 'gcp-color',
|
|
},
|
|
{
|
|
displayName: 'KV',
|
|
type: 'kv',
|
|
glyph: 'key-values',
|
|
engineRoute: 'kv.list',
|
|
category: 'generic',
|
|
},
|
|
{
|
|
displayName: 'Nomad',
|
|
type: 'nomad',
|
|
glyph: 'nomad-color',
|
|
category: 'infra',
|
|
},
|
|
{
|
|
displayName: 'PKI Certificates',
|
|
type: 'pki',
|
|
glyph: 'certificate',
|
|
engineRoute: 'pki.overview',
|
|
category: 'generic',
|
|
},
|
|
{
|
|
displayName: 'RabbitMQ',
|
|
type: 'rabbitmq',
|
|
glyph: 'rabbitmq-color',
|
|
category: 'infra',
|
|
},
|
|
{
|
|
displayName: 'SSH',
|
|
type: 'ssh',
|
|
glyph: 'terminal-screen',
|
|
category: 'generic',
|
|
},
|
|
{
|
|
displayName: 'Transit',
|
|
type: 'transit',
|
|
glyph: 'swap-horizontal',
|
|
category: 'generic',
|
|
},
|
|
{
|
|
displayName: 'TOTP',
|
|
type: 'totp',
|
|
glyph: 'history',
|
|
category: 'generic',
|
|
},
|
|
{
|
|
displayName: 'LDAP',
|
|
type: 'ldap',
|
|
engineRoute: 'ldap.overview',
|
|
category: 'generic',
|
|
glyph: 'folder-users',
|
|
},
|
|
{
|
|
displayName: 'Kubernetes',
|
|
type: 'kubernetes',
|
|
engineRoute: 'kubernetes.overview',
|
|
category: 'generic',
|
|
glyph: 'kubernetes-color',
|
|
},
|
|
];
|
|
|
|
// A list of Workflow Identity Federation engines. Will eventually include Azure and GCP.
|
|
export const WIF_ENGINES = ['aws'];
|
|
|
|
export function wifEngines() {
|
|
return WIF_ENGINES.slice();
|
|
}
|
|
|
|
// Secret Engines that have their own configuration page and actions
|
|
// These engines do not exist in their own Ember engine.
|
|
// Ex: AWS vs. LDAP which is configurable but is handled inside the routing of its own Ember engine.
|
|
export const CONFIGURABLE_SECRET_ENGINES = ['aws', 'ssh'];
|
|
|
|
export function configurableSecretEngines() {
|
|
return MOUNTABLE_SECRET_ENGINES.slice();
|
|
}
|
|
|
|
export function mountableEngines() {
|
|
return MOUNTABLE_SECRET_ENGINES.slice();
|
|
}
|
|
|
|
export function allEngines() {
|
|
return [...MOUNTABLE_SECRET_ENGINES, ...ENTERPRISE_SECRET_ENGINES];
|
|
}
|
|
|
|
export function isAddonEngine(type, version) {
|
|
if (type === 'kv' && version === 1) return false;
|
|
const engineRoute = allEngines().find((engine) => engine.type === type)?.engineRoute;
|
|
return !!engineRoute;
|
|
}
|
|
|
|
export default buildHelper(mountableEngines);
|