Skip to content

Commit 9c9f6df

Browse files
Copilotrpdome
andauthored
Move debugIntuneCE and prodIntuneCE from BrokerData to AppRegistry as App instances, Fixes AB#3539245 (#3012)
[AB#3539245](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3539245) `debugIntuneCE` and `prodIntuneCE` were defined in `BrokerData` despite Intune CE (`com.microsoft.intune`) not being a broker app. These belong in `AppRegistry` alongside other non-broker app identities. ## Changes - **`BrokerData.kt`**: Removed `debugIntuneCE` and `prodIntuneCE` companion object entries - **`AppRegistry.kt`**: - Added `INTUNE_CE_PROD` and `INTUNE_CE_DEBUG` as `App` instances - Updated `DEVICE_REGISTRATION_AUTHORIZED_APPS` to reference the new entries - Added `FORCE_BROKER_DISCOVERY_ALLOW_LIST` — a new allow-list set for force broker discovery: - Prod-only path: `setOf(INTUNE_CE_PROD)` - Debug path (when `getShouldTrustDebugBrokers()` is true): includes `INTUNE_CE_PROD`, `INTUNE_CE_DEBUG`, `debugMockLtw`, `debugMockCp`, `debugMockAuthApp`, and `debugBrokerHost` - Added imports for `INTUNE_APP_PACKAGE_NAME`, `INTUNE_APP_SHA512_DEBUG_SIGNATURE`, `INTUNE_APP_SHA512_RELEASE_SIGNATURE` - **`changelog.txt`**: Added vNext entry for this change ```kotlin // Before — in BrokerData companion object val debugIntuneCE = BrokerData(INTUNE_APP_PACKAGE_NAME, INTUNE_APP_SHA512_DEBUG_SIGNATURE, "debugIntuneCE") val prodIntuneCE = BrokerData(INTUNE_APP_PACKAGE_NAME, INTUNE_APP_SHA512_RELEASE_SIGNATURE, "prodIntuneCE") // After — in AppRegistry val INTUNE_CE_DEBUG = App(nickName = "Intune Company Portal (debug)", packageName = INTUNE_APP_PACKAGE_NAME, signingCertificateThumbprint = INTUNE_APP_SHA512_DEBUG_SIGNATURE) val INTUNE_CE_PROD = App(nickName = "Intune Company Portal (prod)", packageName = INTUNE_APP_PACKAGE_NAME, signingCertificateThumbprint = INTUNE_APP_SHA512_RELEASE_SIGNATURE) // New — Force Broker discovery allow list val FORCE_BROKER_DISCOVERY_ALLOW_LIST = if (BrokerData.getShouldTrustDebugBrokers()) { buildSet { add(INTUNE_CE_PROD); add(INTUNE_CE_DEBUG) add(BrokerData.debugMockLtw); add(BrokerData.debugMockCp) add(BrokerData.debugMockAuthApp); add(BrokerData.debugBrokerHost) } } else { setOf(INTUNE_CE_PROD) } ``` <!-- START COPILOT CODING AGENT TIPS --> --- 🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. [Learn more about Advanced Security.](https://gh.io/cca-advanced-security) --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rpdome <19558668+rpdome@users.noreply.github.com>
1 parent 8df4e3e commit 9c9f6df

3 files changed

Lines changed: 34 additions & 16 deletions

File tree

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
vNext
22
----------
3+
- [MINOR] Move debugIntuneCE and prodIntuneCE from BrokerData to AppRegistry as App instances (#3012)
34
- [MINOR] Remove LruCache from SharedPreferencesFileManager (#2910)
45
- [MINOR] Edge TB: Claims (#2925)
56
- [PATCH] Update Moshi to 1.15.2 to resolve okio CVE-2023-3635 vulnerability (#3005)

common/src/main/java/com/microsoft/identity/common/internal/apps/AppRegistry.kt

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ package com.microsoft.identity.common.internal.apps
2626
import com.microsoft.identity.common.adal.internal.AuthenticationConstants
2727
import com.microsoft.identity.common.adal.internal.AuthenticationConstants.Broker.INTUNE_AOSP_AGENT_DEBUG_SIGNATURE
2828
import com.microsoft.identity.common.adal.internal.AuthenticationConstants.Broker.INTUNE_AOSP_AGENT_RELEASE_SIGNATURE
29+
import com.microsoft.identity.common.adal.internal.AuthenticationConstants.Broker.INTUNE_APP_PACKAGE_NAME
30+
import com.microsoft.identity.common.adal.internal.AuthenticationConstants.Broker.INTUNE_APP_SHA512_DEBUG_SIGNATURE
31+
import com.microsoft.identity.common.adal.internal.AuthenticationConstants.Broker.INTUNE_APP_SHA512_RELEASE_SIGNATURE
2932
import com.microsoft.identity.common.adal.internal.AuthenticationConstants.Broker.ONE_AUTH_TEST_APP_SIGNATURE
3033
import com.microsoft.identity.common.adal.internal.AuthenticationConstants.Broker.SHARED_EDGE_SIGNATURE
3134
import com.microsoft.identity.common.internal.broker.BrokerData
@@ -97,6 +100,18 @@ object AppRegistry {
97100
signingCertificateThumbprint = "QfTWFoLyXuOCZ7bMYlMN+la3J3rau5x8p+w2v7vf1gOPiTyIMgdbNDzLaLWhgiC2ioj/hFqk8oZyqdJbFG6G4g=="
98101
)
99102

103+
val INTUNE_CE_PROD = App(
104+
nickName = "Intune Company Portal (prod)",
105+
packageName = INTUNE_APP_PACKAGE_NAME,
106+
signingCertificateThumbprint = INTUNE_APP_SHA512_RELEASE_SIGNATURE
107+
)
108+
109+
val INTUNE_CE_DEBUG = App(
110+
nickName = "Intune Company Portal (debug)",
111+
packageName = INTUNE_APP_PACKAGE_NAME,
112+
signingCertificateThumbprint = INTUNE_APP_SHA512_DEBUG_SIGNATURE
113+
)
114+
100115
val MSAL_TEST_APP = App(
101116
nickName = "MSAL Test App",
102117
packageName = "com.msft.identity.client.sample.local",
@@ -128,14 +143,14 @@ object AppRegistry {
128143
val DEVICE_REGISTRATION_AUTHORIZED_APPS = buildSet {
129144
add(BrokerData.prodMicrosoftAuthenticator)
130145
add(BrokerData.prodCompanyPortal)
131-
add(BrokerData.prodIntuneCE)
146+
add(INTUNE_CE_PROD)
132147
add(INTUNE_AOSP_AGENT_PROD)
133148
if (BrokerData.getShouldTrustDebugBrokers()) {
134149
add(INTUNE_AOSP_AGENT_DEBUG)
135150
add(BrokerData.debugBrokerHost)
136151
add(BrokerData.debugMicrosoftAuthenticator)
137152
add(BrokerData.debugCompanyPortal)
138-
add(BrokerData.debugIntuneCE)
153+
add(INTUNE_CE_DEBUG)
139154
}
140155
}
141156

@@ -153,4 +168,20 @@ object AppRegistry {
153168
add(MSAL_TEST_APP)
154169
}
155170
}
171+
172+
/**
173+
* Apps authorized to trigger force broker discovery.
174+
* Debug apps (mock brokers, broker host) are included when debug broker trust is enabled.
175+
*/
176+
@JvmField
177+
val FORCE_BROKER_DISCOVERY_ALLOW_LIST = buildSet {
178+
add(INTUNE_CE_PROD)
179+
if (BrokerData.getShouldTrustDebugBrokers()) {
180+
add(INTUNE_CE_DEBUG)
181+
add(BrokerData.debugMockLtw)
182+
add(BrokerData.debugMockCp)
183+
add(BrokerData.debugMockAuthApp)
184+
add(BrokerData.debugBrokerHost)
185+
}
186+
}
156187
}

common/src/main/java/com/microsoft/identity/common/internal/broker/BrokerData.kt

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -171,20 +171,6 @@ data class BrokerData(
171171

172172
)
173173

174-
@JvmStatic
175-
val debugIntuneCE = BrokerData(
176-
AuthenticationConstants.Broker.INTUNE_APP_PACKAGE_NAME,
177-
AuthenticationConstants.Broker.INTUNE_APP_SHA512_DEBUG_SIGNATURE,
178-
"debugIntuneCE"
179-
)
180-
181-
@JvmStatic
182-
val prodIntuneCE = BrokerData(
183-
AuthenticationConstants.Broker.INTUNE_APP_PACKAGE_NAME,
184-
AuthenticationConstants.Broker.INTUNE_APP_SHA512_RELEASE_SIGNATURE,
185-
"prodIntuneCE"
186-
)
187-
188174
@JvmStatic
189175
val accountManagerBrokers: Set<String> =
190176
Collections.unmodifiableSet(object : HashSet<String>() {

0 commit comments

Comments
 (0)