From 17c971719e9b7b21fddd6585a6f6c03534fcd4d9 Mon Sep 17 00:00:00 2001 From: Brian Faust Date: Mon, 21 Jul 2025 11:01:01 +0300 Subject: [PATCH 1/2] feat: add Azure Trusted Signing support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- config/nativephp-internal.php | 13 +++++++++++++ config/nativephp.php | 5 +++++ src/Commands/DebugCommand.php | 25 +++++++++++++++++-------- 3 files changed, 35 insertions(+), 8 deletions(-) diff --git a/config/nativephp-internal.php b/config/nativephp-internal.php index bb7dbf23..186fbcfc 100644 --- a/config/nativephp-internal.php +++ b/config/nativephp-internal.php @@ -48,6 +48,19 @@ 'apple_team_id' => env('NATIVEPHP_APPLE_TEAM_ID'), ], + /** + * The credentials to use Azure Trusted Signing service. + */ + 'azure_trusted_signing' => [ + 'tenant_id' => env('AZURE_TENANT_ID'), + 'client_id' => env('AZURE_CLIENT_ID'), + 'client_secret' => env('AZURE_CLIENT_SECRET'), + 'publisher_name' => env('NATIVEPHP_AZURE_PUBLISHER_NAME'), + 'endpoint' => env('NATIVEPHP_AZURE_ENDPOINT'), + 'certificate_profile_name' => env('NATIVEPHP_AZURE_CERTIFICATE_PROFILE_NAME'), + 'code_signing_account_name' => env('NATIVEPHP_AZURE_CODE_SIGNING_ACCOUNT_NAME'), + ], + /** * The binary path of PHP for NativePHP to use at build. */ diff --git a/config/nativephp.php b/config/nativephp.php index d68245fc..91938bd9 100644 --- a/config/nativephp.php +++ b/config/nativephp.php @@ -60,6 +60,7 @@ */ 'cleanup_env_keys' => [ 'AWS_*', + 'AZURE_*', 'GITHUB_*', 'DO_SPACES_*', '*_SECRET', @@ -68,6 +69,10 @@ 'NATIVEPHP_APPLE_ID', 'NATIVEPHP_APPLE_ID_PASS', 'NATIVEPHP_APPLE_TEAM_ID', + 'NATIVEPHP_AZURE_PUBLISHER_NAME', + 'NATIVEPHP_AZURE_ENDPOINT', + 'NATIVEPHP_AZURE_CERTIFICATE_PROFILE_NAME', + 'NATIVEPHP_AZURE_CODE_SIGNING_ACCOUNT_NAME', ], /** diff --git a/src/Commands/DebugCommand.php b/src/Commands/DebugCommand.php index 504ef7ba..96c1f813 100644 --- a/src/Commands/DebugCommand.php +++ b/src/Commands/DebugCommand.php @@ -4,19 +4,19 @@ use Composer\InstalledVersions; use Illuminate\Console\Command; -use Illuminate\Contracts\Console\PromptsForMissingInput; +use function Laravel\Prompts\info; +use function Laravel\Prompts\note; use Illuminate\Support\Collection; -use Illuminate\Support\Facades\File; -use Illuminate\Support\Facades\Process; -use Native\Laravel\Support\Environment; -use Symfony\Component\Console\Attribute\AsCommand; - use function Laravel\Prompts\error; -use function Laravel\Prompts\info; use function Laravel\Prompts\intro; -use function Laravel\Prompts\note; use function Laravel\Prompts\outro; + use function Laravel\Prompts\select; +use Illuminate\Support\Facades\File; +use Illuminate\Support\Facades\Process; +use Native\Laravel\Support\Environment; +use Symfony\Component\Console\Attribute\AsCommand; +use Illuminate\Contracts\Console\PromptsForMissingInput; #[AsCommand( name: 'native:debug', @@ -111,6 +111,14 @@ private function processNativePHP(): static && config('nativephp-internal.notarization.apple_id_pass') && config('nativephp-internal.notarization.apple_team_id'); + $isAzureTrustedSigningConfigured = config('nativephp-internal.azure_trusted_signing.tenant_id') + && config('nativephp-internal.azure_trusted_signing.client_id') + && config('nativephp-internal.azure_trusted_signing.client_secret') + && config('nativephp-internal.azure_trusted_signing.publisher_name') + && config('nativephp-internal.azure_trusted_signing.endpoint') + && config('nativephp-internal.azure_trusted_signing.certificate_profile_name') + && config('nativephp-internal.azure_trusted_signing.code_signing_account_name'); + $this->debugInfo->put( 'NativePHP', [ @@ -122,6 +130,7 @@ private function processNativePHP(): static 'Post' => config('nativephp.postbuild'), ], 'NotarizationEnabled' => $isNotarizationConfigured, + 'AzureTrustedSigningEnabled' => $isAzureTrustedSigningConfigured, 'CustomPHPBinary' => config('nativephp-internal.php_binary_path') ?? false, ], ] From 49a72b450b497c9e4541225b05525f9b7ca72642 Mon Sep 17 00:00:00 2001 From: Brian Faust Date: Mon, 21 Jul 2025 11:04:52 +0300 Subject: [PATCH 2/2] style: reorganize imports in DebugCommand MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/Commands/DebugCommand.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Commands/DebugCommand.php b/src/Commands/DebugCommand.php index 96c1f813..4b8e2464 100644 --- a/src/Commands/DebugCommand.php +++ b/src/Commands/DebugCommand.php @@ -4,19 +4,19 @@ use Composer\InstalledVersions; use Illuminate\Console\Command; -use function Laravel\Prompts\info; -use function Laravel\Prompts\note; +use Illuminate\Contracts\Console\PromptsForMissingInput; use Illuminate\Support\Collection; -use function Laravel\Prompts\error; -use function Laravel\Prompts\intro; -use function Laravel\Prompts\outro; - -use function Laravel\Prompts\select; use Illuminate\Support\Facades\File; use Illuminate\Support\Facades\Process; use Native\Laravel\Support\Environment; use Symfony\Component\Console\Attribute\AsCommand; -use Illuminate\Contracts\Console\PromptsForMissingInput; + +use function Laravel\Prompts\error; +use function Laravel\Prompts\info; +use function Laravel\Prompts\intro; +use function Laravel\Prompts\note; +use function Laravel\Prompts\outro; +use function Laravel\Prompts\select; #[AsCommand( name: 'native:debug',