-
Notifications
You must be signed in to change notification settings - Fork 36
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
Configure debug broker support in release mode #1651
base: dev
Are you sure you want to change the base?
Conversation
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.
Looks like this PR effectively reverts the work we had done to enable debug broker support in release mode to allow automation to be run with prod MSAL and BrokerHost. With this PR we can no longer to do that. I would still like to have support for that. I think RuntimeException
is not the right thing to do here. I suggest you schedule a meeting to discuss this work.
734a563
to
06ebe3a
Compare
common/src/main/java/com/microsoft/identity/common/internal/broker/BrokerValidator.java
Outdated
Show resolved
Hide resolved
800f1b1
to
0e7188f
Compare
Codecov Report
@@ Coverage Diff @@
## dev #1651 +/- ##
============================================
+ Coverage 15.62% 15.88% +0.26%
- Complexity 321 334 +13
============================================
Files 164 165 +1
Lines 7097 7118 +21
Branches 712 716 +4
============================================
+ Hits 1109 1131 +22
+ Misses 5815 5814 -1
Partials 173 173
Continue to review full report at Codecov.
|
So what is the plan here? It seems like the only way this is now actually configurable is to first declare trust via BuildConfig, right? So that means the builds that are in Maven central are not actually ever going to be able to trust debug brokers because they are not in debug mode and also don't have trust declared in Build Config. I think that is fine... My question is how is this debug broker support useful now? I suspect that the plan would be to publish two versions of common going forward to at least the internal maven? One that has debug support declared via BuildConfig and one that doesn't. Is that the correct understanding? If that's the case, I'm not sure if we even need the |
021d704
to
7267c0a
Compare
@shahzaibj as discussed, we are now checking the application's package name and signature hash before allowing it to trust debug brokers. |
We currently support MSAL trusting debug brokers; however, we need to be sure that people don't set this in error for release builds that we'll be shipped to production.
Implementation
We need to check that the application trusting debug brokers is allowed to do so, hence the
BrokerValidator
hosts a variable that keeps a record of applications with the ability to trust debug brokers.