Skip to content

Commit ab05752

Browse files
author
Michael J. Lyons (XBOX)
committed
Update configuration and environment documentation to document the new x5c MSAL claim option
1 parent 55d6262 commit ab05752

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

docs/azrepos-misp.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ Type|Git Configuration|Environment Variable
108108
-|-|-
109109
Client Secret|[`credential.azreposServicePrincipalSecret`][gcm-sp-secret-config]|[`GCM_AZREPOS_SP_SECRET`][gcm-sp-secret-env]
110110
Certificate|[`credential.azreposServicePrincipalCertificateThumbprint`][gcm-sp-cert-config]|[`GCM_AZREPOS_SP_CERT_THUMBPRINT`][gcm-sp-cert-env]
111+
Send X5C|[`credential.azreposServicePrincipalCertificateSendX5C`][gcm-sp-cert-x5c-config]|[`GCM_AZREPOS_SP_CERT_SEND_X5C`][gcm-sp-cert-x5c-env]
111112

112113
The value for these options should be the client secret or the thumbrint of the
113114
certificate that is associated with the Service Principal.
@@ -126,4 +127,6 @@ current user or the local machine.
126127
[gcm-sp-secret-config]: https://gh.io/gcm/config#credentialazreposserviceprincipalsecret
127128
[gcm-sp-secret-env]: https://gh.io/gcm/env#GCM_AZREPOS_SP_SECRET
128129
[gcm-sp-cert-config]: https://gh.io/gcm/config#credentialazreposserviceprincipalcertificatethumbprint
130+
[gcm-sp-cert-x5c-config]: https://gh.io/gcm/config#credentialazreposserviceprincipalcertificatesendx5c
129131
[gcm-sp-cert-env]: https://gh.io/gcm/env#GCM_AZREPOS_SP_CERT_THUMBPRINT
132+
[gcm-sp-cert-x5c-env]: https://gh.io/gcm/env#GCM_AZREPOS_SP_CERT_SEND_X5C

docs/configuration.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,7 @@ You must also set at least one authentication mechanism if you set this value:
858858

859859
- [credential.azreposServicePrincipalSecret][credential-azrepos-sp-secret]
860860
- [credential.azreposServicePrincipalCertificateThumbprint][credential-azrepos-sp-cert-thumbprint]
861+
- [credential.azreposServicePrincipalCertificateSendX5C][credential-azrepos-sp-cert-x5c]
861862

862863
For more information about service principals, see the Azure DevOps
863864
[documentation][azrepos-sp-mid].
@@ -904,6 +905,25 @@ git config --global credential.azreposServicePrincipalCertificateThumbprint "9b6
904905

905906
---
906907

908+
### credential.azreposServicePrincipalCertificateSendX5C
909+
910+
When using a certificate for [service principal][service-principal] authentication, this configuration
911+
specifies whether the X5C claim should be should be sent to the STS. Sending the x5c
912+
enables application developers to achieve easy certificate rollover in Azure AD:
913+
this method will send the public certificate to Azure AD along with the token request,
914+
so that Azure AD can use it to validate the subject name based on a trusted issuer
915+
policy. This saves the application admin from the need to explicitly manage the
916+
certificate rollover. For details see [https://aka.ms/msal-net-sni](https://aka.ms/msal-net-sni).
917+
918+
#### Example
919+
920+
```shell
921+
git config --global credential.azreposServicePrincipalCertificateSendX5C true
922+
```
923+
**Also see: [GCM_AZREPOS_SP_CERT_SEND_X5C][gcm-azrepos-sp-cert-x5c]**
924+
925+
---
926+
907927
### trace2.normalTarget
908928

909929
Turns on Trace2 Normal Format tracing - see [Git's Trace2 Normal Format
@@ -1034,6 +1054,8 @@ Defaults to disabled.
10341054
[credential-azrepos-sp]: #credentialazreposserviceprincipal
10351055
[credential-azrepos-sp-secret]: #credentialazreposserviceprincipalsecret
10361056
[credential-azrepos-sp-cert-thumbprint]: #credentialazreposserviceprincipalcertificatethumbprint
1057+
[credential-azrepos-sp-cert-x5c]: #credentialazreposserviceprincipalcertificatesendx5c
10371058
[gcm-azrepos-service-principal]: environment.md#GCM_AZREPOS_SERVICE_PRINCIPAL
10381059
[gcm-azrepos-sp-secret]: environment.md#GCM_AZREPOS_SP_SECRET
10391060
[gcm-azrepos-sp-cert-thumbprint]: environment.md#GCM_AZREPOS_SP_CERT_THUMBPRINT
1061+
[gcm-azrepos-sp-cert-x5c]: environment.md#GCM_AZREPOS_SP_CERT_SEND_X5C

docs/environment.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,6 +1039,32 @@ export GCM_AZREPOS_SP_CERT_THUMBPRINT="9b6555292e4ea21cbc2ebd23e66e2f91ebbe92dc"
10391039

10401040
---
10411041

1042+
### GCM_AZREPOS_SP_CERT_SEND_X5C
1043+
1044+
When using a certificate for service principal authentication, this configuration
1045+
specifies whether the X5C claim should be should be sent to the STS. Sending the x5c
1046+
enables application developers to achieve easy certificate rollover in Azure AD:
1047+
this method will send the public certificate to Azure AD along with the token request,
1048+
so that Azure AD can use it to validate the subject name based on a trusted issuer
1049+
policy. This saves the application admin from the need to explicitly manage the
1050+
certificate rollover. For details see [https://aka.ms/msal-net-sni](https://aka.ms/msal-net-sni).
1051+
1052+
#### Windows
1053+
1054+
```batch
1055+
SET GCM_AZREPOS_SP_CERT_SEND_X5C="true"
1056+
```
1057+
1058+
#### macOS/Linux
1059+
1060+
```bash
1061+
export GCM_AZREPOS_SP_CERT_SEND_X5C="true"
1062+
```
1063+
1064+
**Also see: [credential.azreposServicePrincipalCertificateSendX5C][credential-azrepos-sp-cert-x5c]**
1065+
1066+
---
1067+
10421068
### GIT_TRACE2
10431069

10441070
Turns on Trace2 Normal Format tracing - see [Git's Trace2 Normal Format
@@ -1184,6 +1210,8 @@ Defaults to disabled.
11841210
[gcm-azrepos-sp]: #gcm_azrepos_service_principal
11851211
[gcm-azrepos-sp-secret]: #gcm_azrepos_sp_secret
11861212
[gcm-azrepos-sp-cert-thumbprint]: #gcm_azrepos_sp_cert_thumbprint
1213+
[gcm-azrepos-sp-cert-x5c]: #gcm_azrepos_sp_cert_send_x5c
11871214
[credential-azrepos-sp]: configuration.md#credentialazreposserviceprincipal
11881215
[credential-azrepos-sp-secret]: configuration.md#credentialazreposserviceprincipalsecret
11891216
[credential-azrepos-sp-cert-thumbprint]: configuration.md#credentialazreposserviceprincipalcertificatethumbprint
1217+
[credential-azrepos-sp-cert-x5c]: configuration.md#credentialazreposserviceprincipalcertificatesendx5c

0 commit comments

Comments
 (0)