-
Notifications
You must be signed in to change notification settings - Fork 199
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
Modify quick pulse code with authentication enabled #1678
Conversation
|
||
public static void init(AuthenticationType authenticationType, String clientId, String keePassDatabasePath, | ||
String tenantId, String clientSecret, String authorityHost) { | ||
AadAuthentication.instance = new AadAuthentication(authenticationType, clientId, keePassDatabasePath, tenantId, |
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.
synchronized block?
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 know this will get called only once.. do we still need to prevent user from creating a new instance of AadAuthentication each time when init is called?
...c/main/java/com/microsoft/applicationinsights/internal/authentication/AadAuthentication.java
Show resolved
Hide resolved
package com.microsoft.applicationinsights.internal.authentication; | ||
|
||
public enum AuthenticationType { | ||
UAMI, SAMI, INTELLIJ, VSCODE, CLIENTSECRET |
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.
Can we document what each type is?
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.
link to the azure doc will be helpful.
This pull request introduces 1 alert when merging 503582d into 83b96b6 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 9c17075 into 83b96b6 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging d123841 into 83b96b6 - view on LGTM.com new alerts:
|
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.
👍
...m/microsoft/applicationinsights/agent/internal/wasbootstrap/configuration/Configuration.java
Outdated
Show resolved
Hide resolved
...m/microsoft/applicationinsights/agent/internal/wasbootstrap/configuration/Configuration.java
Outdated
Show resolved
Hide resolved
...c/main/java/com/microsoft/applicationinsights/internal/authentication/AadAuthentication.java
Show resolved
Hide resolved
|
||
// handle AAD authentication | ||
// TODO handle authentication exceptions | ||
HttpPipelinePolicy authenticationPolicy = AadAuthentication.getInstance().getAuthenticationPolicy(); |
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.
won't this fail auth not configured? getInstance() throws exception?
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.
Yes if we call init() only when authentication is enabled. for now I removed the auth enabled check to create the authentication object. But we will end up with object with nullable variables.
...ing/src/main/java/com/microsoft/applicationinsights/agent/internal/AiComponentInstaller.java
Outdated
Show resolved
Hide resolved
...c/main/java/com/microsoft/applicationinsights/internal/authentication/AadAuthentication.java
Outdated
Show resolved
Hide resolved
...c/main/java/com/microsoft/applicationinsights/internal/authentication/AadAuthentication.java
Outdated
Show resolved
Hide resolved
...c/main/java/com/microsoft/applicationinsights/internal/authentication/AadAuthentication.java
Outdated
Show resolved
Hide resolved
...c/main/java/com/microsoft/applicationinsights/internal/authentication/AadAuthentication.java
Outdated
Show resolved
Hide resolved
This pull request introduces 1 alert when merging 8602098 into 1ffad2b - view on LGTM.com new alerts:
|
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.
did u mean to update the submodule in this PR?
...nt-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/AppIdSupplier.java
Outdated
Show resolved
Hide resolved
...nt-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/AppIdSupplier.java
Outdated
Show resolved
Hide resolved
...m/microsoft/applicationinsights/agent/internal/wasbootstrap/configuration/Configuration.java
Outdated
Show resolved
Hide resolved
...c/main/java/com/microsoft/applicationinsights/internal/authentication/AadAuthentication.java
Outdated
Show resolved
Hide resolved
...c/main/java/com/microsoft/applicationinsights/internal/authentication/AadAuthentication.java
Outdated
Show resolved
Hide resolved
...c/main/java/com/microsoft/applicationinsights/internal/authentication/AadAuthentication.java
Outdated
Show resolved
Hide resolved
This pull request introduces 1 alert when merging 857c29f into 1ffad2b - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 36d6e7b into 1ffad2b - view on LGTM.com new alerts:
|
@kryalama can you fix the lgtm bot alert above? |
Yes will do. Also looking at the failing smoke test. |
...mExit/src/smokeTest/java/com/microsoft/applicationinsights/smoketest/SpringBootAutoTest.java
Outdated
Show resolved
Hide resolved
…t/applicationinsights/smoketest/SpringBootAutoTest.java
try { | ||
delegate = init(); | ||
} catch (RuntimeException e) { | ||
initException = e; |
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 am curious to know why not throw here directly and wait for second called of this method then throw at line 42?
Modify quick pulse code to use azure core httppipeline and have aad authentication enabled