Skip to content

Commit f732e63

Browse files
authored
[mgmt] trustedsigning release (#31255)
Azure/sdk-release-request#5543
1 parent f5563ee commit f732e63

File tree

87 files changed

+5573
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+5573
-2
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,9 @@ sdk/ai/ai-inference-rest @glharper @dargilco @jhakulin
916916
# PRLabel: %Mgmt
917917
/sdk/trafficmanager/arm-trafficmanager/ @qiaozha @MaryGao
918918

919+
# PRLabel: %Mgmt
920+
/sdk/trustedsigning/arm-trustedsigning/ @qiaozha @MaryGao
921+
919922
# PRLabel: %Mgmt
920923
/sdk/visualstudio/arm-visualstudio/ @qiaozha @MaryGao
921924

common/config/rush/pnpm-lock.yaml

Lines changed: 45 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eng/ignore-links.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/async-api-r
99
https://docs.microsoft.com/javascript/api/@azure/arm-computeschedule?view=azure-node-preview
1010
https://docs.microsoft.com/javascript/api/@azure/arm-healthdataaiservices?view=azure-node-preview
1111
https://docs.microsoft.com/javascript/api/@azure/arm-fabric?view=azure-node-preview
12+
https://docs.microsoft.com/javascript/api/@azure/arm-trustedsigning?view=azure-node-preview

rush.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2286,6 +2286,11 @@
22862286
"packageName": "@azure/arm-fabric",
22872287
"projectFolder": "sdk/fabric/arm-fabric",
22882288
"versionPolicyName": "management"
2289+
},
2290+
{
2291+
"packageName": "@azure/arm-trustedsigning",
2292+
"projectFolder": "sdk/trustedsigning/arm-trustedsigning",
2293+
"versionPolicyName": "management"
22892294
}
22902295
]
22912296
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Release History
2+
3+
## 1.0.0-beta.1 (2024-09-29)
4+
5+
### Features Added
6+
7+
Initial release of the Azure TrustedSigning package
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2024 Microsoft
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Azure CodeSigningManagement client library for JavaScript
2+
3+
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure CodeSigningManagement client.
4+
5+
Code Signing resource provider api.
6+
7+
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-trustedsigning) |
8+
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-trustedsigning?view=azure-node-preview) |
9+
10+
## Getting started
11+
12+
### Currently supported environments
13+
14+
- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
15+
- Latest versions of Safari, Chrome, Edge and Firefox.
16+
17+
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
18+
19+
### Prerequisites
20+
21+
- An [Azure subscription][azure_sub].
22+
23+
### Install the `@azure/arm-trustedsigning` package
24+
25+
Install the Azure CodeSigningManagement client library for JavaScript with `npm`:
26+
27+
```bash
28+
npm install @azure/arm-trustedsigning
29+
```
30+
31+
### Create and authenticate a `CodeSigningClient`
32+
33+
To create a client object to access the Azure CodeSigningManagement API, you will need the `endpoint` of your Azure CodeSigningManagement resource and a `credential`. The Azure CodeSigningManagement client can use Azure Active Directory credentials to authenticate.
34+
You can find the endpoint for your Azure CodeSigningManagement resource in the [Azure Portal][azure_portal].
35+
36+
You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
37+
38+
To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
39+
40+
```bash
41+
npm install @azure/identity
42+
```
43+
44+
You will also need to **register a new AAD application and grant access to Azure CodeSigningManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
45+
Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.
46+
47+
For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
48+
49+
```javascript
50+
const { CodeSigningClient } = require("@azure/arm-trustedsigning");
51+
const { DefaultAzureCredential } = require("@azure/identity");
52+
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
53+
54+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
55+
const client = new CodeSigningClient(new DefaultAzureCredential(), subscriptionId);
56+
57+
// For client-side applications running in the browser, use this code instead:
58+
// const credential = new InteractiveBrowserCredential({
59+
// tenantId: "<YOUR_TENANT_ID>",
60+
// clientId: "<YOUR_CLIENT_ID>"
61+
// });
62+
// const client = new CodeSigningClient(credential, subscriptionId);
63+
```
64+
65+
66+
### JavaScript Bundle
67+
To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).
68+
69+
## Key concepts
70+
71+
### CodeSigningClient
72+
73+
`CodeSigningClient` is the primary interface for developers using the Azure CodeSigningManagement client library. Explore the methods on this client object to understand the different features of the Azure CodeSigningManagement service that you can access.
74+
75+
## Troubleshooting
76+
77+
### Logging
78+
79+
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
80+
81+
```javascript
82+
const { setLogLevel } = require("@azure/logger");
83+
setLogLevel("info");
84+
```
85+
86+
For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
87+
88+
89+
## Contributing
90+
91+
If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
92+
93+
## Related projects
94+
95+
- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)
96+
97+
[azure_sub]: https://azure.microsoft.com/free/
98+
[azure_portal]: https://portal.azure.com
99+
[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity
100+
[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3+
"mainEntryPointFilePath": "./dist/esm/index.d.ts",
4+
"docModel": { "enabled": true },
5+
"apiReport": { "enabled": true, "reportFolder": "./review" },
6+
"dtsRollup": {
7+
"enabled": true,
8+
"untrimmedFilePath": "",
9+
"publicTrimmedFilePath": "./types/arm-trustedsigning.d.ts"
10+
},
11+
"messages": {
12+
"tsdocMessageReporting": { "default": { "logLevel": "none" } },
13+
"extractorMessageReporting": {
14+
"ae-missing-release-tag": { "logLevel": "none" },
15+
"ae-unresolved-link": { "logLevel": "none" }
16+
}
17+
}
18+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"AssetsRepo": "Azure/azure-sdk-assets",
3+
"AssetsRepoPrefixPath": "js",
4+
"TagPrefix": "js/trustedsigning/arm-trustedsigning",
5+
"Tag": "js/trustedsigning/arm-trustedsigning_ccdc9701c1"
6+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";
2+
3+
export default [
4+
...azsdkEslint.configs.recommended,
5+
{
6+
rules: {
7+
"@azure/azure-sdk/ts-modules-only-named": "warn",
8+
"@azure/azure-sdk/ts-apiextractor-json-types": "warn",
9+
"@azure/azure-sdk/ts-package-json-types": "warn",
10+
"@azure/azure-sdk/ts-package-json-engine-is-present": "warn",
11+
"@azure/azure-sdk/ts-package-json-module": "off",
12+
"@azure/azure-sdk/ts-package-json-files-required": "off",
13+
"@azure/azure-sdk/ts-package-json-main-is-cjs": "off",
14+
"tsdoc/syntax": "warn",
15+
},
16+
},
17+
];

0 commit comments

Comments
 (0)