-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up on Azure configuration #29482
Conversation
Build Results: |
CI Results: |
@@ -34,8 +40,10 @@ export default class AzureConfig extends Model { | |||
@attr({ | |||
label: 'Root password TTL', | |||
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. |
There was a problem hiding this comment.
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
.
environment: 'AZUREPUBLICCLOUD', | ||
root_password_ttl: '1800000s', |
There was a problem hiding this comment.
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.
@@ -112,7 +112,8 @@ module('Acceptance | Azure | configuration', function (hooks) { | |||
}); | |||
|
|||
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. |
There was a problem hiding this comment.
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.', |
There was a problem hiding this comment.
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.
await click(GENERAL.saveButton); | ||
assert.true( | ||
this.flashSuccessSpy.calledWith(`Successfully saved ${path}'s configuration.`), | ||
'Success flash message is rendered showing the azure model configuration was saved.' | ||
); | ||
assert | ||
.dom(GENERAL.infoRowValue('Root password TTL')) | ||
.hasText( | ||
'1 hour 26 minutes 40 seconds', |
There was a problem hiding this comment.
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.
@@ -362,7 +363,7 @@ module('Acceptance | Azure | configuration', function (hooks) { | |||
|
|||
await click(SES.configTab); | |||
await click(SES.configure); | |||
await fillInAzureConfig('withWif'); | |||
await fillInAzureConfig(true); |
There was a problem hiding this comment.
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.
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 addsRoot password TTL
to both columns, likeEnvironment
.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 theRoot 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:
Environment
andRoot password TTL
under it.Environment
's helper text.WITH UPDATES
![image](https://private-user-images.githubusercontent.com/6618863/408955177-b16935d9-67b4-483a-8982-25ddf5a1b15f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxODI1ODEsIm5iZiI6MTczOTE4MjI4MSwicGF0aCI6Ii82NjE4ODYzLzQwODk1NTE3Ny1iMTY5MzVkOS02N2I0LTQ4M2EtODk4Mi0yNWRkZjVhMWIxNWYucG5nP1gtQW16L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1TaWduZWRIZWFkZXJzPWhvc3QifQ.d97IesgfY-Hrg_f1qcBBxzqzrVGeutcD3zsygI4Fazs)
(toggle to wif)
BEFORE
![image](https://private-user-images.githubusercontent.com/6618863/408955149-37d42b46-e66f-4ecc-8141-6219dd8f2d5f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxODI1ODEsIm5iZiI6MTczOTE4MjI4MSwicGF0aCI6Ii82NjE4ODYzLzQwODk1NTE0OS0zN2Q0MmI0Ni1lNjZmLTRlY2MtODE0MS02MjE5ZGQ4ZjJkNWYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMTAxMTIxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NTc2OTZiOWM0NWZjNDE1ODEzOTQ4ODFmYTI5ZjgyNTcxNjhhODJjMDE4NGY2Mzg4YmY2ZThhMDcwYmViNDEwZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.h3G2TLCNg_3gguHNDjDTqidaj_Rl1lYiFFM3uFmq_e0)
![image](https://private-user-images.githubusercontent.com/6618863/408957563-97fa8522-15d1-4166-b0a8-be807259316f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxODI1ODEsIm5iZiI6MTczOTE4MjI4MSwicGF0aCI6Ii82NjE4ODYzLzQwODk1NzU2My05N2ZhODUyMi0xNWQxLTQxNjYtYjBhOC1iZTgwNzI1OTMxNmYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMTAxMTIxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NGE1MDNkYzMwN2M4ODg0ZjJlYWZjMDAwMjRlYTQxYzY1ZTMwMDJiMmVkMjAyZWQyN2ZkZmM1NjU3MmY5MjQyYyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.JVTy0sokN8mTxhuhszkmbOYLd-iTur4_MPne6KU3JRg)
(toggle to wif)