Skip to content

Commit fa2dd11

Browse files
siddharthpaudwalSiddharth Paudwal
andauthored
added linux/win-arm64 distribution support for azureauth (#440)
* made some changes in build yaml to publish artifcats in pipeline * resolved issue * corrected yaml file * corrected yaml file * added linux executable for distribution * added nuget authenticate task * correcting esrp service connection task * correcting esrp service connection * corrected esrp for osx distribution * added linux module * added linux module and fixed esrp module * added nuget authenticate task * added zip signing for linux package * added binskim suppression file * using unofficial template * using unofficial template * removed production release job * removing guardian task * added win arm64 archive * mac osx arm64 support --------- Co-authored-by: Siddharth Paudwal <spaudwal@microsoft.com>
1 parent 0397c29 commit fa2dd11

File tree

3 files changed

+217
-8
lines changed

3 files changed

+217
-8
lines changed

.azuredevops/release.yml

Lines changed: 159 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,24 @@ parameters:
2727
os: macOS
2828
runtime: osx-arm64
2929
archiveExt: tar.gz
30+
- pool:
31+
name: Azure-Pipelines-1ESPT-ExDShared
32+
image: ubuntu-latest
33+
os: linux
34+
runtime: linux-x64
35+
archiveExt: deb
36+
- pool:
37+
name: Azure-Pipelines-1ESPT-ExDShared
38+
image: windows-latest
39+
os: windows
40+
runtime: win-arm64
41+
archiveExt: zip
42+
- pool:
43+
name: Azure-Pipelines-1ESPT-ExDShared
44+
image: ubuntu-latest
45+
os: linux
46+
runtime: linux-arm64
47+
archiveExt: deb
3048

3149
variables:
3250
- name: tags
@@ -51,13 +69,14 @@ resources:
5169
ref: refs/tags/release
5270

5371
extends:
54-
template: v1/Office.Official.PipelineTemplate.yml@OfficePipelineTemplates
72+
template: v1/Office.Unofficial.PipelineTemplate.yml@OfficePipelineTemplates
5573
parameters:
5674
pool:
5775
name: Azure-Pipelines-1ESPT-ExDShared
5876
image: ubuntu-latest
5977
os: linux
6078
sdl:
79+
enableAllTools: false
6180
sourceAnalysisPool:
6281
name: Azure-Pipelines-1ESPT-ExDShared
6382
image: windows-latest
@@ -108,6 +127,8 @@ extends:
108127
displayName: Use NuGet 6.x
109128
inputs:
110129
versionSpec: 6.x
130+
- task: NuGetAuthenticate@1
131+
displayName: Authenticate to Azure Artifacts
111132
- task: DotNetCoreCLI@2
112133
displayName: Install dependencies
113134
inputs:
@@ -162,12 +183,14 @@ extends:
162183
targetPath: $(artifactsPath)-${{ config.runtime }}-signed
163184
steps:
164185
- task: EsrpCodeSigning@5
165-
displayName: Sign artifacts win-x64
166-
condition: eq('${{ config.runtime }}', 'win-x64')
186+
displayName: Sign artifacts win
187+
condition: startsWith('${{ config.runtime }}', 'win')
167188
inputs:
168189
ConnectedServiceName: $(ESRP_KV_SERVICE_CONNECTION)
190+
UseMSIAuthentication: true
169191
AppRegistrationClientId: $(SIGNING_AAD_ID)
170192
AppRegistrationTenantId: $(SIGNING_TENANT_ID)
193+
EsrpClientId: "9f327a71-bffd-4a67-8a7b-443e11df2909"
171194
AuthAKVName: $(AZURE_VAULT)
172195
AuthCertName: $(AZURE_VAULT_ESRP_AAD_CERT_NAME)
173196
AuthSignCertName: $(AZURE_VAULT_ESRP_REQ_CERT_NAME)
@@ -201,10 +224,10 @@ extends:
201224
MaxConcurrency: '50'
202225
MaxRetryAttempts: '5'
203226
PendingAnalysisWaitTimeoutMinutes: '5'
204-
# We need to zip the artifacts for osx before sending to ESRP for signing.
227+
# We need to zip the artifacts for osx and linux before sending to ESRP for signing.
205228
- task: ArchiveFiles@2
206229
displayName: Codesigning - zip artifacts to send to ESRP
207-
condition: startsWith('${{ config.runtime }}', 'osx')
230+
condition: or(startsWith('${{ config.runtime }}','osx'), startsWith('${{ config.runtime }}','linux'))
208231
inputs:
209232
rootFolderOrFile: $(artifactsPath)-${{ config.runtime }}
210233
includeRootFolder: false
@@ -215,8 +238,10 @@ extends:
215238
condition: startsWith('${{ config.runtime }}', 'osx')
216239
inputs:
217240
ConnectedServiceName: $(ESRP_KV_SERVICE_CONNECTION)
241+
UseMSIAuthentication: true
218242
AppRegistrationClientId: $(SIGNING_AAD_ID)
219243
AppRegistrationTenantId: $(SIGNING_TENANT_ID)
244+
EsrpClientId: "9f327a71-bffd-4a67-8a7b-443e11df2909"
220245
AuthAKVName: $(AZURE_VAULT)
221246
AuthCertName: $(AZURE_VAULT_ESRP_AAD_CERT_NAME)
222247
AuthSignCertName: $(AZURE_VAULT_ESRP_REQ_CERT_NAME)
@@ -244,9 +269,46 @@ extends:
244269
MaxConcurrency: '50'
245270
MaxRetryAttempts: '5'
246271
PendingAnalysisWaitTimeoutMinutes: '5'
272+
# Linux signing with ESRP
273+
- task: EsrpCodeSigning@5
274+
displayName: Sign artifacts linux-x64
275+
condition: startsWith('${{ config.runtime }}','linux')
276+
inputs:
277+
ConnectedServiceName: $(ESRP_KV_SERVICE_CONNECTION)
278+
UseMSIAuthentication: true
279+
AppRegistrationClientId: $(SIGNING_AAD_ID)
280+
AppRegistrationTenantId: $(SIGNING_TENANT_ID)
281+
EsrpClientId: "9f327a71-bffd-4a67-8a7b-443e11df2909"
282+
AuthAKVName: $(AZURE_VAULT)
283+
AuthCertName: $(AZURE_VAULT_ESRP_AAD_CERT_NAME)
284+
AuthSignCertName: $(AZURE_VAULT_ESRP_REQ_CERT_NAME)
285+
FolderPath: $(artifactsPath)-${{ config.runtime }}/AzureAuth
286+
Pattern: 'azureauth-${{ parameters.version }}-${{ config.runtime }}.zip'
287+
signConfigType: 'inlineSignParams'
288+
inlineOperation: |
289+
[
290+
{
291+
"KeyCode": "$(SIGNING_KEY_CODE_LINUX)",
292+
"OperationCode": "LinuxSign",
293+
"ToolName": "sign",
294+
"ToolVersion": "1.0",
295+
"Parameters": {}
296+
},
297+
{
298+
"KeyCode": "$(SIGNING_KEY_CODE_LINUX)",
299+
"OperationCode": "LinuxVerify",
300+
"ToolName": "sign",
301+
"ToolVersion": "1.0",
302+
"Parameters": {}
303+
}
304+
]
305+
SessionTimeout: '60'
306+
MaxConcurrency: '50'
307+
MaxRetryAttempts: '5'
308+
PendingAnalysisWaitTimeoutMinutes: '5'
247309
- task: ExtractFiles@1
248310
displayName: Extract signed artifacts osx
249-
condition: startsWith('${{ config.runtime }}', 'osx')
311+
condition: or(startsWith('${{ config.runtime }}','osx'), startsWith('${{ config.runtime }}','linux'))
250312
inputs:
251313
archiveFilePatterns: $(artifactsPath)-${{ config.runtime }}.zip
252314
destinationFolder: $(artifactsPath)-${{ config.runtime }}
@@ -297,6 +359,13 @@ extends:
297359
includeRootFolder: false
298360
archiveType: zip
299361
archiveFile: $(artifactsPath)-packaged/azureauth-${{ parameters.version }}-win-x64.zip
362+
- task: ArchiveFiles@2
363+
displayName: Create win-arm64 archive
364+
inputs:
365+
rootFolderOrFile: $(artifactsPath)-win-arm64-signed/AzureAuth
366+
includeRootFolder: false
367+
archiveType: zip
368+
archiveFile: $(artifactsPath)-packaged/azureauth-${{ parameters.version }}-win-arm64.zip
300369
- task: Bash@3
301370
displayName: Prepare osx-x64 executables
302371
inputs:
@@ -329,6 +398,86 @@ extends:
329398
archiveType: tar
330399
tarCompression: gz
331400
archiveFile: $(artifactsPath)-packaged/azureauth-${{ parameters.version }}-osx-arm64.tar.gz
401+
- task: Bash@3
402+
displayName: Create linux-x64 Debian package
403+
inputs:
404+
workingDirectory: $(Build.ArtifactStagingDirectory)
405+
targetType: inline
406+
script: |
407+
set -e
408+
VERSION="${{ parameters.version }}"
409+
ARCH="amd64"
410+
PKG_NAME="azureauth"
411+
PKG_DIR="${PKG_NAME}_${VERSION}-1_${ARCH}"
412+
413+
# Create Debian package directory structure
414+
mkdir -p "${PKG_DIR}/DEBIAN"
415+
mkdir -p "${PKG_DIR}/usr/bin"
416+
mkdir -p "${PKG_DIR}/usr/lib/azureauth"
417+
418+
# Copy binaries
419+
cp -r azureauth-${{ parameters.version }}-linux-x64-signed/AzureAuth/* "${PKG_DIR}/usr/lib/azureauth/"
420+
chmod +x "${PKG_DIR}/usr/lib/azureauth/azureauth"
421+
chmod +x "${PKG_DIR}/usr/lib/azureauth/createdump"
422+
chmod +x "${PKG_DIR}/usr/lib/azureauth/"*.so
423+
424+
# Create symlink script
425+
ln -sf /usr/lib/azureauth/azureauth "${PKG_DIR}/usr/bin/azureauth"
426+
427+
# Create control file
428+
cat > "${PKG_DIR}/DEBIAN/control" << EOF
429+
Package: ${PKG_NAME}
430+
Version: ${VERSION}-1
431+
Section: misc
432+
Priority: optional
433+
Architecture: ${ARCH}
434+
Maintainer: ES365 Security Experience Team <authcli@microsoft.com>
435+
Description: A CLI interface to MSAL authentication. Visit https://aka.ms/azureauth for more information
436+
EOF
437+
438+
# Build the package
439+
dpkg-deb --build "${PKG_DIR}"
440+
mv "${PKG_DIR}.deb" "azureauth-${{ parameters.version }}-packaged/azureauth-${{ parameters.version }}-linux-x64.deb"
441+
- task: Bash@3
442+
displayName: Create linux-arm64 Debian package
443+
inputs:
444+
workingDirectory: $(Build.ArtifactStagingDirectory)
445+
targetType: inline
446+
script: |
447+
set -e
448+
VERSION="${{ parameters.version }}"
449+
ARCH="arm64"
450+
PKG_NAME="azureauth"
451+
PKG_DIR="${PKG_NAME}_${VERSION}-1_${ARCH}"
452+
453+
# Create Debian package directory structure
454+
mkdir -p "${PKG_DIR}/DEBIAN"
455+
mkdir -p "${PKG_DIR}/usr/bin"
456+
mkdir -p "${PKG_DIR}/usr/lib/azureauth"
457+
458+
# Copy binaries
459+
cp -r azureauth-${{ parameters.version }}-linux-arm64-signed/AzureAuth/* "${PKG_DIR}/usr/lib/azureauth/"
460+
chmod +x "${PKG_DIR}/usr/lib/azureauth/azureauth"
461+
chmod +x "${PKG_DIR}/usr/lib/azureauth/createdump"
462+
chmod +x "${PKG_DIR}/usr/lib/azureauth/"*.so
463+
464+
# Create symlink script
465+
ln -sf /usr/lib/azureauth/azureauth "${PKG_DIR}/usr/bin/azureauth"
466+
467+
# Create control file
468+
cat > "${PKG_DIR}/DEBIAN/control" << EOF
469+
Package: ${PKG_NAME}
470+
Version: ${VERSION}-1
471+
Section: misc
472+
Priority: optional
473+
Architecture: ${ARCH}
474+
Maintainer: ES365 Security Experience Team <authcli@microsoft.com>
475+
Description: A CLI interface to MSAL authentication. Visit https://aka.ms/azureauth for more information
476+
EOF
477+
478+
# Build the package
479+
dpkg-deb --build "${PKG_DIR}"
480+
mv "${PKG_DIR}.deb" "azureauth-${{ parameters.version }}-packaged/azureauth-${{ parameters.version }}-linux-arm64.deb"
332481
333482
- stage: release
334483
displayName: Release
@@ -353,7 +502,7 @@ extends:
353502
os: linux
354503
templateContext:
355504
type: releaseJob
356-
isProduction: true
505+
isProduction: false
357506
inputs:
358507
- input: pipelineArtifact
359508
artifactName: azureauth-${{ parameters.version }}-packaged
@@ -376,4 +525,6 @@ extends:
376525
assets: |
377526
$(artifactsPath)-packaged/azureauth-${{ parameters.version }}-win-x64.zip
378527
$(artifactsPath)-packaged/azureauth-${{ parameters.version }}-osx-x64.tar.gz
379-
$(artifactsPath)-packaged/azureauth-${{ parameters.version }}-osx-arm64.tar.gz
528+
$(artifactsPath)-packaged/azureauth-${{ parameters.version }}-osx-arm64.tar.gz
529+
$(artifactsPath)-packaged/azureauth-${{ parameters.version }}-linux-x64.deb
530+
$(artifactsPath)-packaged/azureauth-${{ parameters.version }}-linux-arm64.deb

.gdn/.gdnbaselines

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"hydrated": true,
3+
"properties": {
4+
"helpUri": "https://eng.ms/docs/microsoft-security/security/azure-security/cloudai-security-fundamentals-engineering/security-integration/guardian-wiki/microsoft-guardian/general/baselines"
5+
},
6+
"version": "1.0.0",
7+
"baselines": {
8+
"guardian-baseline": {
9+
"name": "guardian-baseline",
10+
"createdDate": "2026-02-06 20:55:03Z",
11+
"lastUpdatedDate": "2026-02-06 20:55:03Z"
12+
}
13+
},
14+
"results": {
15+
"2960648537ceab2dc9e4d4c3ff0f34bcc246699ca797e6d0588cfdb877e66e36": {
16+
"signature": "2960648537ceab2dc9e4d4c3ff0f34bcc246699ca797e6d0588cfdb877e66e36",
17+
"alternativeSignatures": [
18+
"d54c1b18e7a800bc62578ecf06fbadaa70e667f9f62d2d5b60e12fcfc8cba11e"
19+
],
20+
"target": "**/AzureAuth/*.dll",
21+
"memberOf": [
22+
"guardian-baseline"
23+
],
24+
"tool": "binskim",
25+
"ruleId": "BA2021",
26+
"createdDate": "2026-02-06 20:55:03Z"
27+
}
28+
}
29+
}

.gdn/.gdnsuppress

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"hydrated": true,
3+
"properties": {
4+
"helpUri": "https://eng.ms/docs/microsoft-security/security/azure-security/cloudai-security-fundamentals-engineering/security-integration/guardian-wiki/microsoft-guardian/general/suppressions"
5+
},
6+
"version": "1.0.0",
7+
"suppressionSets": {
8+
"default": {
9+
"name": "default",
10+
"createdDate": "2026-02-06 20:55:03Z",
11+
"lastUpdatedDate": "2026-02-06 20:55:03Z"
12+
}
13+
},
14+
"results": {
15+
"2960648537ceab2dc9e4d4c3ff0f34bcc246699ca797e6d0588cfdb877e66e36": {
16+
"signature": "2960648537ceab2dc9e4d4c3ff0f34bcc246699ca797e6d0588cfdb877e66e36",
17+
"alternativeSignatures": [
18+
"d54c1b18e7a800bc62578ecf06fbadaa70e667f9f62d2d5b60e12fcfc8cba11e"
19+
],
20+
"target": "**/AzureAuth/*.dll",
21+
"memberOf": [
22+
"default"
23+
],
24+
"tool": "binskim",
25+
"ruleId": "BA2021",
26+
"createdDate": "2026-02-06 20:55:03Z"
27+
}
28+
}
29+
}

0 commit comments

Comments
 (0)