Skip to content

Commit 5f6b9d1

Browse files
faustbrianclaude
andauthored
feat: add Azure Trusted Signing support (#658)
* feat: add Azure Trusted Signing support Add configuration for Azure Trusted Signing service for Windows code signing. This includes credential settings and environment variable cleanup for Azure-related keys. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * style: reorganize imports in DebugCommand 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
1 parent 26d8402 commit 5f6b9d1

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

config/nativephp-internal.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,19 @@
4848
'apple_team_id' => env('NATIVEPHP_APPLE_TEAM_ID'),
4949
],
5050

51+
/**
52+
* The credentials to use Azure Trusted Signing service.
53+
*/
54+
'azure_trusted_signing' => [
55+
'tenant_id' => env('AZURE_TENANT_ID'),
56+
'client_id' => env('AZURE_CLIENT_ID'),
57+
'client_secret' => env('AZURE_CLIENT_SECRET'),
58+
'publisher_name' => env('NATIVEPHP_AZURE_PUBLISHER_NAME'),
59+
'endpoint' => env('NATIVEPHP_AZURE_ENDPOINT'),
60+
'certificate_profile_name' => env('NATIVEPHP_AZURE_CERTIFICATE_PROFILE_NAME'),
61+
'code_signing_account_name' => env('NATIVEPHP_AZURE_CODE_SIGNING_ACCOUNT_NAME'),
62+
],
63+
5164
/**
5265
* The binary path of PHP for NativePHP to use at build.
5366
*/

config/nativephp.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
*/
6161
'cleanup_env_keys' => [
6262
'AWS_*',
63+
'AZURE_*',
6364
'GITHUB_*',
6465
'DO_SPACES_*',
6566
'*_SECRET',
@@ -68,6 +69,10 @@
6869
'NATIVEPHP_APPLE_ID',
6970
'NATIVEPHP_APPLE_ID_PASS',
7071
'NATIVEPHP_APPLE_TEAM_ID',
72+
'NATIVEPHP_AZURE_PUBLISHER_NAME',
73+
'NATIVEPHP_AZURE_ENDPOINT',
74+
'NATIVEPHP_AZURE_CERTIFICATE_PROFILE_NAME',
75+
'NATIVEPHP_AZURE_CODE_SIGNING_ACCOUNT_NAME',
7176
],
7277

7378
/**

src/Commands/DebugCommand.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,14 @@ private function processNativePHP(): static
111111
&& config('nativephp-internal.notarization.apple_id_pass')
112112
&& config('nativephp-internal.notarization.apple_team_id');
113113

114+
$isAzureTrustedSigningConfigured = config('nativephp-internal.azure_trusted_signing.tenant_id')
115+
&& config('nativephp-internal.azure_trusted_signing.client_id')
116+
&& config('nativephp-internal.azure_trusted_signing.client_secret')
117+
&& config('nativephp-internal.azure_trusted_signing.publisher_name')
118+
&& config('nativephp-internal.azure_trusted_signing.endpoint')
119+
&& config('nativephp-internal.azure_trusted_signing.certificate_profile_name')
120+
&& config('nativephp-internal.azure_trusted_signing.code_signing_account_name');
121+
114122
$this->debugInfo->put(
115123
'NativePHP',
116124
[
@@ -122,6 +130,7 @@ private function processNativePHP(): static
122130
'Post' => config('nativephp.postbuild'),
123131
],
124132
'NotarizationEnabled' => $isNotarizationConfigured,
133+
'AzureTrustedSigningEnabled' => $isAzureTrustedSigningConfigured,
125134
'CustomPHPBinary' => config('nativephp-internal.php_binary_path') ?? false,
126135
],
127136
]

0 commit comments

Comments
 (0)