Skip to content

Commit 1f03405

Browse files
g2vinayVinay Gera
andauthored
Update Account Identifier Logging API Identity (Azure#28046)
* update * update * update * update * fix link * update * update * update * update * update * update Co-authored-by: Vinay Gera <[email protected]>
1 parent 81d1154 commit 1f03405

File tree

3 files changed

+13
-52
lines changed

3 files changed

+13
-52
lines changed

sdk/identity/azure-identity/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
## 1.5.0 (2022-04-05)
44

55
### Breaking Changes
6-
Removed `disableAuthorityValidationSafetyCheck` for GA, will reintroduce in next beta. This is not a breaking change from last GA.
6+
- Removed `disableAuthorityValidationSafetyCheck` for GA, will reintroduce in next beta. This is not a breaking change from last GA.
7+
- Replaced `identityLogOptions` setter with the `enableAccountIdentifierLogging` setter on the credential builders. This is not a breaking change from last GA.
78

89
### Other Changes
910
#### Dependency Updates

sdk/identity/azure-identity/src/main/java/com/azure/identity/CredentialBuilderBase.java

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import com.azure.core.http.HttpClient;
77
import com.azure.core.http.HttpPipeline;
88
import com.azure.core.http.ProxyOptions;
9-
import com.azure.core.util.ClientOptions;
109
import com.azure.core.util.Configuration;
1110
import com.azure.identity.implementation.IdentityClientOptions;
1211

@@ -109,20 +108,22 @@ public T configuration(Configuration configuration) {
109108
}
110109

111110
/**
112-
* Sets the {@link IdentityLogOptions} which enables identity logging options to be set on the client. For example
113-
* configuring {@code accountIdentifierLogging} using
114-
* {@link com.azure.identity.IdentityLogOptions#setLoggingAccountIdentifiersAllowed(boolean)} to allow account
115-
* identifier logs to be enabled on client side debugging/monitoring purposes.
111+
* Enables account identifiers to be logged on client side for debugging/monitoring purposes.
112+
* By default, it is disabled.
113+
* <p>
114+
* The Account Identifier logs can contain sensitive information and should be enabled on protected machines only.
115+
* Enabling this logs Application ID, Object ID, Tenant ID and User Principal Name at INFO level when an
116+
* access token is successfully retrieved. Ensure that INFO level logs are enabled to
117+
* see the account identifier logs.
118+
* </p>
116119
*
117-
* @param identityLogOptions the {@link IdentityLogOptions} to be set on the credential client.
118-
*
119-
* @return An updated instance of this builder with the {@link ClientOptions} set as specified.
120+
* @return An updated instance of this builder.
120121
*/
121122
@SuppressWarnings("unchecked")
122-
public T identityLogOptions(IdentityLogOptions identityLogOptions) {
123+
public T enableAccountIdentifierLogging() {
123124
identityClientOptions
124125
.getIdentityLogOptionsImpl()
125-
.setLoggingAccountIdentifiersAllowed(identityLogOptions.isLoggingAccountIdentifiersAllowed());
126+
.setLoggingAccountIdentifiersAllowed(true);
126127
return (T) this;
127128
}
128129
}

sdk/identity/azure-identity/src/main/java/com/azure/identity/IdentityLogOptions.java

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)