Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
msJinLei committed Mar 18, 2024
1 parent e67b2df commit 8fa5809
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 12 deletions.
23 changes: 19 additions & 4 deletions src/Accounts/Accounts/help/Clear-AzConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ Clear-AzConfig [-Force] [-PassThru] [-AppliesTo <String>] [-Scope <ConfigScope>]
### ClearByKey
```
Clear-AzConfig [-PassThru] [-AppliesTo <String>] [-Scope <ConfigScope>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[-CheckForUpgrade] [-DefaultSubscriptionForLogin] [-DisableErrorRecordsPersistence]
[-DisplayBreakingChangeWarning] [-DisplayRegionIdentified] [-DisplaySecretsWarning]
[-DisplaySurveyMessage] [-EnableDataCollection] [-EnableLoginByWam] [<CommonParameters>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [-CheckForUpgrade]
[-DefaultSubscriptionForLogin] [-DisableErrorRecordsPersistence] [-DisableInstanceDiscovery]
[-DisplayBreakingChangeWarning] [-DisplayRegionIdentified] [-DisplaySurveyMessage] [-EnableDataCollection]
[-EnableLoginByWam] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -131,6 +131,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -DisableInstanceDiscovery
Set it to true to disable both instance discovery and authority validation. This functionality is intended for use in scenarios where the metadata endpoint cannot be reached, such as in private clouds or Azure Stack. The process of instance discovery entails retrieving authority metadata from https://login.microsoft.com/ to validate the authority. By setting this to true, the validation of the authority is disabled. As a result, it is crucial to ensure that the configured authority host is valid and trustworthy.
```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: ClearByKey
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DisplayBreakingChangeWarning
Controls if warning messages for breaking changes are displayed or suppressed. When enabled, a breaking change warning is displayed when executing cmdlets with breaking changes in a future release.
Expand Down
19 changes: 17 additions & 2 deletions src/Accounts/Accounts/help/Get-AzConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Gets the configs of Azure PowerShell.
```
Get-AzConfig [-AppliesTo <String>] [-Scope <ConfigScope>] [-DefaultProfile <IAzureContextContainer>]
[-CheckForUpgrade] [-DefaultSubscriptionForLogin] [-DisableErrorRecordsPersistence]
[-DisplayBreakingChangeWarning] [-DisplayRegionIdentified] [-DisplaySecretsWarning]
[-DisplaySurveyMessage] [-EnableDataCollection] [-EnableLoginByWam] [<CommonParameters>]
[-DisableInstanceDiscovery] [-DisplayBreakingChangeWarning] [-DisplayRegionIdentified] [-DisplaySurveyMessage]
[-EnableDataCollection] [-EnableLoginByWam] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -142,6 +142,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -DisableInstanceDiscovery
Set it to true to disable both instance discovery and authority validation. This functionality is intended for use in scenarios where the metadata endpoint cannot be reached, such as in private clouds or Azure Stack. The process of instance discovery entails retrieving authority metadata from https://login.microsoft.com/ to validate the authority. By setting this to true, the validation of the authority is disabled. As a result, it is crucial to ensure that the configured authority host is valid and trustworthy.
```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DisplayBreakingChangeWarning
Controls if warning messages for breaking changes are displayed or suppressed. When enabled, a breaking change warning is displayed when executing cmdlets with breaking changes in a future release.
Expand Down
23 changes: 19 additions & 4 deletions src/Accounts/Accounts/help/Update-AzConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ Updates the configs of Azure PowerShell.
```
Update-AzConfig [-AppliesTo <String>] [-Scope <ConfigScope>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [-CheckForUpgrade <Boolean>] [-DefaultSubscriptionForLogin <String>]
[-DisableErrorRecordsPersistence <Boolean>] [-DisplayBreakingChangeWarning <Boolean>]
[-DisplayRegionIdentified <Boolean>] [-DisplaySecretsWarning <Boolean>]
[-DisplaySurveyMessage <Boolean>] [-EnableDataCollection <Boolean>]
[-EnableLoginByWam <Boolean>] [<CommonParameters>]
[-DisableErrorRecordsPersistence <Boolean>] [-DisableInstanceDiscovery <Boolean>]
[-DisplayBreakingChangeWarning <Boolean>] [-DisplayRegionIdentified <Boolean>]
[-DisplaySurveyMessage <Boolean>] [-EnableDataCollection <Boolean>] [-EnableLoginByWam <Boolean>]
[<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -168,6 +168,21 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -DisableInstanceDiscovery
Set it to true to disable both instance discovery and authority validation. This functionality is intended for use in scenarios where the metadata endpoint cannot be reached, such as in private clouds or Azure Stack. The process of instance discovery entails retrieving authority metadata from https://login.microsoft.com/ to validate the authority. By setting this to true, the validation of the authority is disabled. As a result, it is crucial to ensure that the configured authority host is valid and trustworthy.
```yaml
Type: System.Boolean
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -DisplayBreakingChangeWarning
Controls if warning messages for breaking changes are displayed or suppressed. When enabled, a breaking change warning is displayed when executing cmdlets with breaking changes in a future release.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
namespace Microsoft.Azure.Commands.Common.Authentication.Config.Definitions
{
/// <summary>
/// Definition of the config to control whether login by WAM (web account manager) or not.
/// Definition of the config to control whether to disable both instance discovery and authority validation.
/// </summary>
internal class DisableInstanceDiscoveryConfig : TypedConfig<bool>
{
public override object DefaultValue => false; // Opt-in. Will change to opt-out.
public override object DefaultValue => false;

public override string Key => ConfigKeys.DisableInstanceDiscovery;

Expand Down

0 comments on commit 8fa5809

Please sign in to comment.