Skip to content

Clean up on Azure configuration#29482

Merged
Monkeychip merged 2 commits intomainfrom
ui/VAULT-azure-fix-wif
Feb 4, 2025
Merged

Clean up on Azure configuration#29482
Monkeychip merged 2 commits intomainfrom
ui/VAULT-azure-fix-wif

Conversation

@Monkeychip
Copy link
Copy Markdown
Contributor

@Monkeychip Monkeychip commented Feb 3, 2025

  • ent tests pass

Description

TLDR: Root password TTL has to be moved from an Azure account access type to a generic one that can bet set be set alongside wif and non-wif attributes. See original PR #29047 description's, this change adds Root password TTL to both columns, like Environment.

Context: Root password TTL is only ever used when the user rotates their root credentials (not currently supported in this work), and is used to set an expiration date on the newly created credential. So a user could theoretically use WIF to set up Azure first (thereby using a zero-secret configuration for Vault), and then rotate root credentials to then start leveraging the Root password TTL to generate a new Client Secret value for future use.

Note: I updated the Azure Config form to match the newer designs proposed in the full Azure secret engine build out. Confirmed with Design this is this look is desired. This meant:

  1. Adding a "More options" toggle and moving Environment and Root password TTL under it.
  2. Updating Environment's helper text.

WITH UPDATES
image
(toggle to wif)
image

BEFORE
image
(toggle to wif)
image

@Monkeychip Monkeychip requested a review from a team as a code owner February 3, 2025 04:07
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Feb 3, 2025
@Monkeychip Monkeychip added this to the 1.19.0-rc milestone Feb 3, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 3, 2025

Build Results:
All builds succeeded! ✅

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 3, 2025

CI Results:
All Go tests succeeded! ✅

editType: 'ttl',
helperTextDisabled:
'Specifies how long the root password is valid for in Azure when rotate-root generates a new client secret. Defaults to 182 days or 6 months, 1 day and 13 hours.',
// default is 15768000 sec. The api docs say 182 days, but this should be updated to 182.5 days.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to ask the backend about this, but for now I wanted to leave the note in the code because it's confusing when we formate the returned default to 6 months 1 day 13 hours but if you pass in 182 days this is formatted to 6 months 1 day 1 hour.

client_id: 'client-id',
root_password_ttl: '20 days 20 hours',
environment: 'AZUREPUBLICCLOUD',
root_password_ttl: '1800000s',
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should have passed in seconds originally as that's what the api does.

module('create', function () {
test('it should save azure account accessType options', async function (assert) {
test('it should save azure account options', async function (assert) {
// there are no azure specific options that can be returned from the API so confirm the generic options are saved.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very similar acceptance tests that we do for GCP as it too cannot check if GCP specific options where set.


@attr('string', {
subText:
'This value can also be provided with the AZURE_ENVIRONMENT environment variable. If not specified, Vault will use Azure Public Cloud.',
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This text was in the full Azure build out designs, and it seemed helpful so I added.

assert
.dom(GENERAL.infoRowValue('Root password TTL'))
.hasText(
'1 hour 26 minutes 40 seconds',
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I messed around some with the secret-engine-helper.js method fillInAzureConfig so this value changed.

await click(SES.configTab);
await click(SES.configure);
await fillInAzureConfig('withWif');
await fillInAzureConfig(true);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed this method to match the feedback on similar method with fillInGcpConfig see here.

@Monkeychip Monkeychip merged commit c0ece88 into main Feb 4, 2025
30 of 31 checks passed
@Monkeychip Monkeychip deleted the ui/VAULT-azure-fix-wif branch February 4, 2025 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed pr/no-changelog ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants