Skip to content

Commit 8fa5809

Browse files
author
Lei jin
committed
Address review comments
1 parent e67b2df commit 8fa5809

File tree

4 files changed

+57
-12
lines changed

4 files changed

+57
-12
lines changed

src/Accounts/Accounts/help/Clear-AzConfig.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ Clear-AzConfig [-Force] [-PassThru] [-AppliesTo <String>] [-Scope <ConfigScope>]
2121
### ClearByKey
2222
```
2323
Clear-AzConfig [-PassThru] [-AppliesTo <String>] [-Scope <ConfigScope>]
24-
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
25-
[-CheckForUpgrade] [-DefaultSubscriptionForLogin] [-DisableErrorRecordsPersistence]
26-
[-DisplayBreakingChangeWarning] [-DisplayRegionIdentified] [-DisplaySecretsWarning]
27-
[-DisplaySurveyMessage] [-EnableDataCollection] [-EnableLoginByWam] [<CommonParameters>]
24+
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [-CheckForUpgrade]
25+
[-DefaultSubscriptionForLogin] [-DisableErrorRecordsPersistence] [-DisableInstanceDiscovery]
26+
[-DisplayBreakingChangeWarning] [-DisplayRegionIdentified] [-DisplaySurveyMessage] [-EnableDataCollection]
27+
[-EnableLoginByWam] [<CommonParameters>]
2828
```
2929

3030
## DESCRIPTION
@@ -131,6 +131,21 @@ Accept pipeline input: False
131131
Accept wildcard characters: False
132132
```
133133
134+
### -DisableInstanceDiscovery
135+
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.
136+
137+
```yaml
138+
Type: System.Management.Automation.SwitchParameter
139+
Parameter Sets: ClearByKey
140+
Aliases:
141+
142+
Required: False
143+
Position: Named
144+
Default value: None
145+
Accept pipeline input: False
146+
Accept wildcard characters: False
147+
```
148+
134149
### -DisplayBreakingChangeWarning
135150
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.
136151

src/Accounts/Accounts/help/Get-AzConfig.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Gets the configs of Azure PowerShell.
1515
```
1616
Get-AzConfig [-AppliesTo <String>] [-Scope <ConfigScope>] [-DefaultProfile <IAzureContextContainer>]
1717
[-CheckForUpgrade] [-DefaultSubscriptionForLogin] [-DisableErrorRecordsPersistence]
18-
[-DisplayBreakingChangeWarning] [-DisplayRegionIdentified] [-DisplaySecretsWarning]
19-
[-DisplaySurveyMessage] [-EnableDataCollection] [-EnableLoginByWam] [<CommonParameters>]
18+
[-DisableInstanceDiscovery] [-DisplayBreakingChangeWarning] [-DisplayRegionIdentified] [-DisplaySurveyMessage]
19+
[-EnableDataCollection] [-EnableLoginByWam] [<CommonParameters>]
2020
```
2121

2222
## DESCRIPTION
@@ -142,6 +142,21 @@ Accept pipeline input: False
142142
Accept wildcard characters: False
143143
```
144144
145+
### -DisableInstanceDiscovery
146+
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.
147+
148+
```yaml
149+
Type: System.Management.Automation.SwitchParameter
150+
Parameter Sets: (All)
151+
Aliases:
152+
153+
Required: False
154+
Position: Named
155+
Default value: None
156+
Accept pipeline input: False
157+
Accept wildcard characters: False
158+
```
159+
145160
### -DisplayBreakingChangeWarning
146161
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.
147162

src/Accounts/Accounts/help/Update-AzConfig.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ Updates the configs of Azure PowerShell.
1515
```
1616
Update-AzConfig [-AppliesTo <String>] [-Scope <ConfigScope>] [-DefaultProfile <IAzureContextContainer>]
1717
[-WhatIf] [-Confirm] [-CheckForUpgrade <Boolean>] [-DefaultSubscriptionForLogin <String>]
18-
[-DisableErrorRecordsPersistence <Boolean>] [-DisplayBreakingChangeWarning <Boolean>]
19-
[-DisplayRegionIdentified <Boolean>] [-DisplaySecretsWarning <Boolean>]
20-
[-DisplaySurveyMessage <Boolean>] [-EnableDataCollection <Boolean>]
21-
[-EnableLoginByWam <Boolean>] [<CommonParameters>]
18+
[-DisableErrorRecordsPersistence <Boolean>] [-DisableInstanceDiscovery <Boolean>]
19+
[-DisplayBreakingChangeWarning <Boolean>] [-DisplayRegionIdentified <Boolean>]
20+
[-DisplaySurveyMessage <Boolean>] [-EnableDataCollection <Boolean>] [-EnableLoginByWam <Boolean>]
21+
[<CommonParameters>]
2222
```
2323

2424
## DESCRIPTION
@@ -168,6 +168,21 @@ Accept pipeline input: True (ByPropertyName)
168168
Accept wildcard characters: False
169169
```
170170
171+
### -DisableInstanceDiscovery
172+
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.
173+
174+
```yaml
175+
Type: System.Boolean
176+
Parameter Sets: (All)
177+
Aliases:
178+
179+
Required: False
180+
Position: Named
181+
Default value: None
182+
Accept pipeline input: True (ByPropertyName)
183+
Accept wildcard characters: False
184+
```
185+
171186
### -DisplayBreakingChangeWarning
172187
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.
173188

src/Accounts/Authentication/Config/Definitions/DisableInstanceDiscoveryConfig.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
namespace Microsoft.Azure.Commands.Common.Authentication.Config.Definitions
2424
{
2525
/// <summary>
26-
/// Definition of the config to control whether login by WAM (web account manager) or not.
26+
/// Definition of the config to control whether to disable both instance discovery and authority validation.
2727
/// </summary>
2828
internal class DisableInstanceDiscoveryConfig : TypedConfig<bool>
2929
{
30-
public override object DefaultValue => false; // Opt-in. Will change to opt-out.
30+
public override object DefaultValue => false;
3131

3232
public override string Key => ConfigKeys.DisableInstanceDiscovery;
3333

0 commit comments

Comments
 (0)